Skip to main content
Glama

claude-safe-mcp

by saxyguy81

🚀 Claude Proxy

A secure HTTP API proxy for Anthropic Claude with comprehensive safety controls, permission management, and seamless integration with VS Code AI assistants.

⚡ Quick Start (One Command)

git clone https://github.com/saxyguy81/claude-proxy.git && cd claude-proxy && ./install.sh && code .

That's it! The API proxy starts automatically when you open VS Code.

🎯 Features

🔒 Enterprise-Grade Safety

  • Permission Management: Interactive approval for dangerous operations
  • Dangerous Pattern Detection: Blocks rm -rf, format, delete, etc.
  • Tool Restrictions: Configurable allowlists for Claude tools
  • Request Monitoring: Complete logging of all API interactions

🌐 Universal API Compatibility

  • OpenAI API Format: /v1/chat/completions endpoint
  • Claude API Format: /v1/messages endpoint
  • Model Mapping: Automatic translation between API formats
  • Standards Compliant: Works with any OpenAI-compatible tool

🛠️ VS Code Integration

  • Automatic Startup: Server starts when you open workspace
  • Pre-configured Extensions: Cline, Continue, Roo Code ready to use
  • Background Tasks: Start/stop/restart through VS Code commands
  • Real-time Monitoring: Permission prompts and request logs

🚀 Supported AI Assistants

Cline - Pre-configured, zero setup
Continue - Pre-configured, zero setup
Roo Code - Environment variables set
Cursor IDE - Manual configuration (5 minutes)
Any OpenAI-compatible tool - Just point to http://localhost:8081/v1

🏗️ Architecture

┌─────────────────┐ HTTP API ┌─────────────────┐ Safety Layer ┌─────────────────┐ │ AI Assistant │ ──────────────→ │ API Proxy │ ─────────────────→ │ Claude CLI │ │ (Cline, etc.) │ ←────────────── │ (Port 8081) │ ←───────────────── │ (Anthropic) │ └─────────────────┘ JSON/HTTP └─────────────────┘ Permission Mgmt └─────────────────┘

📋 Manual Setup (5 Minutes)

1. Install and Start

git clone https://github.com/saxyguy81/claude-proxy.git cd claude-proxy npm install npm start

2. Configure Your AI Assistant

For Cline Extension
{ "cline.apiProvider": "openai", "cline.openaiApiKey": "dummy-key-not-needed", "cline.openaiBaseUrl": "http://localhost:8081/v1", "cline.openaiModelId": "gpt-4" }
For Continue Extension
{ "continue.apiBase": "http://localhost:8081/v1", "continue.apiKey": "dummy-key-not-needed", "continue.modelName": "gpt-4" }
For Roo Code
export OPENAI_API_BASE=http://localhost:8081/v1 export OPENAI_MODEL=gpt-4
For Cursor IDE
  • Settings → Models → Custom API Base: http://localhost:8081/v1
  • Model: gpt-4
  • API Key: dummy-key-not-needed

🔍 Verify It's Working

# Health check curl http://localhost:8081/health # List models curl http://localhost:8081/v1/models # Test chat completion curl -X POST http://localhost:8081/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4", "messages": [{"role": "user", "content": "Hello!"}], "max_tokens": 50 }'

🛡️ Safety in Action

When an AI assistant tries to use dangerous tools, you'll see:

🔐 Permission Request Tool: Bash Command: rm -rf temp/ ⚠️ DANGEROUS PATTERN DETECTED: rm -rf Allow this operation? [y/N/always]:

⚙️ Configuration

Default Config (claude-proxy.json)

{ "allowedTools": ["Read", "Edit", "Bash", "Write", "Glob", "Grep"], "requirePermissionFor": ["Bash", "Edit", "Write"], "dangerousPatterns": ["rm -rf", "format", "delete", "DROP TABLE", "sudo"], "safety": { "requireApproval": true, "autoApprovePatterns": ["ls", "pwd", "cat"] }, "maxConcurrentRequests": 5 }

VS Code Workspace Settings

The automated setup creates .vscode/settings.json with:

  • Extension configurations for Cline, Continue
  • Environment variables for terminals
  • Auto-start task configuration

