Logo MCP Access Point

MCP Access Point

Cộng đồng
sxhxliang

Turn a web server into an MCP server in one click without making any code changes.

Nhà phát hànhsxhxliang
Kho mãmcp-access-point
Ngôn ngữRust
Bản fork
31
Sao
184
Công cụ có sẵn
0
Phương thức truyền tảistdio
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    MCP Access Point cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    184 sao và 31 bản fork từ kho mã được liên kết.

MCP Access Point

MCP Access Point is a lightweight protocol conversion gateway tool designed to establish a communication bridge between traditional HTTP services and MCP (Model Context Protocol) clients. It enables MCP clients to interact directly with existing HTTP services without requiring any server-side interface modifications.

Admin Dashboard

Introduction

This project is built on Pingora - an ultra-high performance gateway proxy library capable of supporting massive-scale request proxy services. Pingora has been used to build services that handle core traffic for the Cloudflare platform, consistently serving over 40 million requests per second across the internet for years. It has become the technical cornerstone supporting a significant proportion of traffic on the Cloudflare platform.

HTTP to MCP

This mode allows clients like Cursor Desktop to communicate with remote HTTP servers through SSE, even when the servers themselves don't support the SSE protocol.

  • Example setup includes two services:
    • Service 1 runs locally at 127.0.0.1:8090
    • Service 2 runs remotely at api.example.com
  • Through the MCP Access Point, both services can be converted to MCP services without any code modifications.
  • Clients communicate with Service 1 and Service 2 via the MCP protocol. The MCP Access Point automatically distinguishes MCP requests and forwards them to the appropriate backend services.

Transport Type (Specification)

Currently supports SSE and Streamable HTTP protocols:

  • ✅ Streamable HTTP (stateless) 2025-03-26
    • All services: ip:port/mcp
    • Single service: ip:port/api/{service_id}/mcp
  • ✅ SSE 2024-11-05
    • All services: ip:port/sse
    • Single service: ip:port/api/{service_id}/sse

use IP:PORT/sse for SSE use IP:PORT/mcp for Streamable HTTP

Supported MCP clients

Core Features

  • Protocol Conversion: Seamless conversion between HTTP and MCP protocols
  • Zero-Intrusive Integration: Full compatibility with existing HTTP services
  • Client Empowerment: Enables MCP clients to directly call standard HTTP services
  • Lightweight Proxy: Minimalist architecture with efficient protocol conversion
  • Multi-tenancy: Independent configuration and endpoints for each tenant
  • Runtime Configuration Management: Dynamic configuration updates without service restart
  • Admin API: RESTful API for real-time configuration management

Quick Start

Installation

bash
# Install from source
git clone https://github.com/sxhxliang/mcp-access-point.git
cd mcp-access-point
cargo run -- -c config.yaml

# Use inspector for debugging (start service first)
npx @modelcontextprotocol/inspector node build/index.js
# Access http://127.0.0.1:6274/
# Select "SSE" and enter 0.0.0.0:8080/sse, then click connect
# or select "Streamable HTTP" and enter 0.0.0.0:8080/mcp

Multi-tenancy Support

The MCP Access Gateway supports multi-tenancy, where each tenant can configure multiple MCP services accessible via:

  • /api/{mcp-service-id}/sse (for SSE)
  • /api/{mcp-service-id}/mcp (for Streamable HTTP)

Example configuration:

yaml
# config.yaml example (supports multiple services)

mcps:
  - id: service-1 # Access via /api/service-1/sse or /api/service-1/mcp
    ... # Service configuration
  - id: service-2 # Access via /api/service-2/sse or /api/service-2/mcp
    ... # Service configuration
  - id: service-3 # Access via /api/service-3/sse or /api/service-3/mcp
    ... # Service configuration

To access all services simultaneously, use:

  • 0.0.0.0:8080/mcp (Streamable HTTP)
  • 0.0.0.0:8080/sse (SSE)

Configuration Details

  1. -c config.yaml
    • -c (or --config) specifies the configuration file path (config.yaml).
    • This file defines the APIs that the MCP Access Point will proxy and convert.

config.yaml Example

