mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-03 06:12:14 +08:00
add oauth schema to MCP server config (extensions_config.json) support client_credentials and refresh_token grants implement token manager with caching and pre-expiry refresh inject OAuth Authorization header for MCP tool discovery and tool calls extend MCP gateway config models to read/write OAuth settings update docs and examples for OAuth configuration add unit tests for token fetch/cache and header injection
72 lines
3.5 KiB
JSON
72 lines
3.5 KiB
JSON
{
|
|
"mcpServers": {
|
|
"filesystem": {
|
|
"enabled": true,
|
|
"type": "stdio",
|
|
"command": "npx",
|
|
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"],
|
|
"env": {},
|
|
"description": "Provides filesystem access within allowed directories"
|
|
},
|
|
"github": {
|
|
"enabled": true,
|
|
"type": "stdio",
|
|
"command": "npx",
|
|
"args": ["-y", "@modelcontextprotocol/server-github"],
|
|
"env": {
|
|
"GITHUB_TOKEN": "$GITHUB_TOKEN"
|
|
},
|
|
"description": "GitHub MCP server for repository operations"
|
|
},
|
|
"postgres": {
|
|
"enabled": false,
|
|
"type": "stdio",
|
|
"command": "npx",
|
|
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"],
|
|
"env": {},
|
|
"description": "PostgreSQL database access"
|
|
},
|
|
"my-sse-server": {
|
|
"type": "sse",
|
|
"url": "https://api.example.com/mcp",
|
|
"headers": {
|
|
"Authorization": "Bearer $API_TOKEN",
|
|
"X-Custom-Header": "value"
|
|
},
|
|
"oauth": {
|
|
"enabled": true,
|
|
"token_url": "https://auth.example.com/oauth/token",
|
|
"grant_type": "client_credentials",
|
|
"client_id": "$MCP_OAUTH_CLIENT_ID",
|
|
"client_secret": "$MCP_OAUTH_CLIENT_SECRET",
|
|
"scope": "mcp.read mcp.write",
|
|
"audience": "https://api.example.com",
|
|
"refresh_skew_seconds": 60
|
|
}
|
|
},
|
|
"my-http-server": {
|
|
"type": "http",
|
|
"url": "https://api.example.com/mcp",
|
|
"headers": {
|
|
"Authorization": "Bearer $API_TOKEN",
|
|
"X-Custom-Header": "value"
|
|
},
|
|
"oauth": {
|
|
"enabled": true,
|
|
"token_url": "https://auth.example.com/oauth/token",
|
|
"grant_type": "client_credentials",
|
|
"client_id": "$MCP_OAUTH_CLIENT_ID",
|
|
"client_secret": "$MCP_OAUTH_CLIENT_SECRET"
|
|
}
|
|
}
|
|
},
|
|
"skills": {
|
|
"pdf-processing": {
|
|
"enabled": true
|
|
},
|
|
"frontend-design": {
|
|
"enabled": true
|
|
}
|
|
}
|
|
}
|