erm-github-mcp
erm-github-mcp
一个用 TypeScript 编写的极简 Model Context Protocol (MCP) 服务器。设计为从源码构建、使用 Docker 容器化,并部署到 IBM Code Engine。
目录
Related MCP server: My Awesome MCP
概述
该服务器支持两种传输方式:
传输方式 | 使用场景 | 激活方式 |
stdio | 本地开发 / Bob 桌面端 | 默认(无需设置环境变量) |
HTTP Streamable | Docker / Code Engine |
|
HTTP 传输方式在 GET /health 上暴露了一个 /health 端点,用于存活探针。
项目结构
.
├── src/
│ └── index.ts # Server entry point — add tools here
├── build/ # Compiled output (git-ignored)
├── .github/
│ └── workflows/
│ └── build-push.yml # CI: typecheck → build → push to GHCR
├── Dockerfile # Multi-stage build (builder + runtime)
├── docker-compose.yml # Local container testing
├── tsconfig.json
└── package.json工具
工具 | 描述 |
| 健康检查 — 返回 |
| 返回服务器名称、版本、传输方式、Node 版本和运行时长 |
本地开发
前置条件
Node.js 20+
npm 10+
安装并构建
npm install
npm run build以 stdio 模式运行(供 Bob 桌面端使用)
node build/index.js在本地以 HTTP 模式运行
MCP_TRANSPORT=http PORT=3000 node build/index.js测试健康端点:
curl http://localhost:3000/health使用 Docker 运行
构建镜像
docker build -t erm-github-mcp .运行容器
docker run -p 3000:3000 erm-github-mcp使用 Docker Compose
docker compose up --buildGitHub Actions CI/CD
位于 .github/workflows/build-push.yml 的工作流会在每次推送到 main 分支以及版本标签(v*)时运行:
TypeScript 构建 —
npm ci+tsc(遇到类型错误时快速失败)Docker 构建与推送 — 多平台镜像(
linux/amd64、linux/arm64)会推送到 GitHub Container Registry (GHCR)
镜像发布为:
ghcr.io/<your-github-username>/erm-github-mcp:<tag>无需配置任何密钥 — 工作流使用内置的 GITHUB_TOKEN。
将软件包设为公开
首次推送后,进入 GitHub → Packages → erm-github-mcp → Package settings,将可见性设为 Public,这样 Code Engine 就可以在无需凭据的情况下拉取它。
部署到 IBM Code Engine
前置条件
安装了 Code Engine 插件的 IBM Cloud CLI:
ibmcloud plugin install code-engine一个 IBM Cloud 账户和一个 Code Engine 项目
步骤
1 — 指定你的项目
ibmcloud ce project select --name <your-project-name>2 — 部署应用
将 <tag> 替换为你想要部署的镜像标签(例如 main 或 v0.1.0):
ibmcloud ce application create \
--name erm-github-mcp \
--image ghcr.io/<your-github-username>/erm-github-mcp:<tag> \
--port 3000 \
--min-scale 0 \
--max-scale 5 \
--env MCP_TRANSPORT=http \
--env PORT=30003 — 获取公共 URL
ibmcloud ce application get --name erm-github-mcp --output url4 — 推送新镜像后更新
ibmcloud ce application update \
--name erm-github-mcp \
--image ghcr.io/<your-github-username>/erm-github-mcp:<new-tag>环境变量
变量 | 默认值 | 描述 |
|
| 在容器中设置为 |
|
| 服务器监听的 HTTP 端口 |
连接到 Bob (IBM Bob Desktop)
HTTP(远程 — 部署到 Code Engine 之后)
将以下内容添加到你的 Bob mcp.json:
{
"mcpServers": {
"erm-github-mcp": {
"url": "https://<your-code-engine-url>"
}
}
}stdio(本地 — 用于开发)
{
"mcpServers": {
"erm-github-mcp": {
"command": "node",
"args": ["/absolute/path/to/erm-github-mcp/build/index.js"]
}
}
}扩展服务器
在 src/index.ts 中使用 server.tool() 添加新工具:
server.tool(
"my_tool",
"Description shown to the AI",
{
input_field: z.string().describe("What this field does"),
},
async ({ input_field }) => ({
content: [{ type: "text", text: `Result: ${input_field}` }],
})
);然后重新构建:
npm run buildLicense
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- FlicenseBqualityNot gradedmaintenanceA minimal reference implementation of an MCP server that responds with "Hello, World" via Streamable HTTP. Serves as a baseline for integration testing and MCP client development with production-ready features including health checks, metrics, and containerized deployment.320,480
- -licenseNot gradedqualityNot gradedmaintenanceA basic MCP server built with FastMCP framework that provides example tools including message echoing and server information retrieval. Supports both stdio and HTTP transports with Docker deployment capabilities.
- -licenseNot gradedqualityNot gradedmaintenanceA basic MCP server built with FastMCP framework that provides example tools for echoing messages and retrieving server information. Supports both stdio and HTTP transports with Docker deployment capabilities.
- -licenseNot gradedqualityNot gradedmaintenanceA basic MCP server built with FastMCP framework that provides simple utility tools including message echoing and server information retrieval. Supports both stdio and HTTP transports with Docker deployment capabilities.
Related MCP Connectors
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
An MCP server for Arcjet - the runtime security platform that ships with your AI code.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ericmusa-ibm-public/erm-github-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server