MCP Gateway

by jowpereira

Integrations

  • Provides the foundation for the MCP Gateway, transforming FastAPI endpoints into MCP tools that allow LLMs to interact with corporate APIs in a controlled manner.

  • Supports project version control and distribution through Git repository cloning.

  • Hosts the FastAPI-MCP framework that this gateway is based on, allowing contribution and access to the core functionality.

MCP 网关 – API 和自助服务门户

该存储库包含 MCP 网关,这是一种企业解决方案,用于以安全、可扩展和可审计的方式公开、管理和使用工具(内部 API),并具有 RBAC 身份验证和自助服务门户。


概括


概述

MCP 网关包括:

  • 后端: FastAPI + RBAC + JWT + JSON 持久性(NoSQL 就绪)
  • 前端: React(Vite)与后端集成运行(在/frontend/dist中构建并作为静态服务)

文件夹结构

mcp-server/ ├── app/ # Backend FastAPI │ ├── main.py # Entrypoint │ ├── config.py # Configurações │ ├── auth.py # Autenticação/JWT │ ├── utils/ # Utilitários (RBAC, dependências) │ └── groups/ │ ├── routes.py # Rotas (APIs) │ └── tools.py # Utilitários de permissão ├── data/ # Dados persistentes │ └── rbac.json # Usuários, grupos, permissões ├── frontend/ # Portal React (Vite) │ ├── src/ # Código-fonte React │ └── dist/ # Build de produção (servido pelo FastAPI) ├── requirements.txt # Dependências Python ├── README.md # Este documento └── ...

如何旋转(开发)

1.后端(FastAPI)

python -m venv venv .\venv\Scripts\activate pip install -r requirements.txt uvicorn app.main:app --reload

2. 前端(React)

cd frontend npm install npm run dev

转到: http://localhost:5173 (dev) 或http://localhost:8000 (prod)

3. 生产前端构建

cd frontend npm run build

这些文件将在frontend/dist中生成。 FastAPI 可以自动提供这些文件。


特征

  • JWT 登录(用户、组管理员、全局管理员)
  • 组、用户和工具管理 (CRUD)
  • 群组管理员动态创建工具
  • 通过门户安全使用工具
  • 健康检查、注册、自动文档(Swagger)
  • 准备好进行 NoSQL 数据库集成和 SSO

RBAC结构示例

有关用户、组和权限的示例,请参阅data/rbac.json


安全

  • JWT、RBAC、共享注册表
  • 准备好 CORS、HTTPS、速率限制等。

API 文档

转到/docs获取 Swagger 或/redoc获取 Redoc。


系统要求

有关详细的功能、非功能和业务需求,请参阅docs/REQUISITOS.md文件。


完整的文档

详细的项目文档集中在docs/文件夹中:


良好实践和观察

  • 保持依赖关系保持最新。
  • 对 Python 使用虚拟环境。
  • 在部署到生产环境之前,务必先构建前端。
  • 请参阅docs/中其他模块的文档。
  • 提示:使用问题和拉取请求来提出变更并维护决策历史。

应定期审查和更新该文件以反映设计的变化。

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

一种安全的桥梁,使大型语言模型 (LLM) 能够以受控的、情境化的方式与企业 API 和服务进行交互。

  1. 概括
    1. 概述
      1. 文件夹结构
        1. 如何旋转(开发)
          1. 1.后端(FastAPI)
          2. 2. 前端(React)
          3. 3. 生产前端构建
        2. 特征
          1. RBAC结构示例
            1. 安全
              1. API 文档
                1. 系统要求
                  1. 完整的文档
                    1. 良好实践和观察

                      Related MCP Servers

                      • -
                        security
                        F
                        license
                        -
                        quality
                        A comprehensive Model Context Protocol server that bridges LLMs with self-hosted media services, enabling natural language control of TV shows, movies, downloads, and notifications while maintaining traditional API access.
                        Last updated -
                        TypeScript
                      • -
                        security
                        A
                        license
                        -
                        quality
                        A Model Context Protocol server that enables LLMs like Claude to interact with the Alpaca trading API, allowing for trading stocks, checking positions, fetching market data, and managing accounts through natural language.
                        Last updated -
                        Python
                        MIT License
                      • -
                        security
                        A
                        license
                        -
                        quality
                        A Model Context Protocol Server that enables LLMs to interact with and execute REST API calls through natural language prompts, supporting GET/PUT/POST/PATCH operations on configured APIs.
                        Last updated -
                        5
                        Python
                        Apache 2.0
                      • -
                        security
                        A
                        license
                        -
                        quality
                        Bridges Large Language Models with Language Server Protocol interfaces, allowing LLMs to access LSP's hover information, completions, diagnostics, and code actions for improved code suggestions.
                        Last updated -
                        2
                        TypeScript
                        MIT License

                      View all related MCP servers

                      ID: 57bbyvzkjx