_________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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:154-181 (handler)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
- src/index.ts:61-79 (helper)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 []; } }
- src/index.ts:44-55 (helper)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; }
- src/index.ts:153-153 (schema)Empty input schema indicating the tool takes no parameters.{}, // No parameters needed