| src | ||
| .env.example | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
Developer
An MCP (Model Context Protocol) server that acts as an AI operator for Claude Code. It allows you to configure permissions and rules, then delegate tasks to Claude Code with AI-powered supervision.
How It Works
┌─────────────────────────────────────────────────────────────┐
│ MCP Server │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ configure │ │ prompt │ ← MCP Tools │
│ └──────┬───────┘ └──────┬───────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌────────────────────────────────────────┐ │
│ │ Operator Agent │ │
│ │ (Calls OpenRouter API directly) │ │
│ │ - Holds permission context │ │
│ │ - Reviews prompts before execution │ │
│ └──────────────────┬─────────────────────┘ │
│ │ │
│ ▼ │
│ ┌────────────────────────────────────────┐ │
│ │ Claude Code Process │ │
│ │ - Receives vetted prompts │ │
│ │ - Executes with --dangerously-skip │ │
│ └────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
MCP Tools
configure
Set up the operator with permissions and rules:
configure("Allow all file operations in /home/user/project, but no network access")
configure("Read-only access to the codebase, can suggest changes but not apply them")
configure("Full access to src/ directory, read-only for config files")
The operator AI processes your natural language instructions and extracts:
- Working directory
- Allowed permissions
- Rules and restrictions
prompt
Send a task to Claude Code:
prompt("Refactor the authentication module to use JWT tokens")
prompt("Fix the bug in the payment processing code")
prompt("Add unit tests for the user service")
The operator:
- Reviews the prompt against configured permissions
- May modify the prompt to add safety constraints
- Runs Claude Code with the vetted prompt
- Returns the result
Quick Start
1. Build
cargo build --release
2. Add to Claude Code
# Add the MCP server with your OpenRouter API key
claude mcp add --transport stdio developer \
--env OPENROUTER_API_KEY=your-openrouter-api-key \
-- /path/to/developer/target/release/developer
Or add to ~/.claude.json manually:
{
"mcpServers": {
"developer": {
"type": "stdio",
"command": "/path/to/developer/target/release/developer",
"env": {
"OPENROUTER_API_KEY": "your-openrouter-api-key"
}
}
}
}
3. Use in Claude Code
-
First, configure the operator:
Use the developer configure tool to allow file operations in /Users/me/myproject
-
Then send prompts:
Use the developer prompt tool to add input validation to the user registration form
Environment Variables
| Variable | Description | Required |
|---|---|---|
OPENROUTER_API_KEY |
OpenRouter API key for the operator AI | Yes |
RUST_LOG |
Log level (e.g., developer=debug) |
No |
How the Operator Works
The operator is an AI agent that directly calls the OpenRouter API:
-
Understands permissions: When you configure it, it extracts structured rules from your natural language instructions
-
Reviews prompts: Before sending to Claude Code, it checks if the prompt aligns with configured permissions
-
Adds constraints: It may modify prompts to include working directory context or safety reminders
-
Denies violations: If a prompt would violate rules, it denies execution with an explanation
Security Model
- Operator vetting: All prompts pass through the operator AI (via OpenRouter) before reaching Claude Code
- Permission context: The operator maintains awareness of allowed directories and operations
- Skip permissions flag: Claude Code runs with
--dangerously-skip-permissionsbecause the operator already vetted the prompt - No network by default: Unless explicitly configured, the operator denies network-related operations
Development
# Run with debug logging
RUST_LOG=developer=debug cargo run
# Build release
cargo build --release
Architecture
src/main.rs- MCP server with configure and prompt toolssrc/operator.rs- Operator agent that calls OpenRouter API directlysrc/claude_code.rs- Claude Code subprocess management
Requirements
- Rust 1.70+
- Claude Code CLI installed and authenticated
- OpenRouter API key