MCP Integration
MisarCoder is an MCP client — connect it out to other MCP servers and call their tools through /mcp/configure, /mcp/servers, /mcp/tools, /mcp/call, and /mcp/remove.
MisarCoder is an MCP client, not an MCP server
MisarCoder connects out to other MCP servers and calls their tools on your behalf. It does not expose itself as an MCP server, and there is no MisarCoder MCP package to install in Claude Code or an IDE agent. To drive MisarCoder from a client, use the OpenAI-compatible or Anthropic-compatible HTTP APIs.
The endpoints on this page register external MCP servers with the gateway, list what they expose, and invoke their tools. Once a server is registered, its tools are available to the MoE engine during agent runs.
Base URL: https://api.misar.io/coder. All five endpoints authenticate with Authorization: Bearer <API_KEY> — see Authentication.
Register servers
/mcp/configureRegisters one or more MCP servers by name and connects to each. Re-sending a name replaces its configuration.
Request body
serversRecord<string, object>bodyrequiredMap of server name to its configuration. Each configuration takes a url (required) and optional headers for authenticating to that server.
Response fields
serversRecord<string, object>Per-server outcome, keyed by the name you supplied. Each entry is either { name, status: "connected", tool_count, tools } or { name, status: "error", error }.
curl -X POST https://api.misar.io/coder/mcp/configure \
-H "Authorization: Bearer $MISARCODER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"servers": {
"github": {
"url": "https://mcp.example.com/github",
"headers": { "Authorization": "Bearer ghp_…" }
}
}
}'{
"servers": {
"github": {
"name": "github",
"status": "connected",
"tool_count": 12,
"tools": ["create_issue", "list_repos"]
},
"broken": {
"name": "broken",
"status": "error",
"error": "Missing 'url' field"
}
}
}Per-server failures are not request failures
A server that cannot be reached, or is missing a url, produces an error entry inside a 200 response — the rest still connect. Always inspect each entry's status rather than relying on the HTTP code. Error text is truncated to 200 characters.
List registered servers
/mcp/serversEvery server currently registered, with its live connection state. Takes no parameters.
Response fields
serversRecord<string, object>Keyed by server name. Each entry carries status (connected or disconnected), url, tool_count, and tools — an array of tool names.
curl https://api.misar.io/coder/mcp/servers \
-H "Authorization: Bearer $MISARCODER_API_KEY"{
"servers": {
"github": {
"status": "connected",
"url": "https://mcp.example.com/github",
"tool_count": 12,
"tools": ["create_issue", "list_repos"]
}
}
}List all tools
/mcp/toolsEvery tool across every connected server, flattened into one list in Anthropic tool format. Takes no parameters.
Response fields
toolsobject[]Tool definitions from all connected servers, concatenated.
countnumberTotal tools available.
curl https://api.misar.io/coder/mcp/tools \
-H "Authorization: Bearer $MISARCODER_API_KEY"{
"tools": [
{ "name": "github__create_issue", "description": "…", "input_schema": {} }
],
"count": 12
}Call a tool
/mcp/callInvokes a tool on a connected server.
Request body
namestringbodyrequiredPrefixed tool name in the form server__tool_name — the server name, two underscores, then the tool name.
argumentsobjectbodyArguments passed through to the tool. Defaults to {}.
Response fields
resultstringThe tool's output, or the error text when is_error is true.
is_errorbooleantrue when the call failed. The HTTP status is still 200.
curl -X POST https://api.misar.io/coder/mcp/call \
-H "Authorization: Bearer $MISARCODER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "github__create_issue",
"arguments": { "repo": "acme/api", "title": "Fix pagination" }
}'{ "result": "Created issue #482", "is_error": false }{ "result": "MCP server 'github' not connected", "is_error": true }Tool failures return 200 — check `is_error`
A disconnected server, a malformed tool name, or an exception inside the tool all return 200 with is_error: true. Never infer success from the HTTP status here. Generic error text is truncated to 300 characters.
Remove a server
/mcp/removeDisconnects and unregisters a server.
Request body
namestringbodyrequiredThe registered server name.
Response fields
removedbooleanfalse when no server was registered under that name. The status is still 200.
namestringEcho of the requested name.
curl -X POST https://api.misar.io/coder/mcp/remove \
-H "Authorization: Bearer $MISARCODER_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "github" }'{ "removed": true, "name": "github" }Status codes
| Code | Meaning |
|---|---|
200 | The request was processed. Inspect status, is_error, or removed for the real outcome. |
401 | Missing authorization or Invalid API key |
422 | Request body failed validation |
Open when unconfigured
Like the rest of the gateway, these endpoints skip authentication entirely when the deployment has no API key configured. See Authentication.