pluggedin-mcp-proxy

by VeriTeknik
Verified

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.

Integrations

  • Supports Mermaid diagram syntax for architecture visualization, as demonstrated in the README's architecture overview section.

  • Seamless integration with OpenAI models, enabling the use of OpenAI's AI capabilities with tools and prompts.

  • Enables creation and management of custom Python-based MCP servers that can be integrated with the proxy.

plugged.in MCP 代理服务器

📋 概述

plugged.in MCP 代理服务器是一款功能强大的中间件,它将多个机器对话协议 (MCP) 服务器聚合到一个统一的接口。它从plugged.in 应用获取工具、提示和资源配置,并将请求智能地路由到合适的底层 MCP 服务器。

该代理能够与任何 MCP 客户端(Claude、Cline、Cursor 等)无缝集成,同时通过 plugged.in 生态系统提供高级管理功能。

✨ 主要特点

  • 通用 MCP 兼容性:可与任何 MCP 客户端配合使用,包括 Claude Desktop、Cline 和 Cursor
  • 多服务器支持:连接 STDIO(命令行)和 WebSocket(基于 HTTP)MCP 服务器
  • 命名空间隔离:使用适当的前缀保持加入的 MCP 独立且有序
  • 多工作区层:只需单击一下即可在不同的 MCP 配置集之间切换
  • 简化架构:简化的代码库,缩短了启动时间并降低了复杂性
  • API 驱动代理:从 plugged.in App API 获取功能,而不是直接发现
  • 全面支持 MCP :处理工具、资源、资源模板和提示
  • 自定义指令:支持格式化为 MCP 提示的服务器特定指令

🚀 快速入门

先决条件

  • Node.js 18+(推荐 v20+)
  • 来自 plugged.in 应用程序的 API 密钥(在plugged.in/api-keys获取)

安装

# Install and run with npx npx -y @pluggedin/mcp-proxy@latest --pluggedin-api-key YOUR_API_KEY

MCP 客户端配置

克劳德桌面

将以下内容添加到您的 Claude Desktop 配置中:

{ "mcpServers": { "pluggedin": { "command": "npx", "args": ["-y", "@pluggedin/mcp-proxy@latest"], "env": { "PLUGGEDIN_API_KEY": "YOUR_API_KEY" } } } }

克莱恩

将以下内容添加到您的 Cline 配置中:

{ "mcpServers": { "pluggedin": { "command": "npx", "args": ["-y", "@pluggedin/mcp-proxy@latest"], "env": { "PLUGGEDIN_API_KEY": "YOUR_API_KEY" } } } }

光标

对于 Cursor,您可以使用命令行参数而不是环境变量:

npx -y @pluggedin/mcp-proxy@latest --pluggedin-api-key YOUR_API_KEY

⚙️ 配置选项

环境变量

多变的描述必需的默认
PLUGGEDIN_API_KEYplugged.in 应用程序的 API 密钥是的-
PLUGGEDIN_API_BASE_URLplugged.in 应用的基本 URLhttps://plugged.in

命令行参数

命令行参数优先于环境变量:

npx -y @pluggedin/mcp-proxy@latest --pluggedin-api-key YOUR_API_KEY --pluggedin-api-base-url https://your-custom-url.com

完整的选项列表如下:

npx -y @pluggedin/mcp-proxy@latest --help

🐳 Docker 使用

您还可以使用 Docker 构建和运行代理服务器。

构建图像

确保已安装并运行 Docker。导航到pluggedin-mcp目录并运行:

docker build -t pluggedin-mcp-proxy:latest .

包含一个.dockerignore文件来优化构建上下文。

运行容器

运行容器,提供必要的环境变量:

docker run -it --rm \ -e PLUGGEDIN_API_KEY="YOUR_API_KEY" \ -e PLUGGEDIN_API_BASE_URL="YOUR_API_BASE_URL" \ --name pluggedin-mcp-container \ pluggedin-mcp-proxy:latest

替换YOUR_API_KEYYOUR_API_BASE_URL (如果不使用默认的https://plugged.in )。

使用 MCP Inspector 进行测试

当容器运行时,您可以使用 MCP 检查器连接到它:

npx @modelcontextprotocol/inspector docker://pluggedin-mcp-container

这将连接到正在运行的容器的标准输入/输出。

停止容器

在执行docker run终端中按Ctrl+C 。-- --rm标志可确保容器在停止时自动删除。

🏗️ 系统架构

plugged.in MCP 代理服务器充当 MCP 客户端和多个底层 MCP 服务器之间的桥梁:

🔄 工作流程

  1. 配置:代理从 plugged.in App 获取服务器配置
  2. 功能列表:代理从 plugged.in App API 获取发现的功能
    • tools/list :从/api/tools获取(返回前缀名称)
    • resources/list :从/api/resources获取
    • resource-templates/list :从/api/resource-templates获取
    • prompts/list :从/api/prompts/api/custom-instructions获取,合并结果
  3. 功能解析:代理将功能解析到目标服务器
    • tools/call :从工具名称解析前缀,在内部映射中查找服务器
    • resources/read :调用/api/resolve/resource?uri=...获取服务器详细信息
    • prompts/get :检查自定义指令前缀或调用/api/resolve/prompt?name=...
  4. 请求路由:请求被路由到适当的底层 MCP 服务器
  5. 响应处理:底层服务器的响应返回给客户端

🧩 与 plugged.in App 集成

plugged.in MCP 代理服务器旨在与plugged.in 应用程序无缝协作,它提供:

  • 用于管理 MCP 服务器配置的基于 Web 的界面
  • 集中能力发现(工具、资源、模板、提示)
  • 自定义指令管理
  • 对不同配置集的多工作区支持
  • 用于测试 MCP 工具的交互式游乐场
  • 用户身份验证和 API 密钥管理

📚 相关资源

🤝 贡献

欢迎贡献代码!欢迎提交 Pull 请求。

📄 许可证

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

🙏 致谢

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Plugged.in MCP 服务器充当代理服务器,将多个 MCP 服务器整合到一个界面。它从 Plugged.in 获取工具、提示符和资源配置,并将对工具、提示符和资源的请求转发到相应的底层服务器。

  1. 📋 Overview
    1. ✨ Key Features
      1. 🚀 Quick Start
        1. Prerequisites
        2. Installation
        3. Configuration for MCP Clients
      2. ⚙️ Configuration Options
        1. Environment Variables
        2. Command Line Arguments
      3. 🐳 Docker Usage
        1. Building the Image
        2. Running the Container
        3. Testing with MCP Inspector
        4. Stopping the Container
      4. 🏗️ System Architecture
        1. 🔄 Workflow
          1. 🧩 Integration with plugged.in App
            1. 📚 Related Resources
              1. 🤝 Contributing
                1. 📄 License
                  1. 🙏 Acknowledgements
                    ID: ea8ucq4xhz