The configuration file supports multi-tenancy, allowing independent configuration of upstream services and routing rules for each MCP service. Key configuration items include:

  1. mcps - MCP service list

    • id: Unique service identifier used to generate access paths
    • upstream_id: Associated upstream service ID
    • path: OpenAPI specification file path. Supports local files (e.g., config/openapi.json) and remote HTTP/HTTPS URLs (e.g., https://petstore.swagger.io/v2/swagger.json). Both JSON and YAML formats are supported.
    • routes: Custom routing configuration (optional)
    • upstream: Upstream service specific configuration (optional)
  2. upstreams - Upstream service configuration

    • id: Upstream service ID
    • nodes: Backend node addresses and weights
    • type: Load balancing algorithm (roundrobin/random/ip_hash)
    • scheme: Upstream protocol (http/https)
    • pass_host: HTTP Host header handling
    • upstream_host: Override Host header value

Complete configuration example:

yaml
# config.yaml example (supports multiple services)
mcps:
  - id: service-1 # Unique identifier, accessible via /api/service-1/sse or /api/service-1/mcp
    upstream_id: 1
    path: config/openapi_for_demo_patch1.json # Local OpenAPI spec path

  - id: service-2 # Unique identifier
    upstream_id: 2
    path: https://petstore.swagger.io/v2/swagger.json # Remote OpenAPI spec

  - id: service-3 
    upstream_id: 3
    routes: # Custom routing
      - id: 1
        operation_id: get_weather
        uri: /points/{latitude},{longitude}
        method: GET
        meta:
          name: Get Weather
          description: Retrieve weather information by coordinates
          inputSchema: # Optional input validation
            type: object
            required:
              - latitude
              - longitude
            properties:
              latitude:
                type: number
                minimum: -90
                maximum: 90
              longitude:
                type: number
                minimum: -180
                maximum: 180

upstreams: # Required upstream configuration
  - id: 1
    headers: # Headers to send to upstream service
      X-API-Key: "12345-abcdef"        # API key
      Authorization: "Bearer token123" # Bearer token
      User-Agent: "MyApp/1.0"          # User agent
      Accept: "application/json"       # Accept header
    nodes: # Backend nodes (IP or domain)
      "127.0.0.1:8090": 1 # Format: address:weight

  - id: 2 
    nodes:
      "127.0.0.1:8091": 1

  - id: 3 
    nodes:
      "api.weather.gov": 1
    type: roundrobin # Load balancing algorithm
    scheme: https # Protocol
    pass_host: rewrite # Host header handling
    upstream_host: api.weather.gov # Override Host

To run the MCP Access Gateway with config file:

bash
cargo run -- -c config.yaml

Running via Docker

Run Locally for quick start

bash
# Note: Replace /path/to/your/config.yaml with actual path
docker run -d --name mcp-access-point --rm \
  -p 8080:8080 \
  -e port=8080 \
  -v /path/to/your/config.yaml:/app/config/config.yaml \
  ghcr.io/sxhxliang/mcp-access-point:main

Build Docker Image (Optional)

  • install docker
  • clone repository and build image
bash
# Clone repository
git clone https://github.com/sxhxliang/mcp-access-point.git
cd mcp-access-point

# Build image
docker build -t liangshihua/mcp-access-point:latest .
  • Run Docker Container
bash
# Using environment variables (service running on host)
# Note: Replace /path/to/your/config.yaml with actual path

docker run -d --name mcp-access-point --rm \
  -p 8080:8080 \
  -e port=8080 \
  -v /path/to/your/config.yaml:/app/config/config.yaml \
  liangshihua/mcp-access-point:latest

Environment Variables

  • port: MCP Access Point listening port (default: 8080)

Typical Use Cases

  • Progressive Architecture Migration: Facilitate gradual transition from HTTP to MCP
  • Hybrid Architecture Support: Reuse existing HTTP infrastructure within MCP ecosystem
  • Protocol Compatibility: Build hybrid systems supporting both protocols

Example Scenario:
When MCP-based AI clients need to interface with legacy HTTP microservices, the MCP Access Gateway acts as a middleware layer enabling seamless protocol conversion.

Many thanks to @limcheekin for writing an article with a practical example: https://limcheekin.medium.com/building-your-first-no-code-mcp-server-the-fabric-integration-story-90da58cdbe1f

Runtime Configuration Management

The MCP Access Point now supports dynamic configuration management through a RESTful Admin API, allowing you to update configurations without restarting the service.

Admin API Features

  • Real-time Configuration Updates: Modify upstreams, services, routes, and other resources on-the-fly
  • Dependency Validation: Automatic validation of resource dependencies before changes
  • Batch Operations: Execute multiple configuration changes atomically
  • Configuration Validation: Dry-run mode to validate changes before applying
  • Resource Statistics: Monitor and track configuration state

Admin API Configuration

Add the following to your config.yaml to enable the Admin API:

yaml
access_point:
  admin:
    address: "127.0.0.1:8081"  # Admin API listening address
    api_key: "your-api-key"    # Optional API key for authentication

Admin API Endpoints

Resource Management

  • GET /admin/resources - Get resource summary and statistics
  • GET /admin/resources/{type} - List all resources of a specific type
  • GET /admin/resources/{type}/{id} - Get a specific resource
  • POST /admin/resources/{type}/{id} - Create a new resource
  • PUT /admin/resources/{type}/{id} - Update an existing resource
  • DELETE /admin/resources/{type}/{id} - Delete a resource

Advanced Operations

  • POST /admin/validate/{type}/{id} - Validate resource configuration
  • POST /admin/batch - Execute batch operations
  • POST /admin/reload/{type} - Reload a specific resource type
  • POST /admin/reload/config - Reload full configuration from file (defaults to config.yaml). Optional JSON body: { "config_path": "path/to/config.yaml" }

Supported Resource Types

  • upstreams - Backend server configurations
  • services - Service definitions
  • routes - Routing rules
  • global_rules - Global plugin rules
  • mcp_services - MCP service configurations
  • ssls - SSL certificate configurations

Admin API Examples

Create a new upstream

bash
curl -X POST http://localhost:8081/admin/resources/upstreams/my-upstream \
  -H "Content-Type: application/json" \
  -d '{
    "id": "my-upstream",
    "type": "RoundRobin",
    "nodes": ["127.0.0.1:8001", "127.0.0.1:8002"],
    "timeout": {
      "connect": 5,
      "read": 10,
      "send": 10
    }
  }'

