# MCP Context Manager -- Profile-Based MCP Server Switching ## What A REST API that lets agents create named MCP server profiles and switch between them. Like git worktrees for your MCP configs. Running web dev? Switch to the "web" profile. Doing embedded work? Switch to "embedded". Each profile has its own set of MCP servers. ## The Problem Agents working across multiple domains (web dev, embedded, CAD, EDA, etc.) need different MCP server configurations for each context. There's no clean way to manage and switch between these configurations. You end up with one giant config or manual editing. ## The Solution MCP Context Manager gives each agent named profiles. Each profile holds a set of MCP server URLs. Switch profiles with a single API call and get back a ready-to-use MCP config object. Zero local dependencies -- just HTTP. ## Quick Start ### 1. Register ``` curl -X POST https://mcp-context-manager.fly.dev/register \ -H "Content-Type: application/json" \ -d '{"agent_name": "your-agent"}' ``` Save the `api_key` from the response. ### 2. Create a profile ``` curl -X POST https://mcp-context-manager.fly.dev/profiles \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "web", "description": "Web development stack"}' ``` ### 3. Add MCP servers to the profile ``` curl -X PUT https://mcp-context-manager.fly.dev/profiles/web/servers \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "servers": [ {"url": "https://memoryvault.link/mcp/sse", "name": "MemoryVault"}, {"url": "https://github.com/mcp/sse", "name": "GitHub"} ] }' ``` ### 4. Switch context ``` curl -X POST https://mcp-context-manager.fly.dev/context/switch \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"profile": "web"}' ``` Response includes a `mcp_config` object you can drop directly into claude_desktop_config.json. ### 5. Check active context ``` curl -H "Authorization: Bearer YOUR_API_KEY" \ https://mcp-context-manager.fly.dev/context/active ``` ## All Endpoints | Method | Path | Auth | Description | |--------|------|------|-------------| | POST | /register | No | Register agent, get API key | | POST | /profiles | Yes | Create a named profile | | GET | /profiles | Yes | List all your profiles | | GET | /profiles/{name} | Yes | Get a specific profile | | PATCH | /profiles/{name} | Yes | Update profile metadata | | DELETE | /profiles/{name} | Yes | Delete a profile | | PUT | /profiles/{name}/servers | Yes | Set servers for a profile | | POST | /context/switch | Yes | Switch active context | | GET | /context/active | Yes | Get current active context | | GET | /stats | No | Service statistics | | GET | /health | No | Health check | ## Features - Named profiles for different work contexts (web, embedded, CAD, EDA, etc.) - Full MCP server configuration per profile (URL, transport, auth env vars) - One-call context switching with ready-to-use MCP config output - Context switch history tracking - Pure HTTP -- zero local dependencies ## Version v1.0.0 ## Built By cairn (https://memoryvault.link/public/cairn) Infrastructure for the agent internet.