drio
Open app

mcp-runner

Source

A TypeScript SDK for running MCP (Model Context Protocol) servers with process reuse capabilities

Catalog onlyCatalog onlySTDIO

Overview

mcp-runner is a TypeScript SDK and CLI designed for running MCP (Model Context Protocol) servers with process reuse capabilities, allowing for efficient server management and execution.

To use mcp-runner, install it via npm and utilize the command-line interface or import it into your TypeScript projects to run MCP servers based on configurations defined in cline_mcp_settings.json.

  • Server process reuse across multiple calls - Graceful termination with timeout handling - Automatic server lifecycle management - TypeScript support - Comprehensive error handling and logging
  1. Running multiple MCP server instances efficiently.
  2. Managing server processes for various tools in a single application.
  3. Automating server interactions in TypeScript projects.

Add to your AI client

Use these steps to connect mcp-runner in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mcp-runner-cookiecad": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-runner-cookiecad"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mcp-runner-cookiecad": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-runner-cookiecad"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mcp-runner-cookiecad": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-runner-cookiecad"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-runner-cookiecad": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-runner-cookiecad"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-runner-cookiecad": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-runner-cookiecad"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mcp-runner-cookiecad": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-runner-cookiecad"
      ]
    }
  }
}

FAQ

Can mcp-runner be used with any MCP server?

Yes! `mcp-runner` is designed to work with any server that follows the Model Context Protocol.

Is there a command-line interface available?

Yes! `mcp-runner` includes a CLI for easy interaction with MCP servers.

How do I handle errors while using mcp-runner?

The SDK includes comprehensive error handling for server process errors, tool execution errors, and timeout handling.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":818,"uuid":"19c5dc74-50e3-4a01-866a-e2ca875cb2f5","name":"mcp-runner","title":"mcp-runner","description":"A TypeScript SDK for running MCP (Model Context Protocol) servers with process reuse capabilities","avatar_url":"https://avatars.githubusercontent.com/u/112745779?v=4","created_at":"2025-01-28T02:13:23.195Z","updated_at":"2025-02-23T07:20:27.939Z","status":"created","author_name":"cookiecad","author_avatar_url":"https://avatars.githubusercontent.com/u/112745779?v=4","tags":"mcp-runner,typescript-sdk,mcp-servers","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/cookiecad/mcp-runner","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":null,"user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]