api MCP server
Commit Nov 11, 2026Exposes MCP servers via a unified HTTP API with secure, encrypted multi-user secret management and package management.
Also known as MissionSquad/mcp-api
- Stars
- 15
- Tools
- 9
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 11, 2026
- License
- —
What is api MCP?
api exposes MCP servers via a unified HTTP API with secure, encrypted multi-user secret management and package management. It exposes 9 tools, such as success, tools, username.
Summary generated from the project's README
About api MCP server
Developers needing to scale Model Context Protocol tools for multiple users can use this system to transform single-user MCP servers into a unified HTTP API. It acts as a proxy that manages the lifecycle of various server packages while providing a secure way to handle sensitive credentials. Instead of relying on local environment variables, the system stores API keys and passwords using AES-256-GCM encryption within a MongoDB database.
Users can deploy the service via Docker or Docker Compose, requiring Node.js 20 and a MongoDB instance. The API supports both stdio and streamable_http transport types, allowing for local Node.js or Python packages to be managed through a single REST interface. It specifically handles Python environments by creating isolated virtual environments for each package and manages OAuth token refreshes for streamable connections. This setup allows different users to access the same server instances while maintaining their own isolated, encrypted secrets.
What you can do with it
- 1Secure multi-user tool accessProvide multiple users access to the same MCP server instances while ensuring each user uses their own unique credentials.
- 2Automated package deploymentInstall and configure Node.js or Python MCP server packages through a REST API request.
- 3Encrypted credential storageStore sensitive API keys in a database using AES-256-GCM encryption rather than plain text environment variables.
- 4Managing Python dependenciesSet up Python-based MCP servers with specific pip dependencies and isolated virtual environments.
Written from the project's README. Every use case is checked against a quote from it.
api MCP tools 9
Detected from the READMEsuccesstoolsusernameserverNamemethodNameargsdataweb_searchget_url_content
| success | — | |
| tools | — | |
| username | — | |
| serverName | — | |
| methodName | — | |
| args | — | |
| data | — | |
| web_search | — | |
| get_url_content | — |
Configuration
ALLOW_USER_GENERATED_CONTENTINSTALL_ON_STARTMCP_AUTH_TYPEMONGO_DBNAMEMONGO_HOSTMONGO_PASSMONGO_USERMSQ_COMMS_MCP_HMAC_KEY_FILENODE_ENVPIP_EXTRA_INDEX_URLPIP_INDEX_URLPRIVATE_API_KEYPYTHON_BINPYTHON_VENV_DIRREAD_ONLYSECRETS_DBNAMESECRETS_KEY
| Name | Description | |
|---|---|---|
| ALLOW_USER_GENERATED_CONTENT | — | |
| INSTALL_ON_START | — | |
| MCP_AUTH_TYPE | — | |
| MONGO_DBNAME | — | |
| MONGO_HOST | — | |
| MONGO_PASS | — | |
| MONGO_USER | — | |
| MSQ_COMMS_MCP_HMAC_KEY_FILE | — | |
| NODE_ENV | — | |
| PIP_EXTRA_INDEX_URL | — | |
| PIP_INDEX_URL | — | |
| PRIVATE_API_KEY | — | |
| PYTHON_BIN | — | |
| PYTHON_VENV_DIR | — | |
| READ_ONLY | — | |
| SECRETS_DBNAME | — | |
| SECRETS_KEY | — |
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work
- Source repository linked and reachablemissionsquad/mcp-api is public and reachablegithub.com/missionsquad/mcp-api ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)No licenseFinding
- Commit or release in the last yearLast commit or release 2026-11-11github.com/missionsquad/mcp-api ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model9 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubMCP API
A scalable HTTP API for Model Context Protocol (MCP) servers with secure secret management.
Overview
MCP API addresses a critical limitation in the current MCP server ecosystem: most MCP servers are designed for single-user usage, with secrets (API keys, passwords) stored directly in environment variables. This project enhances security and scalability by:
- Exposing MCP servers via a unified HTTP API
- Abstracting secret handling through secure encryption
- Supporting multi-user access to the same MCP server instances
- Providing package management for easy installation and configuration of MCP servers
Instead of embedding sensitive credentials in environment variables, MCP API stores them encrypted in MongoDB and retrieves/decrypts them as needed for specific tool operations.
Features
- Multi-user Support: Multiple users can access the same MCP server instances with their own credentials
- Secure Secret Management: All sensitive information is stored encrypted in MongoDB
- User-specific Secret Storage: Each user's secrets are isolated and encrypted separately
- Package Management: Simplified installation and configuration of MCP server packages
- HTTP API: Simple REST API for accessing MCP tools and managing secrets
- Streamable HTTP Transport: First-class support for
streamable_httpMCP servers with optional SSE fallback - Session Persistence: HTTP session IDs are persisted and resumed across process restarts
- OAuth Token Refresh: Streamable HTTP servers can refresh OAuth tokens automatically via stored refresh tokens
- Containerized Deployment: Docker and Docker Compose support for easy deployment
Architecture
MCP API acts as a proxy between clients and MCP servers:
- Client Requests: Applications send requests to the HTTP API
- Secret Management: The API retrieves and decrypts user-specific secrets as needed
- Package Management: The API handles installation, configuration, and lifecycle of MCP server packages
- Transport Selection: Each server uses either stdio or Streamable HTTP transport based on configuration
- MCP Server Communication: The API communicates with MCP servers using the Model Context Protocol
- Response Handling: Results from MCP servers are returned to clients
The system uses AES-256-GCM encryption for all stored secrets, with a separate encryption key for each deployment.
Installation
Prerequisites
- Node.js 20 or higher
- MongoDB
- MCP server implementations you wish to expose
Setup
-
Clone the repository:
git clone https://github.com/missionsquad/mcp-api.git cd mcp-api -
Install dependencies:
yarn install -
Create a
.envfile based on the example:cp example.env .env -
Configure your environment variables:
PORT=8080 MONGO_USER=username MONGO_PASS=password MONGO_HOST=localhost:27017 MONGO_DBNAME=mcp SECRETS_KEY=your-random-key SECRETS_DBNAME=secrets PYTHON_BIN=/usr/bin/python3 PYTHON_VENV_DIR=packages/python PIP_INDEX_URL= PIP_EXTRA_INDEX_URL=The optional Comms Management service-HMAC profile uses one additional environment variable:
MSQ_COMMS_MCP_HMAC_KEY_FILE=/absolute/path/to/a/mounted/keyring.jsonThis value is an absolute secret-file path, not key material. The file must be a regular, non-symlink JSON file with mode
0400or0440and the closedSymmetricKeyringshape used by the Comms Agent deployment contract. Do not reuseSECRETS_KEY, a user secret, an OAuth token, or another Mission Squad service keyring. -
Build the project:
yarn build -
Start the server:
yarn start
Docker Deployment
Using Docker Compose
- Configure your
.envfile as described above - Run with Docker Compose:
docker-compose up -d - The container image includes Python 3.13 and sets
PYTHON_BIN=/usr/local/bin/python3.13by default for Python MCP package installs.
Building the Docker Image
docker build -t mcp-api .
docker run -p 8080:8080 --env-file .env mcp-api
For Python MCP servers that require Python 3.13+ (for example klaviyo-mcp-server), do not override PYTHON_BIN to an older interpreter in container deployments.
API Reference
Comms Management service-HMAC profile
The V1 service-HMAC transport is limited to one platform-owned Streamable HTTP profile. Register it through the existing server-management API with these non-secret fields (the name remains the caller's stable platform server identifier):
{
"name": "comms-management",
"source": "platform",
"transportType": "streamable_http",
"authMode": "service_hmac",
"serviceHmacProfile": "comms_management",
"url": "https://comms-management:8080/internal/mcp"
}
The combination is closed. It cannot be selected by an external or user-installed server, stdio transport, another URL/profile, configured query or fragment, static headers, shared session ID, OAuth configuration, or external secret fields. Server responses may include the non-secret serviceHmacProfile; they never include the key-file path, key bytes, per-request authentication headers, timestamp, nonce, or signature.
If the environment variable is absent, the keyring is invalid/out of its active window, or a reload fails validation, only this profile is unavailable. Its connection attempt returns a typed service-unavailable error and it does not claim a connected state; /healthz and all unrelated stdio, unauthenticated HTTP, and OAuth servers remain operational.
Send SIGHUP after atomically replacing the mounted keyring file. A completely valid candidate becomes active for the next outbound request. An invalid candidate leaves the prior ring in memory only for later recovery but disables signing until a subsequent valid reload.
Package Management
Install an MCP Package
POST /packages/install
Node.js stdio request body:
{
"name": "package-name",
"version": "1.0.0",
"serverName": "unique-server-name",
"transportType": "stdio",
"command": "node",
"args": ["--option1", "--option2"],
"env": {
"NODE_ENV": "production"
},
"secretName": "API_KEY",
"enabled": true,
"failOnWarning": false
}
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name |
string | Yes | — | npm package name |
version |
string | No | "latest" |
Package version to install |
serverName |
string | Yes | — | Unique MCP server identifier |
transportType |
string | No | "stdio" |
"stdio" or "streamable_http" |
command |
string | No | Auto-detected | Command to start the server. If omitted, resolved from the package's bin or main field |
args |
string[] | No | [] |
Command-line arguments |
env |
object | No | {} |
Environment variables for the server process |
secretName |
string | No | — | Secret name to associate with this server |
enabled |
boolean | No | true |
Whether to start the server after installation |
failOnWarning |
boolean | No | false |
Fail installation if npm emits warnings |
Streamable HTTP install example:
{
"name": "package-name",
"version": "1.0.0",
"serverName": "remote-http-server",
"transportType": "streamable_http",
"url": "https://example.com/mcp",
"headers": {
"X-Custom-Header": "value"
},
"enabled": true
}
Additional fields for streamable_http:
| Field | Type | Required | Description |
|---|---|---|---|
url |
string | Yes | The MCP HTTP endpoint |
headers |
object | No | Static HTTP headers to send with requests |
sessionId |
string | No | Session ID to resume a previous session |
reconnectionOptions |
object | No | SSE reconnection settings (see Server Management) |
Python stdio install example:
{
"name": "my-python-mcp",
"serverName": "python-mcp",
"runtime": "python",
"pythonModule": "my_mcp_server",
"pythonArgs": ["--port", "0"],
"enabled": true
}
Python packages with a console script entry point (no __main__.py) require the command field to point to the console script binary installed in the venv. When command is provided, pythonModule is still required for metadata purposes but is not used to build the run command:
{
"name": "klaviyo-mcp-server",
"serverName": "klaviyo",
"runtime": "python",
"pythonModule": "klaviyo_mcp_server",
"command": "/app/packages/python/klaviyo/bin/klaviyo-mcp-server",
"pipDependencies": ["fastmcp<3"],
"env": {
"PRIVATE_API_KEY": "your-api-key",
"READ_ONLY": "false",
"ALLOW_USER_GENERATED_CONTENT": "false"
}
}
Additional fields for runtime: "python":
| Field | Type | Required | Description |
|---|---|---|---|
runtime |
string | Yes | Must be "python" |
pythonModule |
string | Yes | Python module name (e.g. my_mcp_server). Used with python -m unless command is provided |
pythonArgs |
string[] | No | Additional arguments passed after the module name |
command |
string | No | Override the default python -m <module> command. Use for packages that expose a console script entry point instead of __main__.py |
args |
string[] | No | Arguments for the command when command is provided (replaces pythonArgs) |
pipDependencies |
string[] | No | Additional pip specs installed alongside the main package (e.g. ["fastmcp<3", "requests>=2.28"]). Persisted and reused during upgrades |
pipIndexUrl |
string | No | Custom PyPI index URL for pip |
pipExtraIndexUrl |
string | No | Additional PyPI index URL for pip |
Python install behavior:
- If
transportTypeis omitted, the API defaults to"stdio". Python runtime only supports"stdio". - A virtual environment is created at
packages/python/<serverName>(orPYTHON_VENV_DIR/<serverName>if configured). - Without
command: the server runs as<venv>/bin/python -u -m <pythonModule> [pythonArgs...] - With
command: the server runs as<command> [args...]with the venv environment variables set. pipDependenciesare installed in the samepip installinvocation as the main package.pipIndexUrl,pipExtraIndexUrl, andpipDependenciesare persisted on the package record and reused for upgrades and update checks.
List Installed Packages
GET /packages
Response includes version information for each package:
{
"success": true,
"packages": [
{
"name": "package-name",
"version": "1.0.0",
"latestVersion": "1.1.0",
"updateAvailable": true,
"installPath": "/path/to/package",
"status": "installed",
"installed": "2025-03-01T12:00:00Z",
"lastUpgraded": "2025-03-01T12:00:00Z",
"mcpServerId": "server-name",
"enabled": true
}
]
}
Optional query parameters:
checkUpdates=true- Check for updates before returning package information
Get Package by Name
GET /packages/by-name/:name
Get Package by Server ID
GET /packages/by-id/:name
Both endpoints return version information and support the checkUpdates=true query parameter.
Uninstall a Package
DELETE /packages/:name
Removes the package files, stops the associated MCP server, and deletes the server configuration.
Enable a Package
PUT /packages/:name/enable
Enables a previously disabled package and starts its associated MCP server.
Disable a Package
PUT /packages/:name/disable
Disables a package and stops its associated MCP server without removing it.
Check for Package Updates
GET /packages/updates
Optional query parameters:
name=server-name- Check for updates for a specific package
Response:
{
"success": true,
"updates": [
{
"serverName": "server-name",
"currentVersion": "1.0.0",
"latestVersion": "1.1.0",
"updateAvailable": true
}
]
}
Upgrade a Package
PUT /packages/:name/upgrade
Request body (optional):
{
"version": "1.1.0" // Optional, defaults to latest version
}
Response:
{
"success": true,
"package": {
// Updated package information
},
"server": {
// Updated server information
}
}
Upgrades work for both stdio and streamable_http servers. Streamable HTTP upgrades preserve url, headers, sessionId, and reconnectionOptions and do not attempt stdio command resolution.
Upgrade All Packages
PUT /packages/upgrade-all
Response:
{
"success": true,
"results": [
{
"serverName": "server-name",
"success": true
},
{
"serverName": "another-server",
"success": false,
"error": "Error message"
}
]
}
MCP Tool Operations
Note: The
usernameparameter is optional in all API endpoints. If omitted, "default" will be used. This allows single users to use the API without specifying a username while still benefiting from encrypted secret storage.
List Available MCP Tools
GET /mcp/tools
Returns a list of all available tools across all registered MCP servers, including their names, descriptions, and input schemas.
Response format:
{
"success": true,
"tools": [
{
"server-name": [
{
"name": "tool-name",
"description": "A human-readable description of what the tool does",
"inputSchema": {
"type": "object",
"properties": {
"param1": {
"type": "string",
"description": "Description of parameter 1"
},
"param2": {
"type": "number",
"description": "Description of parameter 2"
},
"param3": {
"type": "object",
"properties": {
"nestedParam": {
"type": "string"
}
}
}
},
"required": ["param1"]
}
}
]
}
]
}
The response structure contains:
success: Boolean indicating if the request was successfultools: An array of objects, each containing a server name as the key and an array of tool definitions as the value- Each tool definition includes:
name: The name of the tool (used when calling the tool)description: A human-readable description of the tool's functionalityinputSchema: A JSON Schema object defining the expected parameters for the toolproperties: Defines the parameters the tool acceptsrequired: An array of parameter names that are required
- Each tool definition includes:
This endpoint is useful for discovering what tools are available and understanding their input requirements before making tool calls.
Call an MCP Tool
POST /mcp/tool/call
Executes a tool on a specified MCP server with the provided arguments.
Request body:
{
"username": "user123", // Optional, defaults to "default"
"serverName": "mcp-github",
"methodName": "create_issue",
"args": {
"owner": "username",
"repo": "repo-name",
"title": "Issue title",
"body": "Issue description"
}
}
Parameters:
username: (Optional) The username to use for retrieving secrets. Defaults to "default" if not provided.serverName: (Required) The name of the MCP server that provides the tool.methodName: (Required) The name of the tool to call.args: (Required) An object containing the arguments to pass to the tool.
Response format:
{
"success": true,
"data": {
"content": "Tool execution result",
"contentType": "text/plain"
}
}
The response structure contains:
success: Boolean indicating if the request was successfuldata: The result of the tool executioncontent: The actual result data (can be a string, object, or array)contentType: The MIME type of the content (e.g., "text/plain", "application/json")
Error response:
{
"success": false,
"error": "Error message"
}
Secret Handling
A key feature of the /mcp/tool/call endpoint is automatic secret injection:
- When a tool call is made, the system automatically retrieves any stored secrets for the specified username and server
- These secrets are merged with the provided arguments before the tool is called
- This means sensitive information like API keys or passwords don't need to be included in the request payload
For example, if you've previously stored a GitHub token using the /secrets/set endpoint:
{
"username": "user123",
"serverName": "mcp-github",
"secretName": "GITHUB_TOKEN",
"secretValue": "ghp_xxxxxxxxxxxx"
}
Then when calling a GitHub tool, you don't need to include the token in your request:
{
"username": "user123",
"serverName": "mcp-github",
"methodName": "create_issue",
"args": {
"owner": "username",
"repo": "repo-name",
"title": "Issue title",
"body": "Issue description"
}
}
The system will automatically inject the GITHUB_TOKEN into the arguments before calling the tool.
This approach provides several benefits:
- Clients don't need to manage or expose sensitive credentials in their requests
- Each user can have their own set of secrets for the same MCP servers
- Secrets are stored securely (encrypted) and only decrypted when needed
List Available MCP Servers
GET /mcp/servers
Returns a list of all registered MCP servers with their configuration and status information.
Response format:
{
"success": true,
"servers": [
{
"name": "mcp-github",
"transportType": "stdio",
"command": "./node_modules/@missionsquad/mcp-github/build/index.js",
"args": ["--port", "3000"],
"env": {
"NODE_ENV": "production"
},
"status": "connected",
"enabled": true,
"toolsList": [
{
"name": "create_issue",
"description": "Creates a new issue in a GitHub repository",
"inputSchema": {
"type": "object",
"properties": {
"owner": {
"type": "string",
"description": "Repository owner"
},
"repo": {
"type": "string",
"description": "Repository name"
},
"title": {
"type": "string",
"description": "Issue title"
},
"body": {
"type": "string",
"description": "Issue body"
},
"labels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Labels to apply to the issue"
},
"assignees": {
"type": "array",
"items": {
"type": "string"
},
"description": "Users to assign to the issue"
}
},
"required": ["owner", "repo", "title"]
}
}
],
"logs": []
}
]
}
The response structure contains:
success: Boolean indicating if the request was successfulservers: An array of server objects, each containing:name: The unique name of the MCP servercommand: The command used to start the serverargs: Command-line arguments passed to the serverenv: Environment variables set for the server (excluding secrets)url: Streamable HTTP endpoint (streamable_http only)headers: Optional HTTP headers (streamable_http only)sessionId: Optional persisted MCP session ID (streamable_http only)reconnectionOptions: SSE reconnection settings (streamable_http only)status: Current connection status ("connected", "connecting", "disconnected", or "error")enabled: Whether the server is enabledtoolsList: Array of tools provided by this server (same format as in/mcp/toolsresponse)logs: Array of captured log messages if the server encountered any issues
This endpoint is useful for monitoring the status of all MCP servers and understanding their configurations.
MCP Server Management
Get a Specific MCP Server
GET /mcp/servers/:name
Retrieves detailed information about a specific MCP server.
Parameters:
name: (Required) The name of the MCP server to retrieve
Response format:
{
"success": true,
"server": {
"name": "mcp-github",
"transportType": "stdio",
"command": "./node_modules/@missionsquad/mcp-github/build/index.js",
"args": ["--port", "3000"],
"env": {
"NODE_ENV": "production"
},
"status": "connected",
"enabled": true,
"toolsList": [
{
"name": "create_issue",
"description": "Creates a new issue in a GitHub repository",
"inputSchema": {
"type": "object",
"properties": {
"owner": {
"type": "string",
"description": "Repository owner"
},
"repo": {
"type": "string",
"description": "Repository name"
},
"title": {
"type": "string",
"description": "Issue title"
},
"body": {
"type": "string",
"description": "Issue body"
},
"labels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Labels to apply to the issue"
},
"assignees": {
"type": "array",
"items": {
"type": "string"
},
"description": "Users to assign to the issue"
}
},
"required": ["owner", "repo", "title"]
}
}
],
"logs": []
}
}
Error response (server not found):
{
"success": false,
"error": "Server mcp-github not found"
}
api MCP questions
What tools does api MCP provide?
It exposes 9 tools, including success, tools, username, serverName, methodName.
How does the server handle sensitive credentials?
Instead of using environment variables, it stores credentials encrypted in MongoDB using AES-256-GCM encryption.
Does it support Python-based MCP servers?
Yes, it provides package management for Python servers, creating virtual environments and handling pip dependencies.
What transport protocols are supported?
The API supports both stdio and Streamable HTTP transport, including support for SSE fallback.