Shadow MCP Server MCP server

Standalone MCP server executable for Windows, macOS, and other platforms that uses JavaScript configuration files to define resources, tools, and prompts without requiring Node.js installation.
Back to servers
Provider
shadow
Release date
May 16, 2025
Language
JavaScript
Stats
38 stars

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.

Installation

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.

Basic Usage

Starting a Standalone Server

The simplest way to use MCP Server is to run it without any parameters:

./mcp_server.exe

This launches a standard MCP service with:

  • Default port: 3000
  • Standard endpoints: /mcp, /sse, /messages
  • Built-in basic tools

Connecting to WebSocket Services

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"
    }
}

Combining Multiple MCP Services

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"]
      }
    }
}

Advanced Usage

Tool Chain Execution

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]
            }
        }
    }
}

Custom Tools with JavaScript

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(/* ... */);
  }
}

Scheduled Tasks

Run tools on a schedule:

./mcp_server.exe --cronjob

Embedded Integration

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
}));

Command Line Arguments

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

Environment Variables

  • PORT - Server port (default: 3000)

How to add this MCP server to Cursor

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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later