Create a service

bash
curl -X POST http://localhost:8081/admin/resources/services/my-service \
  -H "Content-Type: application/json" \
  -d '{
    "id": "my-service",
    "upstream_id": "my-upstream",
    "hosts": ["api.example.com"]
  }'

Batch operations

bash
curl -X POST http://localhost:8081/admin/batch \
  -H "Content-Type: application/json" \
  -d '{
    "dry_run": false,
    "operations": [
      {
        "operation_type": "create",
        "resource_type": "upstreams",
        "resource_id": "batch-upstream",
        "data": {
          "id": "batch-upstream",
          "type": "Random",
          "nodes": ["192.168.1.10:8080"]
        }
      },
      {
        "operation_type": "create",
        "resource_type": "services",
        "resource_id": "batch-service",
        "data": {
          "id": "batch-service",
          "upstream_id": "batch-upstream"
        }
      }
    ]
  }'

Get resource statistics

bash
curl http://localhost:8081/admin/resources

Admin Dashboard UI

  • Route: GET /admin serves a built-in dashboard (static/admin_dashboard.html).
    1. mcp_services, 2) ssls, 3) global_rules, 4) routes, 5) upstreams, 6) services.
  • Each card shows count and a formatted last_updated derived from the API response.

Reload configuration from file

bash
# Uses default config.yaml
curl -X POST http://localhost:8081/admin/reload/config \
  -H "Content-Type: application/json" \
  -H "x-api-key: your-api-key"

# Or specify a different config path
curl -X POST http://localhost:8081/admin/reload/config \
  -H "Content-Type: application/json" \
  -H "x-api-key: your-api-key" \
  -d '{"config_path": "./config.yaml"}'

Testing the Admin API

Use the provided test script to verify Admin API functionality:

bash
# Make the test script executable
chmod +x test-admin-api.sh

# Run comprehensive API tests
./test-admin-api.sh

For detailed Admin API documentation, see RUNTIME_CONFIG_API.md.

Contribution Guidelines

  1. Fork this repository.
  2. Create a branch and commit your changes.
  3. Create a pull request and wait for it to be merged.
  4. Make sure your code follows the Rust coding standards.

Dùng MCP MCP Access Point với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối MCP Access Point, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm MCP Access Point làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của MCP Access Point.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "mcp-access-point": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của MCP Access Point, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của MCP Access Point.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng MCP Access Point giúp tôi làm việc này không?
MCP Access Point
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng MCP Access Point.

Câu hỏi thường gặp

Máy chủ MCP MCP Access Point dùng để làm gì?

MCP Access Point là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP MCP Access Point với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng MCP Access Point với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP MCP Access Point với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối MCP Access Point, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP MCP Access Point với TypingMind?

MCP Access Point hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP MCP Access Point cung cấp những công cụ nào trong TypingMind?

MCP Access Point cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP MCP Access Point không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu MCP Access Point yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