The Hermes Agent Cookbook
Free recipes / Tools, MCP and Automation

Connect an MCP Server to Hermes Agent

A file snippet for config.yaml that connects your first MCP server to Hermes Agent: a local file server that can see one folder and cannot write, plus the commands to test it.

You want Hermes to use an outside tool through the Model Context Protocol and want a first connection you understand, can test and can switch off again. Saves about 30 minutes

The recipe

# ~/.hermes/config.yaml (Hermes Agent v0.21.x; check yours with hermes --version) # Add this block. If you already have mcp_servers:, add only the server under it. # Needs Node.js, because npx downloads and runs the server package. mcp_servers: [SERVER_NAME]: command: "npx" args: ["-y", "@modelcontextprotocol/server-filesystem", "[FOLDER_PATH]"] tools: exclude: [write_file, edit_file, move_file, create_directory] # What this does # - Starts the official reference file server as a local process (stdio). # - The server can only see [FOLDER_PATH] and the folders inside it. # - exclude hides the tools that change files, so this connection is read-only # until you decide otherwise. # Test it in a terminal # hermes mcp test [SERVER_NAME] # It shows what the server actually answered and which tools it offers. # Fix any error here before you open a session. # Load it # In a running session or chat, send /reload-mcp or /new to load a new server. # The tools appear to Hermes as mcp_[SERVER_NAME]_<tool>. # First message to send # Use the [SERVER_NAME] MCP server to list what is in [FOLDER_PATH] and # name the tools you used. Do not change anything. # Switch it off without deleting the block: add enabled: false under the name. # Only connect servers you trust. A stdio server runs its own code on your # machine with your user account, so read its source page before you add it.

Fill in these brackets

[SERVER_NAME]e.g. notes; a short lowercase name, used in tool names and commands
[FOLDER_PATH]e.g. /Users/you/Notes; the full path of the one folder the server may see

Pro tip

Run hermes mcp test after every change to an MCP block. It reports what the server really returned, which is much faster than guessing inside a chat why a tool is missing.

Variation

For a hosted MCP server, replace command and args with url: and the server's address, add auth: oauth, then run hermes mcp login with the server name once to sign in through your browser. That keeps tokens out of config.yaml.

Written for Hermes Agent v0.21.x. Check commands against your version with hermes --version. This site is independent and not affiliated with Nous Research.

Want 14 more like this, free?

Get the Hermes Starter Pack: 15 recipes for setup, SOUL.md, memory, skills, scheduled jobs, Telegram and approvals.

More free recipes: Limit Which Tools an MCP Server Exposes in Hermes · A Code Review Skill for Hermes Agent

No spam. Confirm your email with one click and the PDF is yours.

Need the whole set? The Hermes Agent Cookbook has 100 recipes for $27.