Hermes MCP — GitHub and GitLab Integration

Wire GitHub and GitLab MCP servers into Hermes via ~/.hermes/config.yaml so you can ask Hermes to manage repos, issues, and PRs naturally.

Why / When to Use

When you want Hermes to interact with GitHub/GitLab — listing open PRs, creating issues, reviewing diffs — without copying tokens into every prompt. Once configured, tool calls happen automatically during normal reasoning.

Core Concept / Commands

Step 1 — Install MCP support in Hermes

cd ~/.hermes/hermes-agent
uv pip install -e ".[mcp]"
# Node.js required for npx-based servers — check: node --version

Step 2 — Get personal access tokens

  • GitHub: Settings → Developer settings → Personal access tokens → Fine-grained token (scopes: repo, issues, PRs)
  • GitLab: Settings → Access Tokens → create with api scope

Step 3 — Edit ~/.hermes/config.yaml

mcp_servers:
  github:
    command: "npx"
    args: ["-y", "@modelcontextprotocol/server-github"]
    env:
      GITHUB_PERSONAL_ACCESS_TOKEN: "ghp_your_token_here"
 
  gitlab:
    command: "npx"
    args: ["-y", "@zereight/mcp-gitlab"]
    env:
      GITLAB_PERSONAL_ACCESS_TOKEN: "glpat_your_token_here"
      GITLAB_API_URL: "https://gitlab.com/api/v4"  # or self-hosted URL

Step 4 — Restart Hermes

sudo systemctl restart hermes   # if running as systemd service
# or just relaunch:
hermes

Step 5 — Verify

hermes mcp list

Key Options / Variants

  • Replace GITLAB_API_URL with your self-hosted GitLab instance URL if not using gitlab.com
  • Pre-install the npm package to avoid first-run download timeout:
    npm install -g @modelcontextprotocol/server-github
    npm install -g @zereight/mcp-gitlab

Gotchas

  • Hermes does NOT inherit your shell environment for MCP subprocesses — only safe baseline vars like PATH and HOME are passed. API keys exported in your shell are invisible to MCP. They must be in config.yaml under the env: key.
  • If a server shows 0 tools after hermes mcp list, the handshake failed. Check the token and confirm Node.js is available.
  • The npx first run downloads the package — this can hit MCP handshake timeouts. Pre-install to avoid this.

Source

Conversation: “Hermes integration with GitHub and GitLab” — 2026-05-15