Connecting MCP Servers to Hermes

10 min read Module 3 of 9 Topic 9 of 25

What you'll learn

  • Explain what MCP adds beyond Hermes' built-in tools
  • Configure a local stdio MCP server and a remote HTTP MCP server
  • Use per-server tool filtering (include/exclude) to limit what an MCP server exposes
  • Understand supports_parallel_tool_calls and OAuth-authenticated MCP servers
Building this at your company? For enterprise and company teams taking this to production: book a 30-minute session with our AI engineers for architecture guidance, code review, and a rollout plan for your use case.
Book a Team Session

What MCP Adds

Lesson 8 covered Hermes’ 60+ built-in tools, general-purpose capabilities that ship with the framework. The Model Context Protocol (MCP) is how you connect everything that doesn’t: GitHub, internal databases, company-specific APIs, third-party SaaS products, and anything your organization already runs as an MCP server, or that you build yourself.

flowchart LR
    MODEL["Model"] --> ORCH["Orchestration layer"]
    ORCH --> BUILTIN["Built-in tools\n(Lesson 8)"]
    ORCH --> MCP1["MCP: GitHub\n(local stdio)"]
    ORCH --> MCP2["MCP: Stripe\n(remote HTTP)"]
    ORCH --> MCP3["MCP: your internal API"]

    style MODEL fill:#EEF0F7,stroke:#6366F1,color:#0F172A
    style ORCH fill:#EEF0F7,stroke:#6366F1,color:#0F172A
    style BUILTIN fill:#f0fdf9,stroke:#0D9488,color:#0F172A
    style MCP1 fill:#f0fdf9,stroke:#0D9488,color:#0F172A
    style MCP2 fill:#f0fdf9,stroke:#0D9488,color:#0F172A
    style MCP3 fill:#f0fdf9,stroke:#0D9488,color:#0F172A

From the model’s point of view, an MCP tool and a built-in tool look identical, both arrive as entries in the <tools> block from Lesson 7.1. The difference is entirely on the implementation side: built-in tools ship inside Hermes; MCP tools run in a separate process or service that Hermes connects to over a standard protocol.

Local Stdio Servers

Most MCP servers run as a local subprocess that Hermes launches and talks to over stdin/stdout. Add one under mcp_servers in config.yaml:

# ~/.hermes/config.yaml
mcp_servers:
  github:
    command: "npx"
    args: ["-y", "@modelcontextprotocol/server-github"]
    env:
      GITHUB_PERSONAL_ACCESS_TOKEN: "${GITHUB_TOKEN}"
    tools:
      include: [list_issues, create_issue, update_issue, search_code]
    resources: false
    prompts: false

The tools.include list is a filter: even though the GitHub MCP server may expose many more operations, only these four become callable from Hermes. resources: false and prompts: false opt out of the non-tool parts of the MCP spec you’re not using here.

Remote HTTP Servers

Some MCP servers run as hosted HTTP services rather than local subprocesses:

mcp_servers:
  stripe:
    url: "https://mcp.stripe.com"
    headers:
      Authorization: "Bearer ${STRIPE_MCP_TOKEN}"
    tools:
      exclude: [delete_customer, refund_payment]

Here, tools.exclude is the opposite filter from include: expose everything the server offers except the listed operations. For a payments server, excluding destructive or financially irreversible actions is the kind of decision Module 7 will formalize into a broader guardrails policy, but the mechanism lives here, at the MCP connection layer.

For servers that require full OAuth rather than a static bearer token:

mcp_servers:
  internal-crm:
    url: "https://mcp.internal.corp"
    auth: oauth

Parallel Tool Calls

Some MCP servers can safely handle multiple simultaneous requests. When supports_parallel_tool_calls is enabled for a server, Hermes may execute several of that server’s tools concurrently within a single tool-call batch, rather than one at a time:

mcp_servers:
  internal-search:
    command: "internal-search-mcp"
    supports_parallel_tool_calls: true

Only enable this for servers you know tolerate concurrent requests safely, a server backed by a rate-limited or non-thread-safe API should stay sequential.

Verifying the Connection

hermes doctor          # includes MCP server reachability checks
hermes tools            # confirm the filtered tool list matches what you configured

If a server fails to connect, hermes doctor distinguishes between a launch failure (bad command/args for stdio servers), an auth failure (missing env var or expired OAuth token), and a network failure (unreachable url), which saves you from guessing.

Exercise: connect one MCP server, either a real one relevant to your work or the GitHub server shown above with a read-only personal access token, and scope it down with an include list of no more than three tools. Confirm with hermes tools that only those three appear, not the server’s full catalog.

Knowledge Check

3 questions to test your understanding

1 You need Hermes to create and update GitHub issues. Is this a built-in tool (Lesson 8) or an MCP server concern?

2 In an MCP server config, what does `tools: exclude: [delete_customer, refund_payment]` accomplish for a remote Stripe MCP server?

3 What does setting `auth: oauth` on an MCP server entry handle that a plain API key in headers does not?

Go further with expert guidance

Ready to build production AI?
Talk to our R&D team.

These courses give you the foundation. Our embedded AI teams take you from prototype to production in 30–90 days, with your team, your codebase, your goals. Book a free strategy call to see how we can accelerate your AI initiative.

30 minutes · No obligation · Expert AI engineers, not sales reps

AI Architecture Review

Audit your current stack and identify high-impact improvements

Project Review

Get expert feedback on your AI implementation and codebase

Team Mentoring

Upskill your engineers with hands-on AI coaching sessions

AI Strategy

Define your AI roadmap, prioritization, and implementation plan