Mac: Hermes web search through Kagi's hosted MCP server
Hermes's built-in web search was the free Brave API, which returns 429s under agent bursts; real-user reports (Hermes #80201, PR #36838, HN) also rule out self-hosted SearXNG for always-on use. The user has Kagi, so: - Kagi's own hosted MCP server (https://mcp.kagi.com/mcp, Bearer API key, paid API with a monthly cap set in Kagi). Its two tools, kagi_search_fetch and kagi_extract, are marked read-only, so trust: untrusted never asks. - agent.disabled_toolsets gains `web`, removing the built-in web_search/web_extract everywhere, so Kagi is the only search path. - KAGI_API_KEY from the vault into ~/.hermes/.env. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1173162977
commit
cde36c8710
2 files changed
+22
-4
No files matched your search
+20
-3
@@ -38,9 +38,11 @@ hermes_settings:
|
|||||||
# a host cwd never becomes the container's working directory anyway.
|
# a host cwd never becomes the container's working directory anyway.
|
||||||
terminal.cwd: .
|
terminal.cwd: .
|
||||||
terminal.container_memory: 3072 # MB; must fit in the Podman VM (podman_machine_memory)
|
terminal.container_memory: 3072 # MB; must fit in the Podman VM (podman_machine_memory)
|
||||||
# Kanban is for multi-agent boards (unused here) and its 14 tools were 25 KB
|
# kanban: multi-agent boards (unused here); its 14 tools were 25 KB of the
|
||||||
# of the 65 KB of tool definitions sent with every message.
|
# 65 KB of tool definitions sent with every message.
|
||||||
agent.disabled_toolsets: [kanban]
|
# web: Hermes's built-in web_search/web_extract (was the free Brave API,
|
||||||
|
# rate-limited). Search and page fetching go through Kagi's MCP server.
|
||||||
|
agent.disabled_toolsets: [kanban, web]
|
||||||
skills.write_approval: true # skills Hermes writes wait for your approval
|
skills.write_approval: true # skills Hermes writes wait for your approval
|
||||||
# Never run these, even in the sandbox and even under /yolo (examples from
|
# Never run these, even in the sandbox and even under /yolo (examples from
|
||||||
# Hermes's hardening guide). Case-insensitive globs over the whole command.
|
# Hermes's hardening guide). Case-insensitive globs over the whole command.
|
||||||
@@ -92,6 +94,7 @@ hermes_settings:
|
|||||||
delegation.model: deepseek/deepseek-v4.1-flash
|
delegation.model: deepseek/deepseek-v4.1-flash
|
||||||
|
|
||||||
mcp_servers.karakeep: "{{ hermes_mcp_karakeep }}"
|
mcp_servers.karakeep: "{{ hermes_mcp_karakeep }}"
|
||||||
|
mcp_servers.kagi: "{{ hermes_mcp_kagi }}"
|
||||||
|
|
||||||
# MCP servers. Each stdio server runs in a throwaway Podman container (not on
|
# MCP servers. Each stdio server runs in a throwaway Podman container (not on
|
||||||
# the Mac itself); secrets come from ~/.hermes/.env (hermes_env_secrets) and
|
# the Mac itself); secrets come from ~/.hermes/.env (hermes_env_secrets) and
|
||||||
@@ -129,9 +132,23 @@ hermes_mcp_karakeep:
|
|||||||
resources: false
|
resources: false
|
||||||
prompts: false
|
prompts: false
|
||||||
|
|
||||||
|
# Kagi (web search and page fetching), Kagi's own hosted MCP server: nothing
|
||||||
|
# runs on the Mac. Paid API, $12/1k searches and $4/1k pages, prepaid with a
|
||||||
|
# monthly cap set in Kagi. Both tools are marked read-only, so "untrusted"
|
||||||
|
# never asks. https://kagi.com/api/docs/openapi/section/mcp
|
||||||
|
hermes_mcp_kagi:
|
||||||
|
url: https://mcp.kagi.com/mcp
|
||||||
|
headers:
|
||||||
|
Authorization: "Bearer ${KAGI_API_KEY}"
|
||||||
|
trust: untrusted
|
||||||
|
tools:
|
||||||
|
resources: false
|
||||||
|
prompts: false
|
||||||
|
|
||||||
# Secrets written to ~/.hermes/.env (single-quoted), from the vault.
|
# Secrets written to ~/.hermes/.env (single-quoted), from the vault.
|
||||||
hermes_env_secrets:
|
hermes_env_secrets:
|
||||||
KARAKEEP_API_KEY: "{{ vault_cogitator02.karakeep_api_key }}"
|
KARAKEEP_API_KEY: "{{ vault_cogitator02.karakeep_api_key }}"
|
||||||
|
KAGI_API_KEY: "{{ vault_cogitator02.kagi_api_key }}"
|
||||||
|
|
||||||
# Keys `hermes config set` refuses without --force although Hermes reads them
|
# Keys `hermes config set` refuses without --force although Hermes reads them
|
||||||
# (agent.reasoning_effort: hermes-agent #140221).
|
# (agent.reasoning_effort: hermes-agent #140221).
|
||||||
|
|||||||
+2
-1
@@ -36,7 +36,8 @@ Manages cogitator-02, an Apple Silicon Mac on the tailnet (`mac.yml`,
|
|||||||
`mcp_servers.<name>` entries in `hermes_settings`, each running in a
|
`mcp_servers.<name>` entries in `hermes_settings`, each running in a
|
||||||
throwaway Podman container. Secrets they need are in `hermes_env_secrets`
|
throwaway Podman container. Secrets they need are in `hermes_env_secrets`
|
||||||
(from the vault) and written to `~/.hermes/.env`. Today: Karakeep, with
|
(from the vault) and written to `~/.hermes/.env`. Today: Karakeep, with
|
||||||
only search/read/create/tag tools registered.
|
only search/read/create/tag tools registered, and Kagi's hosted server for
|
||||||
|
web search and page fetching (Hermes's built-in `web` toolset is off).
|
||||||
- **Podman VM** (tag `podman`): a launchd job (`local.podman-machine`) that
|
- **Podman VM** (tag `podman`): a launchd job (`local.podman-machine`) that
|
||||||
starts the VM running Hermes's sandbox at login, and `podman_machine_memory`
|
starts the VM running Hermes's sandbox at login, and `podman_machine_memory`
|
||||||
for its size. A resize stops the VM and starts it again through that job.
|
for its size. A resize stops the VM and starts it again through that job.
|
||||||
|
|||||||
Reference in new issue
Block a user