mcp.*
MCP server management RPC methods
MCP (Model Context Protocol) methods manage external MCP servers — add, update, delete, start, stop, and query capabilities from servers that expose tools, resources, and prompts via the MCP protocol.
Methods
mcp.list
List all configured MCP servers and their status.
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "mcp.list",
"params": {}
}Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"servers": [
{
"id": "filesystem",
"name": "File System",
"transport": "stdio",
"status": "running",
"healthy": true,
"tools_count": 5,
"resources_count": 0,
"prompts_count": 0
}
]
}
}mcp.add
Add a new MCP server configuration.
Request:
{
"jsonrpc": "2.0",
"id": 2,
"method": "mcp.add",
"params": {
"config": {
"id": "filesystem",
"name": "File System",
"transport": "stdio",
"command": "npx",
"args": ["@modelcontextprotocol/server-filesystem", "/home/user"],
"requires_runtime": "node"
}
}
}Response:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"ok": true
}
}Config Fields:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique server identifier |
name | string | Yes | Display name |
transport | string | Yes | "stdio" or "http" |
command | string | No | Command to run (for stdio) |
args | string[] | No | Command arguments |
url | string | No | HTTP URL (for http transport) |
env | object | No | Environment variables |
requires_runtime | string | No | Runtime requirement (e.g., "node") |
mcp.update
Update an existing MCP server configuration (uses upsert semantics).
Request:
{
"jsonrpc": "2.0",
"id": 3,
"method": "mcp.update",
"params": {
"config": {
"id": "filesystem",
"name": "File System Updated",
"args": ["@modelcontextprotocol/server-filesystem", "/home/user", "/tmp"]
}
}
}Response:
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"ok": true
}
}mcp.delete
Delete an MCP server configuration.
Request:
{
"jsonrpc": "2.0",
"id": 4,
"method": "mcp.delete",
"params": {
"id": "filesystem"
}
}Response:
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"ok": true
}
}mcp.status
Get detailed status of a specific MCP server.
Request:
{
"jsonrpc": "2.0",
"id": 5,
"method": "mcp.status",
"params": {
"id": "filesystem"
}
}Response:
{
"jsonrpc": "2.0",
"id": 5,
"result": {
"id": "filesystem",
"name": "File System",
"transport": "stdio",
"status": "running",
"pid": 12345,
"uptime_seconds": 3600,
"restart_count": 0
}
}mcp.start
Start a stopped MCP server.
Request:
{
"jsonrpc": "2.0",
"id": 6,
"method": "mcp.start",
"params": {
"id": "filesystem"
}
}mcp.stop
Stop a running MCP server.
Request:
{
"jsonrpc": "2.0",
"id": 7,
"method": "mcp.stop",
"params": {
"id": "filesystem"
}
}mcp.restart
Restart an MCP server.
Request:
{
"jsonrpc": "2.0",
"id": 8,
"method": "mcp.restart",
"params": {
"id": "filesystem"
}
}mcp.tools
List all tools exposed by all healthy MCP servers (aggregated view).
Request:
{
"jsonrpc": "2.0",
"id": 9,
"method": "mcp.tools",
"params": {}
}Response:
{
"jsonrpc": "2.0",
"id": 9,
"result": {
"tools": [
{
"name": "read_file",
"description": "Read contents of a file",
"server": "filesystem"
}
]
}
}mcp.resources
List all resources exposed by all healthy MCP servers.
Request:
{
"jsonrpc": "2.0",
"id": 10,
"method": "mcp.resources",
"params": {}
}mcp.prompts
List all prompts exposed by all healthy MCP servers.
Request:
{
"jsonrpc": "2.0",
"id": 11,
"method": "mcp.prompts",
"params": {}
}mcp.list_pending_approvals
List all pending MCP approval requests awaiting user response.
Request:
{
"jsonrpc": "2.0",
"id": 12,
"method": "mcp.list_pending_approvals",
"params": {}
}Response:
{
"jsonrpc": "2.0",
"id": 12,
"result": []
}:::note This method currently returns an empty array as the approval handler integration is pending. :::
mcp.respond_approval
Submit a user's response to an MCP approval request.
Request:
{
"jsonrpc": "2.0",
"id": 13,
"method": "mcp.respond_approval",
"params": {
"request_id": "req-123",
"approved": true,
"reason": "Looks safe"
}
}Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
request_id | string | Yes | Approval request ID |
approved | boolean | Yes | Whether to approve |
reason | string | No | Optional reason for the decision |
mcp.cancel_approval
Cancel a pending MCP approval request.
Request:
{
"jsonrpc": "2.0",
"id": 14,
"method": "mcp.cancel_approval",
"params": {
"request_id": "req-123"
}
}See Also
- Methods Reference -- All method namespaces
- Architecture: Gateway -- Gateway architecture