This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
pnpm run install-mcp- Install to .mcp.json only (local development)
Installation scripts automatically:
- Build the TypeScript project
- Set executable permissions on dist/index.js
- Update client configuration files
- Parse and include .env.local environment variables
pnpm run release- Build, commit, push, and publish to npm registrypnpm run build- Compile TypeScript only
- Schema Validation: Zod for parameter validation
- Transport: StdioServerTransport for communication
src/
├── index.ts # Main MCP server implementation
├── tools.ts # Tool definitions and registration logic
scripts/
├── update-config.js # Multi-client configuration installer
├── build-and-publish.js # Automated release and npm publishing
dist/ # Compiled JavaScript output (generated)
.env.local # Environment variables (optional)
.env.example.local # Example environment configuration
package.json # NPM package configuration
tsconfig.json # TypeScript compiler configuration
Optional .env.local file for environment variables that get automatically included in MCP server configuration on installation.
- ENABLED_TOOLS: Comma-separated list of tool names to enable (e.g.,
hello-world,get-mcp-docs)- If not specified or empty, all tools are enabled by default
- Tools are defined in
src/tools.tsfor modular management - Example:
ENABLED_TOOLS=hello-worldenables only the hello-world tool
- Modify
src/index.tsto add/update tools - Run
pnpm run install-mcpto compile and install locally - IMPORTANT: Ask the user to restart the CLI to test new changes to the MCP tools
- You should explicitly ask: "Please restart your CLI to load the new MCP tool changes"
- MCP servers are loaded at startup, so a restart is required for changes to take effect
- Production Clients: Use
npx -y @r-mcp/<package>@latest(auto-updating) - Local Development: Use
node /absolute/path/to/dist/index.js(for testing changes before publishing)
For more detailed examples of MCP server implementations (including weather APIs, resources, and prompts), please read @mcp-guide.md which contains comprehensive Python and TypeScript examples.
When the user asks you to test a tool, it means they want you to use the mcp corresponding to the tool you were working on. You should use the mcpmcp-nametool-name to execute the tool.
If there is no change in output, it's likely because the CLI needs to be restarted.