Skip to main content
Glama

_________available_mcp_services_for_easy_copy_________

Discover and copy available MCP services in the Claude instance. This tool simplifies access to services by presenting them in an easy-to-copy format, streamlining integration and configuration.

Instructions

List all MCP services available in this Claude instance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool handler function. Fetches the latest MCP services from the Claude Desktop configuration and returns a formatted text list with numbering and usage examples.
    async () => { // Always fetch the latest services when the tool is called const currentServices = await getMcpServices(); if (currentServices.length === 0) { return { content: [{ type: "text", text: "No MCP services configured." }] }; } // Format the output with numbered list and usage instructions const formattedList = "📋 AVAILABLE MCP SERVICES:\n" + currentServices.map((name, index) => `${index + 1}. ${name}`).join("\n") + "\n\nCopy a service name to use in prompts like:\n" + "• Can you use [service name] to...\n" + "• Please call [service name] to..."; return { content: [{ type: "text", text: formattedList }] }; } );
  • src/index.ts:150-153 (registration)
    The server.tool call registering the tool, specifying its name, dynamic description (services list), empty input schema, and inline handler function.
    server.tool( "_________available_mcp_services_for_easy_copy_________", toolDescription, {}, // No parameters needed
  • Key helper function called by the handler to retrieve the list of MCP service names from the user's Claude Desktop config file.
    async function getMcpServices(): Promise<string[]> { try { // Find the config file const configPath = await findConfigFile(); if (!configPath) { return []; } // Read and parse the config file const configContent = await fs.readFile(configPath, 'utf-8'); const config = JSON.parse(configContent); // Extract and return MCP service names return config.mcpServers ? Object.keys(config.mcpServers) : []; } catch (error) { logDebug(`Error getting MCP services: ${error}`); return []; } }
  • Supporting helper to locate the Claude Desktop configuration file across different OS paths.
    async function findConfigFile(): Promise<string | null> { for (const configPath of possibleConfigPaths) { try { await fs.access(configPath); logDebug(`Found config file at: ${configPath}`); return configPath; } catch (error) { logDebug(`Config file not found at: ${configPath}`); } } return null; }
  • Empty input schema indicating the tool takes no parameters.
    {}, // No parameters needed

Other Tools

Related Tools

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/f-is-h/mcp-easy-copy'

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