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
/mcp/configureRegister one or more MCP servers. Existing servers with the same name are replaced.
Request body
Each entry in servers accepts:
namestringbodyrequiredUnique server identifier.
commandstringbodyrequiredExecutable to spawn.
argsstring[]bodyrequiredArguments passed to the command.
transportstringbodyrequiredAlways "stdio".
envobjectbodyAdditional environment variables for the server process.
Response fields
configurednumberCount 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
/mcp/serversList all active MCP servers and their runtime status.
Response fields
Each entry in servers includes:
namestringServer identifier.
statusstringrunning | starting | error | stopped.
tool_countnumberNumber of tools registered by this server.
started_atstringISO 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
/mcp/toolsReturns 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.
totalnumberTotal 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
/mcp/callCall an MCP tool directly without going through the agent loop.
Request body
serverstringbodyrequiredName of the server hosting the tool.
toolstringbodyrequiredName of the tool to invoke.
argumentsobjectbodyrequiredArguments matching the tool's input schema.
Response fields
serverstringThe server that handled the call.
toolstringThe tool that was invoked.
resultobjectThe tool's return value.
duration_msnumberExecution 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
/mcp/removeStop and remove a running MCP server. Any pending tool calls on this server will fail.
Request body
namestringbodyrequiredName of the server to disconnect.
Response fields
removedstringName of the removed server.
statusstringFinal 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.