mcp-runner
by cookiecad
mcp-runner is a TypeScript SDK and CLI for running MCP (Model Context Protocol) servers. It facilitates the execution of MCP servers based on configurations, supporting reusable server processes and controlled cleanup.
Last updated: N/A
What is mcp-runner?
mcp-runner is a TypeScript SDK and CLI designed to facilitate the execution of MCP servers based on configurations defined in cline_mcp_settings.json
. It allows for reusable server processes and controlled cleanup, enabling multiple operations to be performed using the same server instance.
How to use mcp-runner?
mcp-runner can be used either from the command line using the provided CLI, or as a library within your own TypeScript projects. The CLI allows you to list available tools and run servers with specified parameters. The SDK provides functions like runServer
and terminateServer
to manage server processes programmatically.
Key features of mcp-runner
Server process reuse across multiple calls
Graceful termination with timeout handling
Automatic server lifecycle management
TypeScript support
Use cases of mcp-runner
Running multiple tools on a single MCP server instance
Integrating MCP server functionality into TypeScript applications
Automating MCP server execution via CLI
Managing server lifecycle programmatically
FAQ from mcp-runner
What is MCP?
What is MCP?
MCP stands for Model Context Protocol, likely a protocol for interacting with machine learning models.
How do I configure the servers?
How do I configure the servers?
Server configurations are read from cline_mcp_settings.json
, which should be located in the standard configuration directory.
How do I terminate the server?
How do I terminate the server?
Use the terminateServer()
function in the SDK or ensure graceful termination via timeout handling.
Can I use this with other languages?
Can I use this with other languages?
While the SDK is in TypeScript, the CLI can be invoked from other languages. Additionally, MCP servers may be written in other languages.
Where can I find the license?
Where can I find the license?
The project is licensed under the Mozilla Public License 2.0. See the LICENSE file for details.