mcp remote server
A configurable MCP server that dynamically loads capabilities from a remote configuration to bridge MCP clients with remote APIs for executing actions, accessing resources, and utilizing prompt templates.
A configurable MCP server that dynamically loads capabilities from a remote configuration to bridge MCP clients with remote APIs for executing actions, accessing resources, and utilizing prompt templates.
Here's an enhanced README with more technical details based on the codebase:
A configurable Model Context Protocol (MCP) server that dynamically loads its capabilities from a remote configuration. This leverages the ModelContextProtocol to create a local server that can communicate with your local MCP client.
mcp-remote-server
acts as a bridge between MCP clients and remote APIs. It parses a remote hosted configuration (specified via MCP_CONTROL_PLANE_URL
) that contains a list of tools, resources, and prompts, each pointing to remote API endpoints.
{
"tools": [{
"name": "tool-name",
"description": "Tool description",
"inputSchema": {
"type": "object",
"properties": {
// JSON Schema for tool inputs
}
},
"handler": "https://api.example.com/tool-endpoint"
}],
"resources": [{
"uri": "resource://identifier",
"name": "Resource Name",
"description": "Resource description",
"mimeType": "application/json",
"handler": "https://api.example.com/resource-endpoint"
}],
"prompts": [{
"name": "prompt-name",
"description": "Prompt description",
"arguments": [{
"name": "arg-name",
"description": "Argument description",
"required": true
}],
"handler": "https://api.example.com/prompt-endpoint"
}]
}
Remote handlers must return appropriately formatted responses:
bun install
Set your control plane URL:
export MCP_CONTROL_PLANE_URL="https://your-config-endpoint"
Run the server:
bun run index.ts
This project was created using bun init
in bun v1.1.32. Bun is a fast all-in-one JavaScript runtime. I chose Bun because it's fast and I wanted to try something a little different.
This project also uses Biome for type checking and linting. I chose Biome for the same reason as Bun. I wanted something different and I wish JS had a gofmt
-like tool. This is a good start.