MCP Servers API
Base path: /api/mcp-servers
GET /api/mcp-servers
List all registered MCP servers.
Response 200:
[ { "id": "mcp_builtin", "name": "LTG Built-in MCP Server", "url": "http://mcp-server:4000", "description": "Portal-native tools for products, subscriptions, storage, and integrations", "tools": [ { "name": "ping", "description": "Test connectivity" }, { "name": "list_products", "description": "List all API products" } ], "toolCount": 16, "lastDiscovery": "2024-01-15T10:00:00.000Z", "createdAt": "2024-01-15T09:00:00.000Z" }]GET /api/mcp-servers/:id
Get a single server including all cached tool definitions.
POST /api/mcp-servers
Register a new MCP server.
Request body:
{ "name": "My Custom MCP Server", "url": "http://my-server:5000", "description": "Custom tools for our internal systems"}PUT /api/mcp-servers/:id
Update server configuration.
DELETE /api/mcp-servers/:id
Unregister a server. Agents that referenced it will lose those tools on the next run.
POST /api/mcp-servers/:id/discover
Discover (or re-discover) tools from the server. Calls POST /mcp with a tools/list request and caches the result.
Response 200:
{ "toolCount": 16, "tools": [ { "name": "list_products", "description": "List all API products with status, category, and tags", "inputSchema": { "type": "object", "properties": {}, "required": [] } } ]}POST /api/mcp-servers/:id/call-tool
Execute a tool directly on the server.
Request body:
{ "toolName": "connectwise_psa_get_tickets", "arguments": { "status": "open", "company": "Acme Corp", "limit": 10 }}Response 200:
{ "content": [ { "type": "text", "text": "[{\"id\":12345,\"summary\":\"Server outage\",\"status\":\"New\",...}]" } ]}