MCP Router
A unified gateway for routing requests to multiple Model Context Protocol servers.
MCP Anywhere
A unified gateway for Model Context Protocol (MCP) servers that enables discovery, configuration, and access to tools from GitHub repositories through a single endpoint.
https://github.com/user-attachments/assets/f011f8bf-6c99-4a8a-8236-f8eb0a3fb9e4
Current Version: 0.8.0
Note: This project is in beta. APIs and features are subject to change.
Overview
MCP Anywhere provides:
- Automatic tool discovery from GitHub repositories
- Centralized API key and credential management
- Selective tool enablement and access control
- Unified endpoint for all MCP tools
- Docker-based isolation for secure execution
Documentation
📚 Full documentation is available at mcpanywhere.com
- Getting Started - Quick start guide and installation
- Deployment Guide - Deploy to production with Fly.io
Installation
Local Installation
# Clone repository
git clone https://github.com/locomotive-agency/mcp-anywhere.git
cd mcp-anywhere
# Install with uv (recommended)
uv sync
# Or install with pip
pip install -e .
# Configure environment
cp env.example .env
# Edit .env with required values:
# SECRET_KEY=<secure-random-key>
# ANTHROPIC_API_KEY=<your-api-key>
# Start server
mcp-anywhere serve http
# Or: python -m mcp_anywhere serve http
# Access at http://localhost:8000
Production Deployment (Fly.io)
# Install Fly CLI
curl -L https://fly.io/install.sh | sh
# Deploy application
cd mcp-anywhere
fly launch
fly secrets set SECRET_KEY=<secure-random-key>
fly secrets set JWT_SECRET_KEY=<jwt-secret-key>
fly secrets set ANTHROPIC_API_KEY=<your-api-key>
fly secrets set GOOGLE_OAUTH_CLIENT_ID=<google-oauth-client-id>
fly secrets set GOOGLE_OAUTH_CLIENT_SECRET=<google-oauth-client-secret>
fly deploy
# Application available at https://your-app.fly.dev
To speed up the fly.io deployment, you can configure manual build and start of containers.
# set the environment variable
REBUILD_CONTAINERS_ON_STARTUP=false
Docker
Deploying the application as a docker container using docker compose.
# Configure environment
cp env.example .env
# Edit .env with required values:
# SECRET_KEY=<secure-random-key>
# ANTHROPIC_API_KEY=<your-api-key>
Build and Deploy the application
$ docker compose -f docker-compose.native.yml up -d --build
View logs to see status
$ docker logs mcp-anywhere-app
Navigate to http://<DOCKER-HOST>:8000/ to use the application
Interact with the machine via CLI, useful for interacting with the database using sqlite3
# fetch machine id for your app
$ fly --app mcp-anywhere-app machine list
$ fly console --app mcp-anywhere-app --machine <MACHINE_ID>
Sample database commands, once logged in to the machine console
$ sqlite3 /.data/mcp_anywhere.db ".tables"
$ sqlite3 /.data/mcp_anywhere.db "SELECT * FROM users;"
Usage
Adding Tools from GitHub
Use the web interface to add MCP server repositories:
- Official MCP servers:
https://github.com/modelcontextprotocol/servers - Python interpreter:
https://github.com/yzfly/mcp-python-interpreter - Any compatible MCP repository
The system uses Claude AI to automatically analyze and configure repositories.
Configuration
- API Keys: Centralized credential storage
- Secret Files: Secure upload and management of credential files (JSON, PEM, certificates)
- Tool Management: Enable or disable specific tools
- Container Settings: Automatic Docker containerization
Secret File Management
MCP Anywhere supports secure upload and management of credential files for MCP servers:
Supported File Types:
- JSON credential files (.json)
- PEM certificates and keys (.pem, .key, .crt, .cert)
- PKCS12/PFX certificates (.p12, .pfx)
- Java KeyStores (.jks, .keystore)
- Configuration files (.yaml, .yml, .xml, .txt)
Features:
- Files are encrypted at rest using AES-128 (Fernet)
- Maximum file size: 10MB
- Files are mounted as read-only volumes in containers
- Environment variables automatically set with file paths
- Automatic cleanup when servers are deleted
Usage via Web Interface:
- Navigate to the server detail page
- Use the "Upload Secret File" form
- Specify an environment variable name (e.g.,
GOOGLE_APPLICATION_CREDENTIALS) - Upload the credential file
- The file will be automatically mounted when the container starts
Security Considerations:
- Files are stored encrypted in
DATA_DIR/secrets/<server_id>/ - Each server has isolated secret storage
- Files are only decrypted when mounting to containers
- Container access is read-only
Client Integration
Claude Desktop Configuration:
First run which uv, which will print out a path to the uv binary. For example on macOS:
/Users/yourname/.local/bin/uv
You can then use that in the start command. Change the --directory path to your MCP Anywhere clone path.
{
"mcpServers": {
"mcp-anywhere": {
"command": "/Users/yourname/.local/bin/uv",
"args": ["run", "--directory", "/Users/yourname/Projects/mcp-anywhere", "mcp-anywhere", "connect"]
}
}
}
Lastly, set up the MCP Anywhere application before starting Claude Desktop:
uv run mcp-anywhere serve stdio
Authentication Options:
For Google OAuth (recommended for teams):
- Set up Google OAuth credentials in Google Cloud Console
- Configure environment variables:
GOOGLE_OAUTH_CLIENT_ID=your-client-id GOOGLE_OAUTH_CLIENT_SECRET=your-client-secret GOOGLE_OAUTH_REDIRECT_URI=/auth/callback OAUTH_USER_ALLOWED_DOMAIN=company.com # Optional: restrict to your domain - Users can sign in with Google at
/auth/login
HTTP API Integration:
from fastmcp import Client
from fastmcp.client.auth import BearerAuth
async with Client(
"https://your-app.fly.dev/mcp/",
auth=BearerAuth(token="<oauth-token>")
) as client:
tools = await client.list_tools()
Command Line Interface:
# For MCP client connection
mcp-anywhere connect
# Or: python -m mcp_anywhere connect
# For STDIO server mode (local Claude Desktop integration)
mcp-anywhere serve stdio
# For HTTP server mode with OAuth (production)
mcp-anywhere serve http --host 0.0.0.0 --port 8000
Features
Authentication & Access Control
- Google OAuth integration - Sign in with Google for simplified authentication
- Domain-based access control - Restrict access to users from specific domains (e.g., @company.com)
- Session-based web authentication with secure cookie management
- JWT tokens for API access with proper scope validation
Tool Discovery and Management
- Automatic repository analysis using Claude AI
- Container health monitoring with intelligent remounting
- Support for npx, uvx, and Docker runtimes
- Selective tool enablement with per-server controls
- Enhanced server management - Start, stop, and restart servers through web interface
- Pre-configured Python interpreter with sandbox isolation
Security and Authentication
- Google OAuth integration for simplified user authentication
- Domain-based access control for organizational security
- OAuth 2.0/2.1 with PKCE support (MCP SDK implementation)
- JWT-based API authentication
- Docker container isolation for tool execution
- Session-based authentication for web interface
- Encrypted secret file storage (AES-128 with Fernet)
Production Architecture
- Asynchronous architecture (Starlette/FastAPI)
- Health monitoring with automatic recovery
- Flexible container management with configurable startup/shutdown behavior
- Enhanced server lifecycle management with start/stop/restart controls
- Streamlined deployment process with GitHub Actions CI
- CLI support for direct tool access
Architecture
Client Application → MCP Anywhere Gateway → Docker Containers → MCP Tools
↓
Web Management Interface
Contributing
Areas for contribution:
- Oauth review and additional provider support
- Container efficiency and latency
- Improve tests
- Documentation
Configuration
Required Environment Variables
SECRET_KEY # Session encryption key
ANTHROPIC_API_KEY # Claude API key for repository analysis
Optional Environment Variables
JWT_SECRET_KEY # JWT token signing key (defaults to SECRET_KEY)
WEB_PORT # Web interface port (default: 8000)
DATA_DIR # Data storage directory (default: .data)
DOCKER_TIMEOUT # Container operation timeout in seconds (default: 300)
LOG_LEVEL # Logging level (default: INFO)
GITHUB_TOKEN # GitHub token for private repository access
# Container Management
CLEANUP_CONTAINERS_ON_SHUTDOWN # Clean up containers on app shutdown (default: false)
REBUILD_CONTAINERS_ON_STARTUP # Rebuild containers on startup (default: true)
# Google OAuth (optional - enables Google authentication)
GOOGLE_OAUTH_CLIENT_ID # Google OAuth client ID
GOOGLE_OAUTH_CLIENT_SECRET # Google OAuth client secret
GOOGLE_OAUTH_REDIRECT_URI # OAuth redirect URI (e.g., /auth/callback)
OAUTH_USER_ALLOWED_DOMAIN # Restrict access to specific domain (e.g., company.com)
Development
Development Setup
# Install development dependencies
uv sync --group dev
# Run tests
uv run pytest
# Run linting
uv run ruff check src/ tests/
# Run type checking
uv run mypy src/
Testing
# Run all tests
uv run pytest
# Run tests with coverage
uv run pytest --cov=mcp_anywhere
uv run mcp-anywhere serve http --host 0.0.0.0 --port 8080
Debug Mode
LOG_LEVEL=DEBUG mcp-anywhere serve http
Data Reset
mcp-anywhere reset --confirm
Support
License
See LICENSE
संबंधित सर्वर
Alpha Vantage MCP Server
प्रायोजकAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
EndOfLife.date
Get end-of-life dates and support cycle information for various software products.
Devcontainers
Integrates with the devcontainers CLI to manage development containers. Requires Docker.
Flux Schnell MCP Server
Generate images using the Flux Schnell model via the Replicate API.
EVM MCP Server
Provides blockchain services for over 30 EVM-compatible networks through a unified interface.
MCPControl
Programmatically control Windows mouse, keyboard, window management, screen capture, and clipboard operations.
WSL Exec
Execute commands securely in Windows Subsystem for Linux (WSL).
BCMS MCP
Give me a one - two sentence description of the BCMS MCP # MCP The BCMS Model Context Protocol (MCP) integration enables AI assistants like Claude, Cursor, and other MCP-compatible tools to interact directly with your BCMS content. This allows you to create, read, and update content entries, manage media files, and explore your content structure—all through natural language conversations with AI. ## What is MCP? The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) is an open standard developed by Anthropic that allows AI applications to securely connect to external data sources and tools. With BCMS MCP support, you can leverage AI assistants to: - Query and explore your content structure - Create new content entries with AI-generated content - Update existing entries - Manage your media library - Get intelligent suggestions based on your content model --- ## Getting Started ### Prerequisites 1. A BCMS account with an active instance 2. An MCP key with appropriate permissions 3. An MCP-compatible client (Claude Desktop, Cursor, or any MCP client) ### Step 1: Create an MCP Key 1. Navigate to your BCMS dashboard 2. Go to Settings → MCP 3. Click Create MCP Key 4. Configure the permissions for templates you want the AI to access:GET: Read entries 5. POST: Create entries 6. PUT: Update entries 7. DELETE: Delete entries Note: Right now, MCP only supports creating, reading and updating content. ### Step 2: Configure Your MCP Client You can find full instructions for integrating BCMS with your AI tools right inside BCMS, on the MCP page. But in general, installing BCMS MCP works in a standard way: ``` { "mcpServers": { "bcms": { "url": "https://app.thebcms.com/api/v3/mcp?mcpKey=YOUR_MCP_KEY" } } } ``` ## Available Tools Once connected, your AI assistant will have access to the following tools based on your MCP key permissions: ### Content Discovery #### list_templates_and_entries Lists all templates and their entries that you have access to. This is typically the first tool to call when exploring your BCMS content. Returns: - Template IDs, names, and slugs - Entry IDs with titles and slugs for each language Example prompt: "Show me all the templates and entries in my BCMS" --- ### Entry Management #### list_entries_for_{templateId} Retrieves all entries for a specific template with full content data. A separate tool is generated for each template you have access to. Returns: - Complete entry data including all meta fields - Content in all configured languages - Entry statuses Example prompt: "List all blog posts from my Blog template" --- #### create_entry_for_{templateId} Creates a new entry for a specific template. The input schema is dynamically generated based on your template's field structure. Input: - statuses: Array of status assignments per language - meta: Array of metadata for each language (title, slug, custom fields) - content: Array of content nodes for each language Example prompt: "Create a new blog post titled 'Getting Started with BCMS' with a brief introduction paragraph" --- #### update_entry_for_{templateId} Updates an existing entry for a specific language. Input: - entryId: The ID of the entry to update - lng: Language code (e.g., "en") - status: Optional status ID - meta: Updated metadata - content: Updated content nodes Example prompt: "Update the introduction paragraph of my 'Getting Started' blog post" --- ### Media Management #### list_all_media Lists all media files in your media library. Returns: - Media IDs, names, and types - File metadata (size, dimensions for images) - Parent directory information Example prompt: "Show me all images in my media library" --- #### list_media_dirs Lists the directory structure of your media library. Returns: - Hierarchical directory structure - Directory IDs and names Example prompt: "Show me the folder structure of my media library" --- #### create-media-directory Creates a new directory in your media library. Input: - name: Name of the directory - parentId: Optional parent directory ID (root if not specified) Example prompt: "Create a new folder called 'Blog Images' in my media library" --- #### request-upload-media-url Returns a URL you use to upload a file (for example via POST with multipart form data), which avoids pushing large binaries through the MCP tool payload. You still need a valid file name and MIME type when uploading, as described in the tool response. Availability: Only when the MCP key has Can mutate media enabled. Example prompt: “Give me an upload URL for a new hero image, then tell me how to upload it.” Input: - fileName: Name of the file with extension - fileData: Base64-encoded file data (with data URI prefix) - parentId: Optional parent directory ID Example prompt: "Upload this image to my Blog Images folder" --- ### Linking Tools #### get_entry_pointer_link Generates an internal BCMS link to an entry for use in content. Input: - entryId: The ID of the entry to link to Returns: - Internal link format: entry:{entryId}@*_{templateId}:entry Example prompt: "Get me the internal link for the 'About Us' page entry" --- #### get_media_pointer_link Generates an internal BCMS link to a media item for use in content. Input: - mediaId: The ID of the media item Returns: - Internal link format: media:{mediaId}@*_@*_:entry Example prompt: "Get the link for the hero image so I can use it in my blog post" --- ## Content Structure ### Entry Content Nodes When creating or updating entries, content is structured as an array of nodes. Supported node types include: Type Description paragraph Standard text paragraph heading Heading (h1-h6) bulletList Unordered list orderedList Numbered list listItem List item codeBlock Code block with syntax highlighting blockquote Quote block image Image node widget Custom widget with props ### Example Content Structure ``` { "content": [ { "lng": "en", "nodes": [ { "type": "heading", "attrs": { "level": 1 }, "content": [ { "type": "text", "text": "Welcome to BCMS" } ] }, { "type": "paragraph", "content": [ { "type": "text", "text": "This is your first paragraph." } ] } ] } ] } ``` ## Security & Permissions ### MCP Key Scopes Your MCP key controls what the AI can access: - Template Access: Only templates explicitly granted in the MCP key are visible - Operation Permissions: Each template can have independent GET/POST/PUT/DELETE permissions - Media Access: Media operations are controlled separately ### Best Practices 1. Principle of Least Privilege: Only grant the permissions needed for your use case 2. Separate Keys: Create different MCP keys for different purposes or team members 3. Regular Rotation: Periodically rotate your MCP keys ## Use Cases ### Content Creation Workflows Blog Post Creation "Create a new blog post about the benefits of headless CMS. Include an introduction, three main benefits with explanations, and a conclusion. Use the Blog template." Product Updates "Update the price field for all products in the Electronics category to apply a 10% discount" ### Content Exploration Content Audit "List all blog posts that don't have a featured image set" Translation Status "Show me which entries are missing German translations" ### Media Organization Library Cleanup "Show me all unused images in the media library" Folder Setup "Create folder structure for: Products > Categories > Electronics, Clothing, Home" ## Troubleshooting ### Common Issues #### "MCP key not found" - Verify your MCP key format: keyId.keySecret.instanceId - Ensure the MCP key hasn't been deleted or deactivated - Check that you're using the correct instance #### "MCP key does not have access to template" - Review your MCP key permissions in the dashboard - Ensure the required operation (GET/POST/PUT/DELETE) is enabled for the template #### Session Expired - MCP sessions may timeout after periods of inactivity - Simply start a new conversation to establish a fresh session ### Getting Help - Documentation: [thebcms.com/docs](https://thebcms.com/docs) - Support: [[email protected]](mailto:[email protected]) - Community: [Join BCMS Discord](https://discord.com/invite/SYBY89ccaR) for community support ## Technical Reference ### Endpoint POST https://app.thebcms.com/api/v3/mcp?mcpKey={MCP_KEY} ### Transport BCMS MCP uses the Streamable HTTP transport with session management. Sessions are maintained via the mcp-session-id header. ### Response Format All tools return structured JSON responses conforming to the MCP specification with: - content: Array of content blocks - structuredContent: Typed response data ## Rate Limits MCP requests are subject to the same rate limits as API requests: - Requests are tracked per MCP key - Contact support if you need higher limits for production workloads
agentskill.sh
Search, discover, and install 55k+ AI agent skills for Claude Code, Cursor, Copilot, Windsurf, and more.
trace-mcp
Framework-aware code intelligence server that builds a cross-language dependency graph from source code — 53 framework integrations across 68 languages, 100+ tools for navigation, impact analysis, refactoring, and session memory with up to 97% token reduction.
Model Context Protocol servers
A collection of reference MCP server implementations in TypeScript and Python, demonstrating MCP features and SDKs.