Connect Hermes Agent to Adflitz

Hermes Agent from Nous Research reads MCP servers from its config.yaml and fills in environment variables for you. Authentication is an API key.

Before you start

  • Sign-in method: API key. The server address is https://adflitz.com/api/mcp.
  • For an API key create one under Settings, then API keys, and allow agents on the project under Settings, then Agents. The key is shown once, so put it straight into an environment variable.
  • Pick the lowest permission that does the job. Access levels explains read, draft and publish.

Steps

  1. Create an API key in Adflitz (Settings, API keys) and allow agents on the project (Settings, Agents).
  2. Add the key to ~/.hermes/.env as ADFLITZ_API_KEY.
  3. Add the mcp_servers entry below to ~/.hermes/config.yaml, then run /reload-mcp in Hermes.
  4. Optionally run hermes mcp test adflitz. Tools appear as mcp_adflitz_… in the tool list.
  5. Paste the check prompt, or the setup prompt below to let Hermes configure itself.

Copy and paste

Nous Research's Hermes Agent. Add the key to ~/.hermes/.env as ADFLITZ_API_KEY=apk_YOUR_KEY, then add this under mcp_servers in ~/.hermes/config.yaml. Hermes fills in ${ADFLITZ_API_KEY} itself. Run /reload-mcp afterwards. Tools show up as mcp_adflitz_….

mcp_servers:
  adflitz:
    url: "https://adflitz.com/api/mcp"
    headers:
      Authorization: "Bearer ${ADFLITZ_API_KEY}"
    enabled: true
    timeout: 120

Or paste this into Hermes and let it set itself up

Help me connect Adflitz to this Hermes Agent as an MCP server.

1. Add an entry named adflitz under mcp_servers in ~/.hermes/config.yaml: url https://adflitz.com/api/mcp, header Authorization: "Bearer ${ADFLITZ_API_KEY}".
2. The key is already in ~/.hermes/.env as ADFLITZ_API_KEY. Do not ask me to paste the key into this chat and never print it.
3. Reload MCP (/reload-mcp), run hermes mcp test adflitz if you can, then call the adflitz_overview tool and tell me which projects and ad accounts you can see.
4. If anything fails, show me the exact error and the one thing I should change.

Check that it worked

Open a new conversation in Hermes Agent and paste this prompt. It only reads, so it is safe to run on a live account.

Check prompt

Use Adflitz to give me the workspace overview. List my projects, which ad platforms are connected and how many drafts are waiting for approval. Do not change anything.

A good answer names your workspace and plan, lists your projects with the permission each one grants, shows the connected platforms and tells you how many drafts are waiting. If the assistant says it cannot find an Adflitz tool, jump to troubleshooting below.

Troubleshooting

  • The key stays literal and you get 401: ${ADFLITZ_API_KEY} is only expanded when Hermes can see the variable. Put it in ~/.hermes/.env or the environment that starts Hermes, then restart or /reload-mcp.
  • Connection failed: MCP over HTTP needs the mcp Python package. If you installed Hermes with pip, install it with the mcp extra: pip install "hermes-agent[mcp]". Then run hermes mcp test adflitz to check.
  • No adflitz tools after a reload: check the url is exactly the one above and that the entry sits under the top-level mcp_servers key with correct indentation.
  • 401 or “unknown or revoked”: send the whole key, starting with apk_, as a Bearer token with nothing around it. A revoked key never works again, so create a new one under Settings → API keys.
  • The tools list is empty or calls say forbidden: open Settings → Agents and allow agents on the project, and give the key at least the permission the tool needs (read, draft or publish).
  • The overview works but lists no ad accounts: connect them first, see Connect ad accounts.

What to ask next

  • How did my ads do over the last 14 days? Group it by campaign and point out what needs attention.
  • Draft a Search campaign for our two best services and file it as a draft for my approval.
  • Which campaigns spent without results this week? Suggest what to pause and give me the reason for each.
  • Save the three most useful competitor ads for this project to my swipe file.

Changes you ask for become drafts that you review first. Read Drafts and approvals to see how a draft is checked and approved.

Other clients

ChatGPTClaude.aiClaude CodeCursorCodexGemini CLIPerplexityGrok BotOpenClawn8nAny other MCP client

Questions about connecting your AI or your ad accounts? Write to contact@adflitz.com or open the support page.