MCP Stdio Wrapper

MCP Stdio Wrapper

A development tool that serves as a bridge to launch and inspect other stdio MCP servers on demand, ensuring a clean process for every operation. It enables developers to bypass host caching issues by providing tools to list and call target server components during active development.

Category
Visit Server

README

MCP Stdio Wrapper

CI CodeQL OpenSSF Scorecard Publish License: MIT GitHub stars

MCP Stdio Wrapper is a small MCP server that lets one MCP client launch and inspect another stdio MCP server on demand.

Its job is to remove a painful MCP development loop: some mainstream MCP hosts cache the real server process, so after every code change you end up refreshing the window or restarting the extension host just to smoke-test the change. This wrapper sits in front of the real target server and gives your agent a stable bridge for repeated smoke tests while the target implementation keeps changing underneath it.

Why This Exists

Use this project when:

  • you are actively developing a stdio MCP server
  • your main MCP host does not reliably reload the target server after each change
  • you still want an agent to list tools, call tools, read resources, and inspect prompts throughout development

This project is intentionally narrow. It is for local development and smoke testing, not for production traffic proxying.

The wrapper also exposes built-in guidance that agents can discover directly:

  • resource: wrapper://how-to-use
  • prompt: tool_usage_guide

How It Works

The wrapper exposes two modes.

Default one-shot tools:

  • stdio_mcp_list_tools
  • stdio_mcp_call_tool
  • stdio_mcp_list_resources
  • stdio_mcp_read_resource
  • stdio_mcp_list_prompts
  • stdio_mcp_get_prompt

Each one-shot bridge call:

  1. launches the target stdio MCP server
  2. performs one MCP operation
  3. returns the result
  4. closes the target process

Optional session tools:

  • stdio_mcp_open_session
  • stdio_mcp_get_session
  • stdio_mcp_close_session
  • stdio_mcp_session_list_tools
  • stdio_mcp_session_call_tool
  • stdio_mcp_session_list_resources
  • stdio_mcp_session_read_resource
  • stdio_mcp_session_list_prompts
  • stdio_mcp_session_get_prompt

That means:

  • a clean target process per one-shot smoke test
  • an explicit short-lived session option for multi-step validation
  • no hidden caching behavior
  • easier debugging because target stderr is surfaced on failure

Quick Start

Clone the repo and install dependencies:

nvm use
npm install

Start the wrapper:

npm start

The published package can also be run directly with:

npx mcp-stdio-wrapper

The package is published at https://www.npmjs.com/package/mcp-stdio-wrapper.

This repo is set up for npm trusted publishing from GitHub Actions. See Publishing checklist for the initial publish sequence and the OIDC trusted-publishing handoff.

Point your main MCP client at this wrapper, then use one of the bridge tools with launch input like:

{
  "command": "node",
  "args": ["C:\\path\\to\\your-mcp\\dist\\index.js"],
  "cwd": "C:\\path\\to\\your-mcp",
  "inheritParentEnv": true,
  "env": {
    "EXAMPLE_ENV": "value"
  },
  "timeoutMs": 30000
}

Then ask your agent to:

  • list tools from the real target server
  • call one target tool after each code change
  • verify resource reads or prompts

If you need to preserve target process state across several calls, open an explicit session first and then use the stdio_mcp_session_* tools before closing it.

Tool Surface

Common launch fields:

  • command: target executable
  • args: target command arguments
  • cwd: optional target working directory
  • inheritParentEnv: when true, merge the wrapper process environment into the target launch
  • env: additional target environment variables
  • timeoutMs: max time for target launch and operation

Bridge operations:

  • stdio_mcp_list_tools: inspect target tools
  • stdio_mcp_call_tool: call one target tool
  • stdio_mcp_list_resources: inspect target resources
  • stdio_mcp_read_resource: read one target resource
  • stdio_mcp_list_prompts: inspect target prompts
  • stdio_mcp_get_prompt: fetch one target prompt definition

Session operations:

  • stdio_mcp_open_session: launch one target process and keep it alive for multiple operations
  • stdio_mcp_get_session: inspect session diagnostics like status, timestamps, pid, exit code, and stderr tail
  • stdio_mcp_close_session: close a live or terminal session and remove its record
  • stdio_mcp_session_list_tools: inspect tools through an existing session
  • stdio_mcp_session_call_tool: call one target tool through an existing session
  • stdio_mcp_session_list_resources: inspect resources through an existing session
  • stdio_mcp_session_read_resource: read one target resource through an existing session
  • stdio_mcp_session_list_prompts: inspect prompts through an existing session
  • stdio_mcp_session_get_prompt: fetch one target prompt definition through an existing session

Wrapper guidance surfaces:

  • wrapper://how-to-use: plain-text usage guide
  • tool_usage_guide: prompt form of the same instructions

Safety Notes

  • This wrapper launches arbitrary commands supplied by the caller.
  • Treat launch arguments and env vars as sensitive.
  • Only use it with trusted target commands and trusted local projects.
  • Do not expose this as a public multi-tenant service.

Documentation

Star History

Star History Chart

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured