MCP servers
KushRouter supports Model Context Protocol (MCP) servers to extend tool usage beyond standard function calls.
Request payload
Include an mcp_servers array when calling OpenAI-compatible or Anthropic-compatible endpoints. The server normalizes camelCase and snake_case automatically.
{
"model": "gpt-5-mini-2025-08-07",
"messages": [{ "role": "user", "content": "Summarize recent support tickets" }],
"mcp_servers": [
{
"name": "support-db",
"type": "database",
"config": {
"connectionString": "postgres://..."
}
},
{
"name": "filesystem",
"type": "filesystem",
"config": {
"root": "s3://support-docs"
}
}
]
}Supported server types
filesystem– surface files or directories as tool call targetsdatabase– query relational databases with parameterized SQLhttp– call external HTTP APIs- Custom server types are allowed as long as MCP contract is respected
Streaming behavior
- Tool invocations appear as incremental deltas in
choices[0].delta.tool_calls[].function.arguments(OpenAI) or Anthropic tool events. - When providers only emit final arguments in stop events, KushRouter sends a synthetic final delta so downstream clients receive complete JSON.
Authentication
- Use scoped API keys or OAuth credentials inside the MCP server configuration.
- Secrets should be stored securely; do not embed plain-text passwords in requests.
Debugging tips
- Enable verbose logging in
components/playground/api-playground.tsxwhen testing MCP servers via the dashboard playground. - Inspect streamed function call arguments in OpenAI Chat (
choices[0].delta.tool_calls[].function.arguments) or Anthropic tool events. Some providers emit final arguments at stop-time; ensure your client handles both incremental and final tool argument delivery.