2025-04-23 13:48:42 +08:00
|
|
|
# MCP Integrations
|
|
|
|
|
|
|
|
|
|
## APIs
|
|
|
|
|
|
|
|
|
|
### Get Information of MCP Server
|
|
|
|
|
|
|
|
|
|
**POST /api/mcp/server/metadata**
|
|
|
|
|
|
|
|
|
|
For stdio type:
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"type": "stdio",
|
|
|
|
|
"command": "npx",
|
2025-04-23 14:38:04 +08:00
|
|
|
"args": ["-y", "tavily-mcp@0.1.3"],
|
|
|
|
|
"env": {"TAVILY_API_KEY": "tvly-dev-xxx"}
|
2025-04-23 13:48:42 +08:00
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
For SSE type:
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"type": "sse",
|
|
|
|
|
"url": "http://localhost:3000/sse",
|
|
|
|
|
"env": {
|
|
|
|
|
"API_KEY": "value"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Chat Stream
|
|
|
|
|
|
|
|
|
|
**POST /api/chat/stream**
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
...
|
|
|
|
|
"mcp_settings": {
|
|
|
|
|
"servers": {
|
|
|
|
|
"mcp-github-trending": {
|
|
|
|
|
"command": "uvx",
|
|
|
|
|
"args": ["mcp-github-trending"],
|
|
|
|
|
"env": {
|
|
|
|
|
"MCP_SERVER_ID": "mcp-github-trending"
|
|
|
|
|
},
|
|
|
|
|
"enabled_tools": ["get_github_trending_repositories"],
|
|
|
|
|
"add_to_agents": ["researcher"]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
```
|