内容
# Discourse MCP Server
Node.js 服务器,为 Discourse 搜索操作实现模型上下文协议 (MCP)。
## 功能
- 使用 MCP 协议在 Discourse 论坛上搜索帖子。
## API
### 工具
- **search_posts**
- 在 Discourse 论坛上搜索帖子
- 输入:`query` (字符串)
- 返回一个帖子对象数组
## 使用 Claude Desktop
将其添加到你的 `claude_desktop_config.json` 中:
### Docker
```json
{
"mcpServers": {
"discourse": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "DISCOURSE_API_URL=https://try.discourse.org",
"-e", "DISCOURSE_API_KEY=1234",
"-e", "DISCOURSE_API_USERNAME=ash",
"ashdev/discourse-mcp-server"
]
}
}
}
```
### NPX
```json
{
"mcpServers": {
"discourse": {
"command": "npx",
"args": [
"-y",
"@ashdev/discourse-mcp-server"
],
"env": {
"DISCOURSE_API_URL": "https://try.discourse.org",
"DISCOURSE_API_KEY": "1234",
"DISCOURSE_API_USERNAME": "ash"
}
}
}
}
```
## 构建
Docker 构建:
```bash
docker build -t ashdev/discourse-mcp-server .
```