Commit 924dfeeb authored by Your Name's avatar Your Name

Add MCP (Model Context Protocol) server endpoint

- Implement MCP server module (aisbf/mcp.py) with SSE and HTTP stream support
- Add two authentication levels: autoselect-only and fullconfig
- Add MCP configuration to config/aisbf.json (disabled by default)
- Add MCP endpoints to main.py: GET/POST /mcp, GET /mcp/tools, POST /mcp/tools/call
- Both token types give access to standard APIs (list_models, chat_completion)
- autoselect_tokens: access to autoselection/autorotation settings
- fullconfig_tokens: access to full system configuration including providers

This allows remote agents to configure the system and/or just the
autoselections/rotations, as well as make requests for models.
parent 673281d1
This diff is collapsed.
...@@ -13,6 +13,17 @@ ...@@ -13,6 +13,17 @@
"your-secret-token-2" "your-secret-token-2"
] ]
}, },
"mcp": {
"enabled": false,
"autoselect_tokens": [
"mcp-autoselect-token-1",
"mcp-autoselect-token-2"
],
"fullconfig_tokens": [
"mcp-fullconfig-token-1",
"mcp-fullconfig-token-2"
]
},
"dashboard": { "dashboard": {
"enabled": true, "enabled": true,
"username": "admin", "username": "admin",
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment