- Home
- MCP servers
- MCP Relay Server
MCP Relay Server
- javascript
0
GitHub Stars
javascript
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"econ-watch-mcprelay": {
"command": "node",
"args": [
"dist/httpServer.js"
],
"env": {
"SUPABASE_URL": "https://YOUR_PROJECT.supabase.co",
"CONTEXT7_API_KEY": "YOUR_TOKEN",
"SUPABASE_ANON_KEY": "YOUR_KEY"
}
}
}
}You can run a lightweight MCP relay that exposes provider-specific tools and relays HTTP requests to configured providers. This server lets you query multiple providers through unified MCP tools and routes, making it simple to compose actions across services like Supabase, Context7, and Vercel from a single MCP gateway.
How to use
You interact with the MCP relay by issuing tool calls that target a provider’s resources through the unified MCP interface. The server exposes a base relay tool named relay.list_providers to discover configured providers, and individual provider tools in the form provider.<name>.request that map an HTTP path, method, headers, and body to the configured provider. Use these tools to perform common actions such as querying data, invoking REST endpoints, or performing provider-specific operations through the MCP gateway.
How to install
Prerequisites you need before installing: a Node.js runtime and npm (Node.js 14+ is typical for MCP servers). Ensure you have access to a shell or terminal where you can set environment variables and run commands.
Provider configuration
Configure each provider under the providers directory as JSON files. The MCP server uses these definitions to create the corresponding tools and to relay requests to the correct remote services.
{
"name": "supabase",
"type": "http",
"baseUrl": "https://YOUR_PROJECT.supabase.co",
"description": "Supabase REST API",
"auth": {
"type": "bearer",
"env": "SUPABASE_TOKEN"
},
"defaultHeaders": {
"apikey": "${SUPABASE_ANON_KEY}"
},
"allowMethods": ["GET", "POST"],
"allowPaths": ["/rest/v1/"]
}
Note: set any secrets via environment variables. ${ENV_VAR} placeholders are expanded at runtime. For example, VERCEL_TOKEN, CONTEXT7_API_KEY, SUPABASE_URL, and SUPABASE_ANON_KEY may be used by various providers.
## One-click deploy notes
You can deploy the MCP relay to hosting services that support long-running HTTP servers or serverless functions. Typical approaches run the MCP relay and expose the path `/mcp` for MCP requests. Set provider tokens and URLs in your hosting dashboard as environment variables to enable provider access.
## HTTP and stdio start commands
To run the MCP relay locally in stdio mode, first install dependencies and build, then start the runtime as shown.
npm install npm run build node dist/index.js
To run the relay with HTTP transport, start the HTTP server that exposes the MCP path (for example at `/mcp`).
Available tools
provider.supabase.request
Sends a request to the configured Supabase provider using the specified path, method, headers, query, and body.
provider.vercel.request
Sends a request to the configured Vercel provider using the specified path, method, headers, query, and body.
relay.list_providers
Lists all configured MCP providers exposed by the relay.