This guide is for developers who want to contribute to this server, run it directly from a cloned repository, or use npm link for local testing.
For general users, the recommended methods (global NPM install or npx) are covered in the main README.md.
This method is suitable if you prefer not to install the server globally or want to manage it directly within a specific path for development or testing.
-
Clone the repository:
git clone https://github.com/steipete/claude-code-mcp.git # Or your fork/actual repo URL cd claude-code-mcp
-
Install dependencies: This will also install
tsxfor direct TypeScript execution viastart.sh.npm install
-
Make the start script executable:
chmod +x start.sh
-
Configure MCP Client for
start.sh: Update yourmcp.jsonfile (e.g.,~/.codeium/windsurf/mcp_config.jsonor~/.cursor/mcp.json) to point to thestart.shscript:{ "mcpServers": { "claude_code": { "type": "stdio", "command": ["/absolute/path/to/claude-mcp-server/start.sh"], "args": [] } // ... other MCP server configurations } }Important: Replace
/absolute/path/to/claude-mcp-serverwith the actual absolute path to where you cloned the server. -
First-Time Claude CLI Permissions: As mentioned in the main README, ensure you've run the Claude CLI once with
--dangerously-skip-permissionsto accept terms:claude -p "hello" --dangerously-skip-permissions # Or ~/.claude/local/claude -p "hello" --dangerously-skip-permissions
-
Environment Variables for
start.sh(Optional): You can customize the server behavior by setting environment variables before runningstart.shor by editing thestart.shscript itself:CLAUDE_CLI_PATH: Set a custom absolute path to the Claude CLI executable.MCP_CLAUDE_DEBUG: Set totrueto enable verbose debug logging from the MCP server.CLAUDE_CLI_TOOLS_DEFAULT: Comma-separated list of default tools.CLAUDE_CLI_TOOLS_DANGEROUS: Comma-separated list of tools to always enable. Refer tostart.shand the main README's "Configuration via Environment Variables" section for more details.
This method allows you to install the package globally but have it point to your local cloned repository. This is useful for testing the global command (claude-code-mcp) with your local changes.
-
Clone the repository (if not already done):
git clone https://github.com/steipete/claude-code-mcp.git # Or your fork/actual repo URL cd claude-code-mcp
-
Install dependencies and build:
npm install # Install dependencies npm run build # Compile TypeScript to the dist/ directory
-
Link the package: This makes
claude-code-mcp(as defined inpackage.json'sbinfield) available globally, pointing to your localdist/server.js.npm link
After linking, running
claude-code-mcpin your terminal will execute your local build. -
Configure MCP Client for Linked Command: Update your
mcp.jsonfile to use theclaude-code-mcpcommand (which now points to your local linked version):{ "mcpServers": { "claude_code": { "type": "stdio", "command": ["claude-code-mcp"], "args": [], "env": { "MCP_CLAUDE_DEBUG": "false" // Or "true" for debugging // You can set other ENV VARS here too if needed for the linked command } } } } -
Rebuilding after changes: If you make changes to the TypeScript source (
src/), you'll need to rebuild fornpm linkto reflect them:npm run build
There's no need to run
npm linkagain unlesspackage.json(especially thebinfield) changes.
- TypeScript: The server is written in TypeScript. Code is in the
src/directory and compiled todist/. - Prerequisites: Ensure Node.js v20+ and a working Claude CLI are installed.
- Contributing: Submit issues and pull requests to the main GitHub repository.