Misar Docs
MisarMailMisar.BlogMisarReachMisarPostMisar.DevMisar PlatformMisar IdentityMisar Posts API
Api Reference

MCP Management API

REST endpoints for configuring, listing, invoking, and disconnecting Model Context Protocol servers programmatically.

Overview

The MCP Management API lets you manage Model Context Protocol server connections at runtime without restarting the extension. Use it to build dynamic integrations, CI pipelines, or admin tooling that needs to configure MCP servers programmatically.

All endpoints require authentication:

Authorization: Bearer YOUR_API_KEY

Configure Servers

POST/mcp/configure

Register one or more MCP servers. Existing servers with the same name are replaced.

Request body

Each entry in servers accepts:

namestringbodyrequired

Unique server identifier.

commandstringbodyrequired

Executable to spawn.

argsstring[]bodyrequired

Arguments passed to the command.

transportstringbodyrequired

Always "stdio".

envobjectbody

Additional environment variables for the server process.

Response fields

configurednumber

Count of servers registered.

serversstring[]

Names of the configured servers.

{
  "servers": [
    {
      "name": "filesystem",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
      "transport": "stdio",
      "env": {}
    },
    {
      "name": "github",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "transport": "stdio",
      "env": {
        "GITHUB_TOKEN": "ghp_..."
      }
    }
  ]
}
{
  "configured": 2,
  "servers": ["filesystem", "github"]
}

Avoid hardcoding secrets in env values when calling this endpoint from client-side code. Prefer injecting secrets server-side or using the .misar/mcp.json file with ${env:VAR} interpolation.

List Active Servers

GET/mcp/servers

List all active MCP servers and their runtime status.

Response fields

Each entry in servers includes:

namestring

Server identifier.

statusstring

running | starting | error | stopped.

tool_countnumber

Number of tools registered by this server.

started_atstring

ISO 8601 timestamp of when the server process started.

{
  "servers": [
    {
      "name": "filesystem",
      "status": "running",
      "tool_count": 5,
      "started_at": "2026-03-21T10:00:00Z"
    },
    {
      "name": "github",
      "status": "running",
      "tool_count": 12,
      "started_at": "2026-03-21T10:00:01Z"
    }
  ]
}

List Available Tools

GET/mcp/tools

Returns all tools across all active servers, merged into a single flat list.

Response fields

toolsArray<object>

Each tool includes server, name, description, and input_schema.

totalnumber

Total number of tools across all servers.

{
  "tools": [
    {
      "server": "filesystem",
      "name": "read_file",
      "description": "Read a file from the filesystem.",
      "input_schema": {
        "type": "object",
        "properties": {
          "path": { "type": "string" }
        },
        "required": ["path"]
      }
    }
  ],
  "total": 17
}

Invoke a Tool

POST/mcp/call

Call an MCP tool directly without going through the agent loop.

Request body

serverstringbodyrequired

Name of the server hosting the tool.

toolstringbodyrequired

Name of the tool to invoke.

argumentsobjectbodyrequired

Arguments matching the tool's input schema.

Response fields

serverstring

The server that handled the call.

toolstring

The tool that was invoked.

resultobject

The tool's return value.

duration_msnumber

Execution time in milliseconds.

{
  "server": "filesystem",
  "tool": "read_file",
  "arguments": {
    "path": "/tmp/output.json"
  }
}
{
  "server": "filesystem",
  "tool": "read_file",
  "result": {
    "content": "{ \"status\": \"ok\" }"
  },
  "duration_ms": 12
}
{
  "error": {
    "type": "tool_error",
    "message": "File not found: /tmp/output.json"
  }
}

Disconnect a Server

POST/mcp/remove

Stop and remove a running MCP server. Any pending tool calls on this server will fail.

Request body

namestringbodyrequired

Name of the server to disconnect.

Response fields

removedstring

Name of the removed server.

statusstring

Final state, e.g. stopped.

{ "name": "filesystem" }
{ "removed": "filesystem", "status": "stopped" }

Disconnecting a server does not modify .misar/mcp.json. If the extension restarts, the server will be reconnected from the config file. To permanently remove a server, delete its entry from .misar/mcp.json as well.