CognenzaAI
EN
Configurations · Level intermediate

Configuration: Hermes Agent with MCP access to a single folder

A copyable recipe for connecting Hermes Agent to the filesystem MCP server, limited to one folder and to only the tools you need, explained line by line.

By Cognenza editorial team · Updated · 3 min read · Sources cited

What it’s for

MCP is an open standard that its website describes as “a USB-C port for AI applications”: a common way to connect an AI to tools and data. With this recipe, Hermes Agent can work with the files in a single folder and nothing else.

The recipe

Open (or create) the file ~/.hermes/config.yaml and add:

mcp_servers:
  filesystem:
    command: "npx"
    args: ["-y", "@modelcontextprotocol/server-filesystem", "/home/your-user/ai-projects"]
    tools:
      include: ["read_*", "list_*", "search_*"]

Line by line

LineWhat it does
mcp_servers:Opens the list of MCP servers Hermes should connect
filesystem:A name you choose for this server
command: "npx"The program that starts the server (comes with Node.js)
args: [...]Downloads the official filesystem server and gives it the only allowed folder
tools: include:Keeps available only the tools whose names match these patterns (here, read tools)

Replace /home/your-user/ai-projects with your folder’s real path. On Windows it looks like C:/Users/your-user/ai-projects.

When you want it to write too

Remove the tools: block or use exclude to remove only what you don’t want, for example:

    tools:
      exclude: ["move_*"]

Back up the folder first.

How to check

Restart Hermes with hermes chat and use the template below: it should list only the allowed tools and the folder you set.

Precautions

  • Install MCP servers only from known sources: the MCP security guide describes the risk of compromised local servers.
  • Keep the tool list as short as possible (scope minimisation).

Frequently asked questions

What is an MCP server?

A small program that gives an AI access to a specific tool or data, following the open Model Context Protocol standard. Here, the filesystem server gives access to a folder.

Do I need Node.js?

Yes: the official example uses npx, which comes with Node.js, to download and start the filesystem server.

Can I give access to several folders?

Yes, by adding more paths to the args list. The fewer, the better.

Keep reading

Sources

Official sources are linked in their original language.

  1. MCP en Hermes Agent (documentación oficial) — Nous Research (GitHub)
  2. What is the Model Context Protocol? — Model Context Protocol
  3. Security Best Practices (MCP) — Model Context Protocol

Change log

  • : First published.

Educational content, prepared with the help of AI tools, with sources cited. It is not a substitute for professional advice. Tools change fast: if you spot something out of date, write to us at contacto@cognenza.com. How we work.