mcp-runner

by cookiecad

307 downloads
Not rated
GitHub

About

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

Details

Author
cookiecad
Downloads
307
Categories
Other

- Server process reuse across multiple calls
- Graceful termination with timeout handling
- Automatic server lifecycle management
- TypeScript support
- Error handling and logging
- Single server process at a time (singleton)

Install via npm install, then use CLI commands (e.g., npm run cli -- list-tools <server-name> or npm run cli -- runserver <server-name> [tool-name] [params] [options]). Alternatively, import runServer and terminateServer in your TypeScript code.

mcp-runner

A TypeScript SDK and CLI for running MCP (Model Context Protocol) servers.

Overview

mcp-runner is designed to facilitate the execution of MCP servers based on configurations defined in cline_mcp_settings.json. It supports reusable server processes and controlled cleanup, allowing multiple operations to be performed using the same server instance.

You can call it from the command line or use it as a library in your own TypeScript projects or even from other MCP servers.

Features

- Server process reuse across multiple calls
- Graceful termination with timeout handling
- Automatic server lifecycle management
- TypeScript support
- Error handling and logging

Installation

npm install

CLI Usage

The package includes a command-line interface for interacting with MCP servers.

Commands

List Tools

Lists all available tools for a specified MCP server:
npm run cli -- list-tools <server-name>

Example:

npm run cli -- list-tools sequential-thinking

Run Server

Runs a specified MCP server with optional tool name and parameters: ```bash npm run cli -- runserver <server-name> [tool-name] [params] [options]
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.