This MCP Server executable implements the Model Context Protocol, allowing you to run MCP services with advanced features like tool chain execution, multiple service management, and a pluggable tool system. It supports both WebSocket and standalone operation modes with flexible configuration options.
No special installation is required - simply download the executable file. The server can be run directly by double-clicking the executable or through command line instructions.
The simplest way to use MCP Server is to run it without any parameters:
./mcp_server.exe
This launches a standard MCP service with:
To connect to services like xiaozhi.me via WebSocket:
./mcp_server.exe --ws wss://api.xiaozhi.me/mcp/?token=...xxx --mcp-config ./examples/mcp-sse.json
Example configuration file (mcp-sse.json):
{
"mcpServers": {
"Model Server sse": {
"url": "http://127.0.0.1:3000"
},
"Model Server - stdio": {
"command": "xxxxx",
"args": [
"--transport",
"stdio"
]
}
},
"serverInfo": {
"serverName": "ws-client-mcp-server",
"version": "1.0.0",
"description": "WebSocket 客户端的 MCP 服务器实例",
"author": "shadow"
}
}
You can combine multiple MCP services using a configuration file:
./mcp_server.exe --mcp-config ./examples/mcp.json
Example configuration (mcp.json):
{
"mcpServers": {
"Model Server - sse": {
"url": "http://127.0.0.1:9090"
},
"Model Server - stdio": {
"command": "xxx",
"args": ["--transport", "stdio"]
}
}
}
Create powerful automation workflows by chaining tools together:
./mcp_server.exe --mcp-config ./examples/product-hunt/mcp-tool.json
Example tool chain configuration:
{
"toolChains": {
"browser_automation": {
"name": "browser_automation",
"description": "Automated browser operation process",
"steps": [
{
"toolName": "browser_navigate",
"args": {
"url": "https://example.com"
}
},
{
"toolName": "browser_execute_javascript",
"args": {
"code": "document.title"
},
"outputMapping": {
"selector": "content.0.text"
}
},
{
"toolName": "browser_close",
"args": {},
"fromStep": 0
}
],
"output": {
"steps": [1]
}
}
}
}
Create custom tools using JavaScript:
./mcp_server.exe --mcp-js ./my-custom-tools.js
Example custom tools configuration:
module.exports = {
configureMcp: function(server, ResourceTemplate, z) {
// Add custom tool
server.tool({
name: "myTool",
description: "Custom tool example",
parameters: {
// Parameter definitions
}
});
// Add custom resource
server.resource(/* ... */);
}
}
Run tools on a schedule:
./mcp_server.exe --cronjob
Integrate MCP Server into your applications:
// Node.js Example
const { spawn } = require('child_process');
const mcpServer = spawn('./mcp_server.exe', [
'--port', '3000',
'--transport', 'stdio'
]);
mcpServer.stdout.on('data', (data) => {
// Handle MCP server output
});
mcpServer.stdin.write(JSON.stringify({
// Send request to MCP server
}));
Argument | Description | Default |
---|---|---|
--ws <url> |
WebSocket server address | None |
--mcp-js <path> |
Configuration file path | Built-in config |
--port <port> |
Server listening port | 3000 |
--mcp-config <path/json> |
MCP configuration file path/json string | None |
--transport <mode> |
Transport mode ('sse' or 'stdio') | sse |
PORT
- Server port (default: 3000)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.