Cover image
Try Now
2024-12-04

Mirror ofhttps://github.com/rgarcia/mcp-server-server

3 years

Works with Finder

0

Github Watches

1

Github Forks

0

Github Stars

mcp-server-server

This repo is a proof of concept MCP server that lets you spin up ... other MCP servers.

But...why?

MCP servers are hard to use.

The primary transport mechanism for MCP servers is stdio, i.e. in your MCP client program you need to spawn a new process for the MCP server you want to use. This has downsides:

  1. It's cumbersome--every MCP client needs to be a process manager now. The way you configure Claude Desktop to use MCP servers is a good demonstration of this--it needs a list of processes to run.
  2. It creates an infra problem: if you have many users, all of which require different MCP server configurations (e.g. they all have different credentials for underlying MCP servers like Github, Google Drive, etc.), then you now have tons of processes to operate and route client requests to.

A better way

What if MCP servers were actually... servers? I.e. communication with them happened over the network instead of stdio? Then you could have an easier time using them programatically.

Step 1: Convert a stdio MCP server to a websocket MCP server

This repo contains a wrapper program that will take an existing MCP server (here is a list of the official ones, but they're all over now) and expose it via websocket:

bun run mcp-server -p 3001 -- npx -y @modelcontextprotocol/server-puppeteer@latest

Step 2: Interact with the MCP server programatically without managing processes

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();
bun run mcp-server-wrapper-client
$ bun run src/mcp-server-wrapper/example-client/example-client.ts
Tools: [ "puppeteer_navigate", "puppeteer_screenshot", "puppeteer_click", "puppeteer_fill",
  "puppeteer_evaluate"
]

Step 3: Make the MCP server server

TODO: We haven't solved problem 2, i.e. as an MCP client developer we still (in step 1) had to spawn a program for a specific MCP server + user configuration. What if there was a single MCP server that exposed tools to spin up

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://duotify.com
  • Professional code reviewer for a unique language, friendly and helpful.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Andris Teikmanis
  • Latvian GPT assistant for developing GPT applications

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Navid RezaeiSarchoghaei
  • Professional Flask/SQLAlchemy code guide. Follow: https://x.com/navid_re

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • https://cantaspinar.com
  • Summarizes videos and answers related questions.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • apappascs
  • Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • OffchainLabs
  • Go implementation of Ethereum proof of stake

  • huahuayu
  • A unified API gateway for integrating multiple etherscan-like blockchain explorer APIs with Model Context Protocol (MCP) support for AI assistants.

  • deemkeen
  • control your mbot2 with a power combo: mqtt+mcp+llm

    Reviews

    5 (1)
    Avatar
    user_S3vQ6f6z
    2025-04-15

    I've been using the Filesystem MCP Server by sylphlab and I must say it's phenomenal. Simplifies file management and integration like no other tool I've tried. Its seamless performance and user-friendly interface make it a must-have for anyone looking to enhance their server capabilities. Highly recommend! Check it out here: https://mcp.so/server/filesystem-mcp/sylphlab