Install the dependencies:
npm installStart your MCP server with:
npm run startYour server will be running at http://localhost:3000/mcp.
You can quickly try it out with the command below:
bunx @modelcontextprotocol/[email protected] \
  --cli http://localhost:3000/mcp \
  --transport http \
  --method tools/listOr try it out interactively using the inspector:
bunx @modelcontextprotocol/[email protected]To connect your tool to Claude Desktop:
- Open Claude Desktop.
- Go to Settings > Developer > Edit Config.
- Add your MCP server to the configuration using mcp-proxy:
{
  "mcpServers": {
    "counting": {
      "command": "mcp-proxy",
      "args": [
        "http://localhost:3000/sse"
      ]
    }
  }
}NOTE:
mcp-proxy(repo) enables Claude Desktop (which currently supports only thestdiotransport of the MCP spec) to connect to your MCP Server viaHTTP+SSEprotocol by translating between the two. Ensuremcp-proxyis installed and accessible in your system's PATH.
Restart Claude Desktop, and your tool will be available.
Now you can ask Claude: "How many 'R's are in 'strawberry'?"
Claude should use your counting tool to provide the correct answer.
