SSE-based multi-connection MCP server framework

SSE-based multi-connection MCP server framework

multiservermcp•byarrenxxxxx

A TypeScript framework for building MCP servers over SSE that accept multiple client connections, with URL-grouped tool permissions and global session context access.

License: MIT•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Creates an MCP server that starts in SSE mode and accepts multiple simultaneous client connections.
  • •Supports registering regular tools, resource templates and prompts on the server.
  • •Groups tools by URL path segments to manage permissions, configurable with enableUrlGroups.
  • •Exposes global helpers to retrieve SSE request query parameters and client context by sessionId.

BEST FOR

  • •Developers building a single MCP server that must serve many AI assistant clients over SSE.
  • •Teams needing per-client tool permissions based on URL grouping.
  • •Applications that need access to client context and request parameters outside the tool handler.

ABOUT MULTISERVERMCP

SSE-based multi-connection MCP server framework is cataloged as an MCP server attributed to arrenxxxxx. A TypeScript framework for building MCP servers over SSE that accept multiple client connections, with URL-grouped tool permissions and global session context access. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for SSE-based multi-connection MCP server framework are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does MultiServerMCP support transports other than SSE?

No, the README states that only SSE mode is currently supported.

Can several clients connect to the same MultiServerMCP server at once?

Yes, the framework is built to support multiple client connections to a single server in SSE mode.

Upstream README

View this exact version on GitHub

README.md · 830c2a2452d4 · Fetched 2026-11-13 10:57:10 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

MultiServerMCP

A multi-connection MCP server framework based on SSE for long-connection communication. Provides context and functional extension capabilities for AI assistants. Currently only supports SSE mode.

License: MIT English 中文简体

🚀 MultiServerMCP — Enable AI assistants with extended capabilities through multi-connection server framework!

MultiServerMCP is designed to provide a robust server framework that supports multiple client connections to a single server, allowing for efficient tool and permission management for AI assistants.

🌟 Main Features

  • Support for multiple client connections to a single server in SSE mode
  • Tool and permission management by URL grouping
  • Built-in heartbeat mechanism to ensure connection stability
  • Simplified tool registration process
  • Full compatibility with MCP protocol
  • Global session management with SessionManager to access client context anywhere
  • Convenient global functions to retrieve request parameters and client context by sessionId

📦 Installation

npm install multi-server-mcp
# or
yarn add multi-server-mcp
# or
pnpm add multi-server-mcp

🚀 Quick Start

Complete Server Example

import { z } from "zod";
import { MultiServerMCP } from "multi-server-mcp";
import { ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
import { getSseReqQuery } from "multi-server-mcp";

// Create MCP server with URL grouping enabled
const server = new MultiServerMCP(
  {
    name: "multi server",
    version: "1.0.0",
  },
  {
    enableUrlGroups: true,
  }
);

// Register a calculator tool that uses request parameters
server.tool("calc/add", { a: z.number(), b: z.number() }, async ({ a, b }, extra) => {
  console.log(extra);
  // Get query parameters from the SSE connection
  const reqQuery = getSseReqQuery(extra.sessionId as string);
  console.log(reqQuery);
  return {
    content: [{ type: "text", text: String(a + b) }],
  };
});

// Register a resource template
server.resource(
  "greeting",
  new ResourceTemplate("greeting://{name}", { list: undefined }),
  async (uri, { name }) => ({
    contents: [
      {
        uri: uri.href,
        text: `Hello, ${name}!`,
      },
    ],
  })
);

// Start the server
server
  .start({
    transportType: "sse",
  })
  .then(() => {
    console.log(`Server started`);
  })
  .catch((error) => {
    console.error(`Server start failed: ${error}`);
    process.exit(1);
  });

Basic Usage

import { MultiServerMCP } from 'multi-server-mcp';

// Create MCP server instance
const server = new MultiServerMCP({
  name: 'my-mcp-server',
  version: '1.0.0'
});

// Register a tool
server.tool('my-tool', async () => {
  return {
    content: [{ type: 'text', text: 'Tool executed successfully!' }]
  };
});

// Start the server
server.start({
  transportType: 'sse',
  sse: {
    port: 3000,
    endpoint: '/mcp',
    messagesEndpoint: '/mcp-messages'
  }
});

Tool Grouping and Permission Management

// Register a tool with grouping
server.tool('group1/group2/my-tool', async () => {
  return {
    content: [{ type: 'text', text: 'Tool executed successfully!' }]
  };
});

// Start server with permission management
server.start({
  transportType: 'sse',
  enableUrlGroups: true
});

Accessing Client Context Globally

import { getSseReqQuery, getClientContextBySessionId } from 'multi-server-mcp';
import { z } from "zod";

// Register a tool that uses request parameters
server.tool("calc/add", { a: z.number(), b: z.number() }, async ({ a, b }, extra) => {
  // Get request parameters from the SSE connection
  const reqQuery = getSseReqQuery(extra.sessionId as string);
  console.log('Query parameters:', reqQuery);
  
  return {
    content: [{ type: "text", text: String(a + b) }],
  };
});

// In any part of your code, you can also access client's request parameters
function myFunction(sessionId: string) {
  // Get query parameters from the SSE connection request
  const reqQuery = getSseReqQuery(sessionId);
  console.log('Client query parameters:', reqQuery);
  
  // Get the full client context if needed
  const clientContext = getClientContextBySessionId(sessionId);
  if (clientContext) {
    console.log('Client URL groups:', clientContext.urlGroups);
    // Access any other client context properties
  }
}

🔧 Development Guide

Currently only SSE mode is supported.

Supported Tool Types

  • Regular tools: server.tool()
  • Resource tools: server.resource()
  • Prompt tools: server.prompt()

Session Management

The SessionManager provides a singleton instance to manage client sessions:

  • SessionManager.getInstance(): Get the singleton instance
  • SessionManager.getInstance().getClientContext(sessionId): Get client context by sessionId
  • SessionManager.getInstance().getReqQuery(sessionId): Get request query parameters by sessionId
  • SessionManager.getInstance().getSessionCount(): Get the count of active sessions

For convenience, the following global functions are provided:

  • getSseReqQuery(sessionId): Get request query parameters by sessionId
  • getClientContextBySessionId(sessionId): Get client context by sessionId

🤝 Contributing

Contributions, issues, and feature requests are welcome!

📄 License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for SSE-based multi-connection MCP server framework from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/multiservermcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools