MisarMisar Docs
MisarMailMisarBlogMisarReachMisarPostMisarDevMisarCoderMisarSEOMisar PlatformMisar SSO
MCP & Tools

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

POST/mcp/configure

Registers one or more MCP servers by name and connects to each. Re-sending a name replaces its configuration.

Request body

serversRecord<string, object>bodyrequired

Map 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 }.

Request
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_…" }
      }
    }
  }'
200 — Mixed outcome
{
  "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

GET/mcp/servers

Every 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.

Request
curl https://api.misar.io/coder/mcp/servers \
  -H "Authorization: Bearer $MISARCODER_API_KEY"
200 — OK
{
  "servers": {
    "github": {
      "status": "connected",
      "url": "https://mcp.example.com/github",
      "tool_count": 12,
      "tools": ["create_issue", "list_repos"]
    }
  }
}

List all tools

GET/mcp/tools

Every 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.

countnumber

Total tools available.

Request
curl https://api.misar.io/coder/mcp/tools \
  -H "Authorization: Bearer $MISARCODER_API_KEY"
200 — OK
{
  "tools": [
    { "name": "github__create_issue", "description": "…", "input_schema": {} }
  ],
  "count": 12
}

Call a tool

POST/mcp/call

Invokes a tool on a connected server.

Request body

namestringbodyrequired

Prefixed tool name in the form server__tool_name — the server name, two underscores, then the tool name.

argumentsobjectbody

Arguments passed through to the tool. Defaults to {}.

Response fields

resultstring

The tool's output, or the error text when is_error is true.

is_errorboolean

true when the call failed. The HTTP status is still 200.

Request
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" }
  }'
200 — Success
{ "result": "Created issue #482", "is_error": false }
200 — Failure
{ "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

POST/mcp/remove

Disconnects and unregisters a server.

Request body

namestringbodyrequired

The registered server name.

Response fields

removedboolean

false when no server was registered under that name. The status is still 200.

namestring

Echo of the requested name.

Request
curl -X POST https://api.misar.io/coder/mcp/remove \
  -H "Authorization: Bearer $MISARCODER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "github" }'
200 — Removed
{ "removed": true, "name": "github" }

Status codes

CodeMeaning
200The request was processed. Inspect status, is_error, or removed for the real outcome.
401Missing authorization or Invalid API key
422Request 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.