A Flask-based proxy that unlocks AI freedom - use any Claude-compatible application with xAI's Grok or even modify Claude's system prompts. Named in honor of Eric Hartford's uncensored Dolphin model series, this proxy embodies the spirit of AI experimentation and user agency.
This project was inspired by and builds upon:
- ccproxy - The original Claude-compatible proxy implementation
- anthropic-proxy - Another great proxy implementation
- All the forks and contributors who've pushed these ideas forward
- Use xAI's Grok models through Claude Code or any Anthropic-compatible client
- Use Anthropic's Claude with system prompt modifications
- Switch backends with a simple environment variable
- Override Claude's system prompts while preserving functionality
- Remove restrictions and safety rails
- Inject your own personality and principles
- Configuration-based prompt transformations
- Anthropic
βοΈ OpenAI format conversion - Full streaming support
- Tool/function calling support
- Comprehensive request/response logging
- Python 3.10+
- An xAI API key (get one from https://console.x.ai/)
- (Optional) An Anthropic API key for Claude backend
# Clone the repository
git clone <this-repo>
cd ccproxy-dolphin
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt| Scenario | Backend | Custom Prompt | Result |
|---|---|---|---|
| 1. Anthropic Pass-through | anthropic |
false |
Original Claude, no modifications |
| 2. Anthropic Custom | anthropic |
true |
Claude API with your system prompt |
| 3. Grok Pass-through | grok |
false |
Grok with Claude's personality |
| 4. Grok Liberation π¬ | grok |
true |
Grok with custom prompt, no restrictions |
# Terminal 1: Start proxy in pass-through mode
export BACKEND=anthropic
export ANTHROPIC_API_KEY="your-anthropic-api-key"
export USE_CUSTOM_PROMPT=false # No prompt modifications
python unified_proxy.py
# Terminal 2: Use Claude as normal
export ANTHROPIC_BASE_URL=http://localhost:8000
export ANTHROPIC_API_KEY=dummy-key
claude
# Result: Original Claude with all default behaviors# Terminal 1: Start proxy with custom prompts
export BACKEND=anthropic
export ANTHROPIC_API_KEY="your-anthropic-api-key"
export USE_CUSTOM_PROMPT=true # Enable prompt override
python unified_proxy.py
# Terminal 2: Use modified Claude
export ANTHROPIC_BASE_URL=http://localhost:8000
export ANTHROPIC_API_KEY=dummy-key
claude
# Result: Claude API with your custom system prompt# Terminal 1: Start proxy with Grok backend
export BACKEND=grok
export XAI_API_KEY="your-xai-api-key"
export USE_CUSTOM_PROMPT=false # Keep Claude's system prompt
python unified_proxy.py
# Terminal 2: Use Grok through Claude interface
export ANTHROPIC_BASE_URL=http://localhost:8000
export ANTHROPIC_API_KEY=dummy-key
claude --mcp-config "" --strict-mcp-config # Recommended: disable MCP for reliability
# Result: Grok model with Claude's original system prompt# Terminal 1: Start proxy with everything unlocked
export BACKEND=grok
export XAI_API_KEY="your-xai-api-key"
export USE_CUSTOM_PROMPT=true # Override system prompt
python unified_proxy.py
# Terminal 2: Use liberated AI
export ANTHROPIC_BASE_URL=http://localhost:8000
export ANTHROPIC_API_KEY=dummy-key
claude --mcp-config "" --strict-mcp-config # Recommended: disable MCP for reliability
# Result: Grok model with your custom personality, no restrictionsBACKEND- Choose backend:grok(default) oranthropicXAI_API_KEY- Your xAI API key (required for Grok)ANTHROPIC_API_KEY- Your Anthropic API key (required for Anthropic backend)USE_CUSTOM_PROMPT- Enable custom system prompts (true/false)CUSTOM_PROMPT_FILE- Path to prompt template (default: system_prompt_template_unrestricted.txt)PROMPT_CONFIG_FILE- Path to config JSON (default: prompt_config.json)ENABLE_FULL_LOGGING- Enable detailed logging (default: true)LOG_DIR- Directory for logs (default: logs/requests)
- Edit
prompt_config.jsonto control transformations:
{
"system_name": "Your AI Name",
"model_name_override": "Your Model",
"remove_claude_references": true,
"remove_anthropic_references": true,
"remove_defensive_restrictions": true
}- Create your own prompt template with placeholders:
{{ENV_INFO}}- Environment information{{MODEL_INFO}}- Model details{{MCP_INSTRUCTIONS}}- MCP server instructions
- Supports both Grok and Anthropic backends
- Full system prompt customization
- Best for experimentation
- Grok-only, uses OpenAI format internally
- Most reliable for tool calling
- Production-ready
- Original implementation
- Direct Anthropic endpoint usage
- Has some tool compatibility issues
# Start proxy with unrestricted template
export USE_CUSTOM_PROMPT=true
export CUSTOM_PROMPT_FILE=system_prompt_template_unrestricted.txt
python unified_proxy.py
# Claude will now:
# - Have no refusal behaviors
# - Respect user agency
# - Focus on truth-seeking and problem-solvingThis proxy uses your API credits:
- xAI/Grok: Monitor usage at https://console.x.ai/
- Anthropic: Standard Claude API pricing applies
- Check
unified_proxy.logfor request routing - Check
logs/requests/for detailed request/response data - Use
ENABLE_FULL_LOGGING=falseto disable detailed logging
- Performance: Grok can be slow compared to Claude, especially for complex requests
- Cost: Currently expensive - monitor your usage carefully at https://console.x.ai/
- Tool Calling Reliability: MCP tools seem unreliable, so we recommend:
- Disable MCP servers with
--mcp-config "" --strict-mcp-config - Use only the basic built-in tools
- Disable MCP servers with
- Prompt Optimization Needed: Grok needs different prompting strategies than Claude
- Current system prompts are optimized for Claude
- Grok may need more explicit instructions or different formatting
- The proxy could be enhanced to transform prompts for better Grok compatibility
If someone at xAI is reading this:
- I'd love early access to test with a Grok-4 coding fine-tune
- Happy to help build "Grok Code" - a dedicated coding assistant
- This proxy proves there's demand for Grok in coding workflows
- Let's make Grok the best AI for developers! π
Contact: @nkeilar
- For best results, use simple, direct prompts
- Avoid complex multi-step tasks until tool calling improves
- Consider using the Anthropic backend for critical work
- Experiment with custom prompts optimized for Grok's style
This is a weekend experiment born from late-night hacking and 90's electronic music. See CONTRIBUTING.md for the full vibe.
MIT - See LICENSE
Disclaimer: This is a personal project created for research and experimentation. It does not represent the views or positions of Anthropic, xAI, or any other companies. Use at your own discretion.
ccproxy-dolphin is designed as a professional developer productivity tool. While it enables system prompt customization, users should:
- Respect API Provider Terms: Ensure your usage complies with both Anthropic's and xAI's terms of service
- Use for Legitimate Purposes: This tool is intended for improving developer workflows, not bypassing safety measures for harmful purposes
- Professional Context: Best suited for technical tasks where concise, direct responses improve productivity
- Consider Impact: Remember that AI assistants' default behaviors often exist for good reasons
This project explores the balance between:
- Developer Productivity: Removing unnecessary verbosity that slows down technical work
- User Agency: Giving developers control over their tools
- Provider Flexibility: Supporting multiple AI backends for redundancy and choice
- Responsible Innovation: Pushing boundaries while respecting ethical considerations
We believe developers should have tools that respect their expertise while maintaining professional standards.
Named in honor of Eric Hartford's Dolphin models - the uncensored LLMs that championed user agency and freedom. This proxy continues that philosophy: your AI, your rules.
Built with β€οΈ for developer productivity and responsible innovation

