list_mcp_servers
List registered MCP servers in obot to retrieve their IDs, names, runtimes, states, and connect URLs for use with Claude.ai.
Instructions
List MCP servers currently registered in obot. Returns id, name, runtime, configured-state, and the connectURL you'd hand to claude.ai.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:151-161 (handler)Handler for list_mcp_servers: calls /api/mcp-servers, maps items to summary fields (id, name, runtime, configured, missingRequiredEnvVars, connectURL), returns JSON text content.
case "list_mcp_servers": { const data = await obotFetch("/api/mcp-servers"); const summary = (data.items ?? []).map((i: any) => ({ id: i.id, name: i.manifest?.name, runtime: i.manifest?.runtime, configured: i.configured, missingRequiredEnvVars: i.missingRequiredEnvVars ?? [], connectURL: i.connectURL, })); return { content: [{ type: "text", text: JSON.stringify(summary, null, 2) }] }; - src/index.ts:54-60 (schema)Tool definition with inputSchema: list_mcp_servers takes no arguments (empty properties, additionalProperties: false).
const tools: Tool[] = [ { name: "list_mcp_servers", description: "List MCP servers currently registered in obot. Returns id, name, runtime, configured-state, and the connectURL you'd hand to claude.ai.", inputSchema: { type: "object", properties: {}, additionalProperties: false }, }, - src/index.ts:143-144 (registration)Registration via ListToolsRequestSchema handler that returns the tools array (which includes list_mcp_servers).
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools })); - src/index.ts:18-40 (helper)The obotFetch helper function used by the handler to make authenticated HTTP requests to the obot API.
async function obotFetch(path: string, init: RequestInit = {}): Promise<any> { const res = await fetch(`${OBOT_URL}${path}`, { ...init, headers: { Authorization: `Bearer ${OBOT_TOKEN}`, "Content-Type": "application/json", Accept: "application/json", ...(init.headers as Record<string, string> | undefined), }, }); const text = await res.text(); let body: unknown = text; try { body = text ? JSON.parse(text) : null; } catch { // keep raw text } if (!res.ok) { const detail = typeof body === "string" ? body : JSON.stringify(body); throw new Error(`obot ${res.status} ${res.statusText} on ${path}: ${detail}`); } return body; }