Back to MCP directory
publicPublicdnsLocal runtime

mcpserve-by-@ryaneggz

一个简单的MCP服务器,支持Shell执行,可通过Ngrok本地连接或Docker容器部署。

article

README

🚀 由 @ryaneggz 开发的 MCPServe

简单 MCP 服务器,附带 Shell 执行功能。可通过 Ngrok 连接到本地,也能在 Docker 中托管 Ubuntu24 容器

📖 目录

🚀 快速开始

本部分将介绍 MCP 的安装与使用方法,包含本地安装和 Docker 托管两种方式。

📦 安装指南

本地安装 MCP

## 安装 uv(如果你没有使用,那你可能错过了派对)
curl -LsSf https://astral.sh/uv/install.sh | sh

## 创建虚拟环境
uv venv
source .venv/bin/activate

## 安装依赖项
uv pip install -r requirements.txt

## 启动本地 MCPServe
python main.py

使用 Docker 托管 MCP

docker compose up --build

💻 使用示例

客户端 MCP 配置

如果你在代码中启用了服务器端的身份验证,可以在 API 中启用标头。这需要对 mcp 库的设置进行一些代码更改。添加一个中间件属性:

{
  "terminal": {
    "transport": "sse",
    "url": "http://localhost:8005/sse",
    // "headers": {
    //     "x-api-key": "abcdef123456..."
    // }
  }
}

🚀 发展蓝图

  • [ ] 🤖 即将推出...

创建一个问题并让我们开始讨论你希望看到的功能添加到路线图中。

💡 问题

随时提交问题和增强请求。我们始终欢迎反馈和建议。

🤓 维护人员

  • Ryan Eggleston - @ryaneggz

📄 许可证

该项目是开源的,采用 MIT License。请随意使用、修改和分发代码。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client