This Meta MCP Proxy allows you to combine multiple Model Context Protocol (MCP) servers and JavaScript functions under a single interface, intelligently routing tool discovery and execution. It performs a type of "Local RAG" to reduce context size, making it efficient even with hundreds of available tools.
To install and set up the Meta MCP Proxy with Claude:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"mcp-openapi-proxy": {
"command": "npx",
"args": ["@nullplatform/meta-mcp-proxy","-f","config.json"]
}
}
}
Create a config.json
file to specify your MCP servers and other settings:
{
"discoverDescriptionExtras": "Additional description for discovery",
"discoverLimit": 10,
"mcpServers": {
"server-name": {
"command": "command-to-execute",
"args": ["arg1", "arg2"],
"env": {
"ENV_VAR1": "value1",
"ENV_VAR2": "value2"
},
"transport": "stdio"
}
}
}
Here's an example configuration for a pet store API:
{
"discoverDescriptionExtras": "Api used to manage a pet store with access to pets, pet types, users, orders and store",
"mcpServers": {
"mcp-petstore": {
"command": "uvx",
"args": ["mcp-openapi-proxy"],
"env": {
"OPENAPI_SPEC_URL": "https://petstore.swagger.io/v2/swagger.json",
"API_KEY": "xxxxx"
}
}
}
}
You can also integrate Meta MCP Proxy into your own applications:
import { MCPProxy } from '@nullplatform/meta-mcp-proxy';
// Create a new proxy instance
const mcpProxy = new MCPProxy({
mcpServers: {
"my-server": {
"command": "path/to/server",
"args": [],
"env": {}
}
},
discoverLimit: 10
});
// Register a custom JavaScript function
mcpProxy.registerJsFunction(
"myFunction",
"Description of my function",
{
properties: {
param1: {
type: "string",
description: "First parameter"
},
param2: {
type: "number",
description: "Second parameter"
}
},
required: ["param1"]
},
async ({ param1, param2 }) => {
// Implementation goes here
return {
content: [
{
type: "text",
text: JSON.stringify({ result: `Processed ${param1}` })
}
]
};
}
);
// Start the MCP server
await mcpProxy.startMCP();
Add detailed descriptions about your tools to help the LLM understand when to use them. This is highly recommended for better tool selection.
Set the maximum number of tools to return during discovery (default: 10).
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.