- Home
- MCP servers
- Claude Code
Claude Code
- python
0
GitHub Stars
python
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"marc-shade-claude-code-control-mcp": {
"command": "python3",
"args": [
"${AGENTIC_SYSTEM_PATH:-/opt/agentic}/mcp-servers/claude-code-control-mcp/server.py"
],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}You can automate coding tasks with Claude Code Control MCP Server, a bridge that lets AI agents run coding tasks through the Model Context Protocol. It tracks file changes, executes shell commands, searches code, and reports real-time status so you can build autonomous workflows with confidence.
How to use
Connect to the Claude Code Control MCP Server from your MCP client to run autonomous coding tasks. You can request code tasks, have the server read and modify files, run commands, search the codebase, and receive status updates and histories of each execution. Use it within workflows or orchestration tools to delegate coding work to Claude Sonnet 4.5 while you monitor results and file changes.
To start, ensure the MCP client can reach the Claude Code Control MCP Server through the configured method. The server is designed to be invoked locally via a Python runtime, reading the API key from an environment variable and executing tasks via the Claude AI executor. You will typically initiate tasks by calling the MCP tool execute_code_task with a structured task description, a working directory, and any relevant context files. The server will perform iterations, track file changes, and return a final report that includes the outcome, any code changes, and a summary of tool usage.
For long-running or multi-step tasks, you can rely on the tracker to monitor file changes across reads, writes, edits, and deletions. You will receive a detailed file_changes object that shows which files were created, modified, or removed, along with metadata such as file hashes and timestamps. If you need to inspect progress mid-task, request the current execution status to see the latest iteration count and success flag.
How to install
Prerequisites: Python 3.x and access to the Claude Code working environment. You will also need an Anthropic API key with permission to use Claude Sonnet 4.5.
# 1) Install dependencies for the Claude Code Control MCP Server
cd ${AGENTIC_SYSTEM_PATH:-/opt/agentic}/mcp-servers/claude-code-control-mcp
pip3 install -r requirements.txt
# 2) Set API key for Anthropic Claude Sonnet 4.5
export ANTHROPIC_API_KEY="sk-ant-..."
# 3) Register the MCP server with Claude Code client
# You will create or edit the MCP registration file to include this server
# See the registration snippet below for the exact config
- Add the MCP server configuration for Claude Code Control to your Claude Code client configuration file, using the provided path to the server script as the runtime. This enables the client to start and communicate with the MCP server.
Starting and using the MCP server
- Start or restart Claude Code after completing the registration. The runtime will load the server script and begin listening for MCP tool calls.
# Exit any current session and restart Claude Code so the MCP server registers
# This is typically handled by your environment or the Claude Code launcher
Available tools
execute_code_task
Execute a coding task using Claude AI with autonomous tool use. The task is described in natural language and run with a specified working directory and context files.
read_codebase
Read and analyze multiple files using glob patterns to gather context for tasks.
search_code
Search for code patterns across the codebase and return matched locations.
modify_files
Apply batch changes to multiple files, including writes and edits, while tracking file changes.
run_commands
Execute shell commands with output capture and return exit status, stdout, and stderr.
get_execution_status
Query the current or recent execution to retrieve progress and history.