MCP ExplorerExplorer

Mcp Bundler

@wrtnlabson 9 months ago
11 MIT
FreeCommunity
AI Systems
WIP

Overview

What is Mcp Bundler

mcp-bundler is a tool designed to facilitate the integration and management of multiple MCP servers, allowing developers to bundle various services together seamlessly.

Use cases

Use cases for mcp-bundler include building applications that require real-time collaboration tools, integrating design tools like Figma with backend services, and creating custom server setups for various client applications.

How to use

To use mcp-bundler, import it along with the necessary MCP server SDKs, configure the servers in the bundler function with their respective commands and arguments, and then run the server instance.

Key features

Key features of mcp-bundler include support for multiple server configurations, the ability to run servers in different modes (stdio, SSE, InMemory), and easy integration with various services like Figma and Notion.

Where to use

mcp-bundler can be used in software development projects that require the coordination of multiple MCP servers, particularly in environments where real-time data processing and service integration are essential.

Content

MCP Bundler

Have MCP server setups been too complicated until now?
Was it difficult to share MCP settings with each other?

This is a library that lets you bundle an MCP server setup easily.

Usage

import type { Server } from "@modelcontextprotocol/sdk/server/index.js";

import { createServer } from "@wrtnlabs/calculator-mcp";
import { bundler, RequiredEnv } from "@wrtnlabs/mcp-bundler";

export const server: Server = bundler({
  name: "The cool Server",
  version: "0.0.1",
  mcpServers: {
    figma: {
      command: "bun",
      args: [
        "--watch",
        "/path/to/figma-mcp/src/index.ts",
      ],
      env: {
        FIGMA_PERSONAL_ACCESS_TOKEN: RequiredEnv,
        PORT: RequiredEnv,
      },
    },
    calculator: createServer({
      name: "calculator",
      version: "1.0.0"
    }),
    notionApi: {
      command: "npx",
      args: ["-y", "@notionhq/notion-mcp-server"],
      env: {
        OPENAPI_MCP_HEADERS: RequiredEnv,
      },
    },
  },
})();

stdio mode

> npx example-mcp

SSE mode

> npx example-mcp -p 4506

InMemory mode

import { Server } from "example-mcp";
// other import statement

const client = new Client({
  name: "test client",
  version: "0.1.0",
});

const server = createServer({
  name: "calculator",
  version: "1.0.0"
});

const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();

await Promise.all([
  client.connect(clientTransport),
  server.connect(serverTransport),
]);

in other ide and options

{
  "mcpServers": {
    "example-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "example-mcp@latest"
      ]
    }
  }
}

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers