Skip to main content
Glama
ericmusa-ibm-public

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

MCP_TRANSPORT=http

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

工具

工具

描述

ping

健康检查 — 返回 pong,并回显一条可选消息

get_server_info

返回服务器名称、版本、传输方式、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 --build

GitHub Actions CI/CD

位于 .github/workflows/build-push.yml 的工作流会在每次推送到 main 分支以及版本标签(v*)时运行:

  1. TypeScript 构建npm ci + tsc(遇到类型错误时快速失败)

  2. Docker 构建与推送 — 多平台镜像(linux/amd64linux/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> 替换为你想要部署的镜像标签(例如 mainv0.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=3000

3 — 获取公共 URL

ibmcloud ce application get --name erm-github-mcp --output url

4 — 推送新镜像后更新

ibmcloud ce application update \
  --name erm-github-mcp \
  --image ghcr.io/<your-github-username>/erm-github-mcp:<new-tag>

环境变量

变量

默认值

描述

MCP_TRANSPORT

stdio

在容器中设置为 http

PORT

3000

服务器监听的 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 build

License

Apache 2.0

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    B
    quality
    Not graded
    maintenance
    A 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.
    3
    20,480
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    A 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.
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    A 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.
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    A 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.

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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