Skip to main content
Glama

list_mcp_servers

Discover configured MCP servers on the Letta server to identify available tools and resources for system management.

Instructions

List all configured MCP servers on the Letta server. Use with list_mcp_tools_by_server to explore available tools from each server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that executes the list_mcp_servers tool logic by fetching MCP servers from the API endpoint '/tools/mcp/servers' and returning them as JSON.
    export async function handleListMcpServers(server, _args) { try { const headers = server.getApiHeaders(); // Use the specific endpoint from the OpenAPI spec const response = await server.api.get('/tools/mcp/servers', { headers }); const servers = response.data; // Assuming response.data is an object mapping server names to configs return { content: [ { type: 'text', text: JSON.stringify({ server_count: Object.keys(servers).length, servers: servers, }), }, ], }; } catch (error) { server.createErrorResponse(error); } }
  • The tool definition including name, description, and input schema (no parameters required).
    export const listMcpServersDefinition = { name: 'list_mcp_servers', description: 'List all configured MCP servers on the Letta server. Use with list_mcp_tools_by_server to explore available tools from each server.', inputSchema: { type: 'object', properties: {}, // No input arguments needed required: [], }, };
  • Registration of the tool handler in the central switch statement for tool dispatching within registerToolHandlers.
    case 'list_mcp_servers': return handleListMcpServers(server, request.params.arguments);
  • Inclusion of the tool definition in the allTools array for registration with the server.
    listMcpToolsByServerDefinition, listMcpServersDefinition,
  • Import of the handler and definition from the implementation file.
    import { handleListMcpServers, listMcpServersDefinition } from './mcp/list-mcp-servers.js';

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/oculairmedia/Letta-MCP-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server