Simplify MCP server usage by converting stdio servers to network-based ones for easier programmatic interaction
mcp-server-server is a proof of concept implementation that aims to address the challenges associated with using MCP servers by providing an easier, more flexible solution for AI application development. Traditionally, working with MCP servers has required spawning new processes via stdio, which can be cumbersome and problematic when scaling infrastructure.
This server leverages websockets to expose MCP servers over the network, eliminating the process management overhead on the client side. This allows for more streamlined and scalable interaction between AI applications like Claude Desktop, Continue, Cursor, and others, and their respective data sources or tools. Key features of this implementation include:
The architecture of mcp-server-server is centered around converting an existing MCP server into a network-based one using websockets. This conversion involves wrapping the stdio-based server in a program that connects it over websockets, making it accessible from anywhere via a standard URL.
This can be achieved by running:
bun run mcp-server -p <port> -- npx -y @modelcontextprotocol/server-puppeteer@latest
In this command, the mcp-server tool wraps the specified MCP server and binds it to a websockets endpoint.
Here's an example of how to interact with the MCP server using TypeScript:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { WebSocketClientTransport } from "@modelcontextprotocol/sdk/client/websocket.js";
const transport = new WebSocketClientTransport(new URL("ws://localhost:3001"));
const client = new Client(
{
name: "example-client",
version: "1.0.0",
},
{
capabilities: {},
}
);
await client.connect(transport);
const tools = await client.listTools();
console.log(
"Tools:",
tools.tools.map((t) => t.name)
);
await client.close();
This example demonstrates connecting to an MCP server via websockets and listing available tools.
To get started, you need to have Node.js installed. You can install mcp-server using npm or yarn:
npm install -g @modelcontextprotocol/server-wrapper
# Or
yarn global add @modelcontextprotocol/server-wrapper
Next, configure your MCP server by running the mcp-server command with the appropriate arguments.
mcp-server-server supports a range of popular MCP clients, including:
See the compatibility matrix below for more details:
| MCP Client | Resources | Tools | Prompts | Status |
|---|---|---|---|---|
| Claude Desktop | ✅ | ✅ | ✅ | Full Support |
| Continue | ✅ | ✅ | ✅ | Full Support |
| Cursor | ❌ | ✅ | ❌ | Tools Only |
mcp-server-server is designed to offer excellent performance, leveraging websockets for efficient data transfer. The protocol flow and data architecture are optimized for handling high volumes of data and requests.
graph TD
A[AI Application] -->|MCP Client API| B[MCP Server]
B --> C[MCP Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
graph TB
A[Data Resource] -->|Network| B[Clients/MCP Servers]
C[Server Configuration] --> D[Clients/MCP Servers]
I[MCP Client API] --> J[Data Resource]
E[Data Processing Logic] --> F[Client Responses]
H[Clients] --> G[mcp-server-server]
style A fill:#e8f5e8
style C fill:#e1f5fe
style D fill:#f3e5f5
Advanced configuration and security features include:
{
"mcpServers": {
"[server-name]": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-[name]"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
How do I integrate mcp-server-server with my existing AI applications?
mcp-server command-line tool.Is there documentation for all available tools and their integration details?
Can I use mcp-server-server with any MCP client?
How do I ensure security when using websockets for MCP servers?
What are the performance considerations when running mcp-server-server in production?
Contributors can fork the repository, make their changes, and submit pull requests. Issues and feature requests are welcomed as well. For more information, refer to the CONTRIBUTING.md file in the repository.
The MCP (Model Context Protocol) ecosystem includes a variety of resources for developers building AI applications and integrating MCP servers:
By contributing to mcp-server-server, you can enhance the capabilities of AI applications and enable more seamless integration across different tools and data sources.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration