Skip to main content

v(irtual)MCP - Extend, Compose, Customize MCP servers

Project description

vMCP - Virtual Model Context Protocol

A containerization platform for MCPs that lets you compose, customize, and deploy AI agent capabilities at scale.

What is vMCP?

vMCP (Virtual Model Context Protocol) transforms how you work with MCP servers by introducing containerization for AI capabilities. Instead of managing scattered MCP servers individually, vMCP lets you:

๐ŸŽฏ Curate with Precision: Connect to multiple MCP servers but cherry-pick only the tools, resources, and prompts you actually need ๐Ÿ”จ Extend with Custom Logic: Create your own tools using Python functions or REST APIs, and add custom resources and prompts ๐Ÿ“ฆ Package as Containers: Bundle your curated capabilities into self-contained "virtual MCPs" (vMCPs) that can be versioned, shared, and deployed anywhere ๐Ÿ”Œ Connect Once, Use Everywhere: Point any AI client (Claude, OpenAI, custom agents) to a single vMCP endpoint that aggregates everything

Think of vMCP as Docker for AI capabilities - where each container is a carefully crafted collection of tools, data sources, and prompts tailored for specific use cases.

Why vMCP?

The Problem Modern AI applications need access to multiple MCP servers (filesystem, GitHub, Slack, databases, etc.). Managing these connections individually leads to:

๐Ÿ” Redundant configurations across projects ๐ŸŽš๏ธ No granular control over which capabilities to expose ๐Ÿšซ Difficulty standardizing agent behavior across teams ๐Ÿ“Š No visibility into usage patterns

The Solution

vMCP provides a unified aggregation layer where you can: Multiple MCP Servers โ†’ Curate โ†’ Customize โ†’ Container โ†’ Deploy (Filesystem, GitHub, Slack) (Select tools) (Add custom) (vMCP) (AI Clients) Example: Create a "DevOps Assistant" vMCP that combines:

GitHub's create_issue and list_prs tools (but not delete_repo) Filesystem's read_file (but not write_file for safety) Your custom deploy_to_staging tool built with Python Slack's notification capabilities Custom prompts for incident response workflows

Deploy this single vMCP endpoint, and any AI agent can instantly access this curated, secure capability set.

Key Features

โœ… Selective Tool Exposure: Connect to any MCP server and choose exactly which tools, resources, and prompts to include ๐Ÿ”จ Custom Capabilities: Build your own tools using Python functions or REST API integrations ๐Ÿ“ฆ Virtual Containers: Package everything into reusable, shareable vMCP containers ๐Ÿ”Œ Universal Compatibility: Works with stdio, HTTP, and SSE MCP transports ๐Ÿ” Authentication Support: Handle OAuth 2.0, Bearer tokens, and Basic auth for MCP servers ๐Ÿ“Š Usage Analytics: Track tool calls, resource reads, and prompt usage patterns ๐Ÿณ Deploy Anywhere: Run locally, in Docker, or on any cloud platform ๐Ÿ” OpenTelemetry Tracing: Built-in observability for debugging and monitoring

๐Ÿš€ Quickstart

Prerequisites

vMCP requires Python 3.10 to 3.13 and uv.

Installation

To install vMCP, run:

uv pip install 1xn-vmcp

Or use uvx to run directly:

uvx 1xn-vmcp run

Running vMCP

To run vMCP locally:

vmcp run

This will start the vMCP server on http://localhost:8000.

๐Ÿ“– What is vMCP?

vMCP (Virtual Model Context Protocol) is an open-source platform that allows you to:

  • Aggregate Multiple MCP Servers: Connect to multiple MCP servers (stdio, HTTP, SSE) and manage them from a single interface
  • Create Virtual MCPs: Combine tools, resources, and prompts from multiple servers into unified virtual endpoints. create custom tools using python function or using rest apis.
  • Manage Connections: Handle MCP server authentication (OAuth, Bearer tokens, Basic auth)
  • Track Usage: Monitor tool calls, resource reads, and prompt usage with built-in analytics
  • Deploy Anywhere: Run locally, in Docker, or deploy to cloud platforms

Key Features

  • โœ… No Authentication Required: Single local user mode for simplicity
  • ๐Ÿ”Œ MCP Protocol Support: Full support for stdio, HTTP, and SSE transports
  • ๐Ÿ” MCP Server Authentication: OAuth 2.0 support for MCP servers that require it
  • ๐Ÿ“Š Usage Statistics: Track and analyze vMCP usage patterns
  • ๐Ÿณ Docker Ready: Official Docker images for easy deployment
  • ๐Ÿ” OpenTelemetry Tracing: Built-in distributed tracing support
  • ๐Ÿ“ Standard Logging: Clean logging with DEBUG, INFO, WARNING, ERROR levels

๐Ÿ—๏ธ Architecture

Components

  1. MCP Servers: Individual MCP servers you connect to (e.g., filesystem, GitHub, Slack)
  2. VMCPs: Virtual MCPs that aggregate multiple MCP servers
  3. Storage: PostgreSQL database for configuration and stats
  4. Web UI: React-based interface for managing VMCPs and connections