🧪 Testing & Quality

  • 60 comprehensive tests - All passing
  • 78.62% code coverage - Production ready
  • API Server: 76.51% coverage
  • Safety Proxy: 98.22% coverage
  • Zero lint errors - Clean codebase

📚 Documentation

🔧 Commands

# Development npm start # Start the API proxy npm test # Run test suite npm run lint # Check code quality # VS Code Integration npm run start # Start with auto-reload code . # Open in VS Code (auto-starts proxy)

🚨 Troubleshooting

Port Already in Use

# Kill existing processes pkill -f api-cli.js # Or use different port npm start -- --port 8082

VS Code Extensions Can't Connect

  1. Check server status: curl http://localhost:8081/health
  2. Verify extension settings in VS Code
  3. Restart VS Code or reload window

🔄 Updates

git pull origin main npm install ./install.sh

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes with tests
  4. Run npm test and npm run lint
  5. Submit a pull request

📝 License

MIT - see LICENSE file for details.

🙏 Acknowledgments

  • Anthropic for Claude and the Claude CLI
  • VS Code extension developers for Cline, Continue, and other AI assistants
  • Open source community for tools and libraries

🔗 Ready to get started?

Run the one-line setup: git clone https://github.com/saxyguy81/claude-proxy.git && cd claude-proxy && ./install.sh && code .

Your AI coding assistant will be running securely through the proxy in under 2 minutes! 🎉

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A secure MCP wrapper for Anthropic Claude Code that eliminates the need for permission flags while preserving full CLI functionality and working seamlessly with MCP-compatible IDEs.

  1. ⚡ Quick Start (One Command)
    1. 🎯 Features
      1. 🔒 Enterprise-Grade Safety
      2. 🌐 Universal API Compatibility
      3. 🛠️ VS Code Integration
    2. 🚀 Supported AI Assistants
      1. 🏗️ Architecture
        1. 📋 Manual Setup (5 Minutes)
          1. Install and Start
          2. Configure Your AI Assistant
        2. 🔍 Verify It's Working
          1. 🛡️ Safety in Action
            1. ⚙️ Configuration
              1. Default Config (claude-proxy.json)
              2. VS Code Workspace Settings
            2. 🧪 Testing & Quality
              1. 📚 Documentation
                1. 🔧 Commands
                  1. 🚨 Troubleshooting
                    1. Port Already in Use
                    2. VS Code Extensions Can't Connect
                  2. 🔄 Updates
                    1. 🤝 Contributing
                      1. 📝 License
                        1. 🙏 Acknowledgments

                          Related MCP Servers

                          • A
                            security
                            A
                            license
                            A
                            quality
                            This project aims to build a Claude Code MCP server and implement its associated tools (explain\_code, review\_code, fix\_code, edit\_code, test\_code, simulate\_command, your\_own\_query). The server is implemented using Node.js and the MCP SDK. It receives tool requests from clients via Stdio, dynamically
                            Last updated -
                            7
                            30
                            18
                            JavaScript
                            MIT License
                            • Linux
                          • -
                            security
                            A
                            license
                            -
                            quality
                            An MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.
                            Last updated -
                            174
                            Python
                            MIT License
                            • Apple
                            • Linux
                          • -
                            security
                            F
                            license
                            -
                            quality
                            An MCP tool that synchronizes user preferences, personal details, and code standards across multiple Claude interfaces, allowing users to maintain consistent personalized AI interactions without repeating themselves.
                            Last updated -
                            2
                            TypeScript
                            • Linux
                            • Apple
                          • -
                            security
                            A
                            license
                            -
                            quality
                            A tool that helps easily register Anthropic's Model Context Protocol (MCP) in Claude Desktop and Cursor, providing RAG functionality, Dify integration, and web search capabilities.
                            Last updated -
                            36
                            Python
                            MIT License
                            • Apple
                            • Linux

                          View all related MCP servers

                          MCP directory API

                          We provide all the information about MCP servers via our MCP API.

                          curl -X GET 'https://glama.ai/api/mcp/v1/servers/saxyguy81/mcp-keap'

                          If you have feedback or need assistance with the MCP directory API, please join our Discord server