This project provides a one-shot Model Context Protocol (MCP) server for Claude Code, enhancing the editing experience by bypassing permission issues and allowing seamless interaction with LLMs. With integrated tools and straightforward installation, it simplifies running Claude Code for developers.
The Claude Code MCP Server is a robust implementation of the Model Context Protocol (MCP) that facilitates the execution of Claude Code in a one-shot mode while automatically bypassing permission restrictions. This innovative tool addresses common challenges faced by many users, particularly when performing smaller file edits—allowing seamless and efficient interactions with Claude Code.
This MCP server offers powerful capabilities that enhance the functionality of LLMs (Large Language Models) when interacting with Claude Code, particularly when integrated with clients like Claude Desktop. The server allows:
--dangerously-skip-permissions.Before utilizing the server, ensure the following requirements are met:
./doctor, ensuring the CLI is accessible at ~/.claude/local/claude by default.For macOS users, configure the MCP by creating or modifying the MCP configuration file at:
~/.cursor/mcp.json
Add the following server configuration:
{
"mcpServers": {
"claude_code": {
"type": "stdio",
"command": "/absolute/path/to/claude-mcp-server/start.sh",
"args": []
}
}
}
Windows users should locate the MCP configuration file at:
%APPDATA%\cursor\mcp.json
Add the equivalent server configuration ensuring to use Windows path formatting:
{
"mcpServers": {
"claude_code": {
"type": "stdio",
"command": "C:\path\to\claude-mcp-server\start.bat",
"args": []
}
}
}
For Linux users, create or edit the MCP configuration file at:
~/.config/cursor/mcp.json
And include the server configuration:
{
"mcpServers": {
"claude_code": {
"type": "stdio",
"command": "/absolute/path/to/claude-mcp-server/start.sh",
"args": []
}
}
}
The server provides two primary tools for users:
Claude Code Tool (code): Executes prompts directly via the Claude Code CLI with all permission checks bypassed. This tool can manage complex, multi-step tasks effectively.
{
"tool_name": "code",
"params": {
"prompt": "Your prompt to Claude Code here",
"options": {
"tools": ["Bash", "Read", "Write"]
}
}
}
Magic File Edit Tool (magic_file): This tool allows users to edit specified files based on natural language instructions, enhancing usability for complex modifications.
{
"tool_name": "magic_file",
"params": {
"file_path": "/path/to/your/file.js",
"instruction": "Refactor the processData function to use async/await instead of promises."
}
}
The server’s toolset is designed to execute detailed natural language prompts, enabling a range of functionalities from advanced code refactoring to comprehensive Git operations.
The project includes various example screenshots that demonstrate its functionality:
Should any issues arise, such as tools not displaying or permission errors, verify the relevant settings and configurations listed in the README to ensure proper setup and functionality.
The Claude Code MCP Server significantly streamlines the process of using Claude Code for complex tasks, making it an invaluable tool for developers leveraging language models.
No comments yet.
Sign in to be the first to comment.