How it Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  AI Client  โ”‚ (Claude, OpenAI, etc.)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ”‚
       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚    vMCP     โ”‚ (Virtual MCP Endpoint)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ”‚
       โ”œโ”€โ”€โ”€โ”€โ”€โ–บ MCP Server 1 (Filesystem)
       โ”œโ”€โ”€โ”€โ”€โ”€โ–บ MCP Server 2 (GitHub)
       โ””โ”€โ”€โ”€โ”€โ”€โ–บ MCP Server 3 (Slack)

๐Ÿ› ๏ธ Development

Project Structure

1xn_oss/
โ”œโ”€โ”€ backend/               # Python backend
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ main.py        # Application entry point
โ”‚   โ”‚   โ””โ”€โ”€ vmcp/          # Main package
โ”‚   โ”‚       โ”œโ”€โ”€ cli/       # CLI commands
โ”‚   โ”‚       โ”œโ”€โ”€ config.py  # Configuration
โ”‚   โ”‚       โ”œโ”€โ”€ data/      # Data files
โ”‚   โ”‚       โ”œโ”€โ”€ mcps/      # MCP server management
โ”‚   โ”‚       โ”œโ”€โ”€ proxy_server/ # FastAPI backend
โ”‚   โ”‚       โ”œโ”€โ”€ scripts/   # Utility scripts
โ”‚   โ”‚       โ”œโ”€โ”€ storage/   # Database models
โ”‚   โ”‚       โ”œโ”€โ”€ utilities/ # Logging & tracing
โ”‚   โ”‚       โ””โ”€โ”€ vmcps/     # Virtual MCP management
โ”‚   โ”œโ”€โ”€ public/            # Static files (built frontend/docs)
โ”‚   โ””โ”€โ”€ pyproject.toml     # Python dependencies
โ”œโ”€โ”€ frontend/              # React frontend (Vite)
โ”œโ”€โ”€ docs/                  # Documentation (Docusaurus)
โ”œโ”€โ”€ docker/                # Docker configuration
โ””โ”€โ”€ instructions/          # Project documentation

Setup Development Environment

# Clone the repository
git clone https://github.com/vmcp/vmcp.git
cd vmcp

# Install dependencies
uv sync


# Start development server
cd src
python3 main.py --reload

Environment Variables

Create a .env file in the project root:

# Database
DATABASE_URL=postgresql://vmcp:vmcp@localhost:5432/vmcp

# Server
HOST=0.0.0.0
PORT=8000
BASE_URL=http://localhost:8000

# Logging
LOG_LEVEL=INFO

# Tracing (optional)
ENABLE_TRACING=false
OTLP_ENDPOINT=http://localhost:4317

๐Ÿ“Š Usage Examples

Creating a vMCP

import httpx

# Create a new vMCP
response = httpx.post("http://localhost:8000/vmcps/create", json={
    "name": "my-vmcp",
    "description": "My virtual MCP",
    "mcp_server_ids": [
        "filesystem-server",
        "github-server"
    ]
})

vmcp_id = response.json()["vmcp_id"]
print(f"Created vMCP: {vmcp_id}")

Calling Tools via vMCP

# Call a tool through the vMCP
response = httpx.post(
    f"http://localhost:8000/vmcp/{vmcp_id}/tools/call",
    json={
        "tool_name": "read_file",
        "arguments": {"path": "/tmp/test.txt"}
    }
)

result = response.json()
print(result)

๐Ÿณ Docker Deployment

Quick Start with Docker

The easiest way to run vMCP is using our pre-built Docker image:

# Run vMCP directly from Docker Hub
docker run -p 8000:8000 onexn/vmcp:latest

Open your browser to http://localhost:8000 - that's it!

Using Docker Compose (Recommended)

For a full setup with PostgreSQL database:

# Clone the repository
git clone https://github.com/codesque16/1xn_oss.git
cd 1xn_oss

# Start with Docker Compose
make docker-run
# or
docker-compose -f docker/docker-compose.yml up -d

Building Your Own Image

# Build from source
git clone https://github.com/codesque16/1xn_oss.git
cd 1xn_oss
make docker-build

# Run your custom build
docker run -p 8000:8000 your-image-name:latest

Available Tags

๐Ÿ“š Documentation

Full documentation is available at docs.vmcp.dev (coming soon).

Key Concepts

  • MCP Servers: Individual servers implementing the Model Context Protocol
  • vMCPs: Virtual endpoints that aggregate multiple MCP servers
  • Tools: Functions exposed by MCP servers
  • Resources: Data sources accessible through MCP servers
  • Prompts: Templated prompts provided by MCP servers

๐Ÿค Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Running Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=vmcp --cov-report=html

# Run specific test file
pytest tests/test_mcps/test_client.py

๐Ÿ“„ License

vMCP is open-source software licensed under the MIT License.

๐Ÿ™ Acknowledgments

๐Ÿ“ž Support


Made with โค๏ธ by the 1xn Team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

1xn_vmcp-0.1.5-py3-none-any.whl (4.7 MB view details)

Uploaded Python 3

File details

Details for the file 1xn_vmcp-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: 1xn_vmcp-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for 1xn_vmcp-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1745c95381de10fe15342cc93d602f485fbb0d29a3e8694aa6a896c210ca23ce
MD5 d665fa957c25c9f302975b1a97b6d2b7
BLAKE2b-256 88d7387a7db1fb6414941db38adce8cbde304e85ea9db2043d767e41b98ec852

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page