TM

timothywangdev/mcptoolkit

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

12 stars 4 forks 品質 44 トレンド 8

The standard FastMCP framework faces significant challenges in production environments: - : Traditional FastMCP servers maintain state in memory, making horizontal scaling difficult - : Serverless...

概要

The standard FastMCP framework faces significant challenges in production environments: - : Traditional FastMCP servers maintain state in memory, making horizontal scaling difficult - : Serverless environments require stateless architectures, which FastMCP wasn't designed for - : Running multiple tenants on the same server requires complex session management Managing authentication for MCP servers is complex: - : Users should only authenticate when a tool requires it - : Supporting OAuth for services like Notion, Slack, etc. requires complex token management - : Managing multiple authentication flows while maintaining security is challenging MCPToolKit provides a production-ready framework that solves these problems while maintaining full compatibility with FastMCP. Here's how it works: This architecture diagram illustrates how MCPToolKit enables production-ready MCP servers: 1. (e.g., Claude, ChatGPT, Cursor) initiate requests to the MCP server.

README

以下は原文 README の抜粋です。原文を見る。

MCPToolKit - Production-Ready MCP Server Framework

The Problems We Solve

1. Scaling MCP Servers in Production

The standard FastMCP framework faces significant challenges in production environments:

  • State Management: Traditional FastMCP servers maintain state in memory, making horizontal scaling difficult
  • Serverless Limitations: Serverless environments require stateless architectures, which FastMCP wasn’t designed for
  • Multi-tenant Support: Running multiple tenants on the same server requires complex session management

2. Delegated OAuth Support

Managing authentication for MCP servers is complex:

  • Tool-Level Auth: Users should only authenticate when a tool requires it
  • Third-Party Integration: Supporting OAuth for services like Notion, Slack, etc. requires complex token management
  • Security: Managing multiple authentication flows while maintaining security is challenging

Our Solution

MCPToolKit provides a production-ready framework that solves these problems while maintaining full compatibility with FastMCP. Here’s how it works:

graph TD
    A[LLM Cliente.g. Claude, ChatGPT, Cursor] --> B[Load Balancer]
    B --> C[MCP Server Instance 1with Redis State]
    B --> D[MCP Server Instance 2with Redis State]
    B --> E[MCP Server Instance Nwith Redis State]
    C --> F[RedisSession State & OAuth Tokens]
    D --> F
    E --> F
    C --> H[MCP Authorization ServerOAuth 2.1 & PKCE]
    D --> H
    E --> H
    H --> G[OAuth ProvidersNotion, Slack, etc.]
    style H fill:#f9f,stroke:#333,stroke-width:2px

This architecture diagram illustrates how MCPToolKit enables production-ready MCP servers:

  1. LLM Clients (e.g., Claude, ChatGPT, Cursor) initiate requests to the MCP server. These clients can be any application that needs to interact with MCP tools.

  2. Load Balancer distributes incoming requests across multiple MCP server instances, enabling horizontal scaling and high availability.

  3. MCP Server Instances (1 through N) handle tool execution and resource access. Each instance:

    • Maintains its own Redis state for session persistence
    • Can handle requests independently
    • Shares the same codebase and configuration
    • Can be scaled horizontally based on demand
  4. Redis serves as the central state store, providing:

    • Session state persistence across server restarts
    • OAuth token storage and management
    • Shared state between server instances
    • Enables stateless server instances
  5. MCP Authorization Server (highlighted in pink) manages all OAuth-related operations:

    • Implements OAuth 2.1 with PKCE for secure authentication
    • Handles token issuance and refresh
    • Manages consent flows
    • Centralizes OAuth logic for all server instances
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →