Agents don't see MCP tools #8712
|
Hi there, I'm trying to configure MCP tools for the Agents to use, but they don't see them. I've tried both with stdio MCP tools and with http ones. The example below is using an MCP server hosted by Exa. [mcp] [[mcp.servers]] [mcp_bundles.exa] [agents.zeroclaw] I've also tried with But the agent does not see the MCP tools. Zeroclaw is running as a service, using: Any help would be much appreciated! |
Replies: 4 comments
|
Answering my own question: It should be: Instead of: One remaining potential issue - the Web-UI should probably not make the "command" attribute mandatory for http transport. |
|
I'm still having issues with the other MCP server though: I've installed it using: Configured it by adding values to /home/{user}/.zeroclaw/.env Running it manually (for testing) seems to work: In zeroclaw config: [mcp_bundles.imap] [agents.emails] The agent only sees the 2 built-in email tools: email_search and email_read. This is an email address created only to be used with the zeroclaw agent. For now, I'd like the agent to be able to mark and email as read, but later, I'd like the agent to be able to delete emails as well. Please let me know if I'm missing anything in the config. |
|
Thanks for narrowing this down. Your self-correction on the Exa bundle is right: the bundle lists the MCP server [mcp_bundles.exa]
servers = ["exa"]not Two other details are worth calling out:
[[mcp.servers]]
name = "exa"
transport = "http"
url = "https://mcp.exa.ai/mcp"
headers = { Authorization = "Bearer <token>" }For the mail server, the important difference is that ZeroClaw is spawning this from the daemon/service environment, not from your interactive shell. A command that works manually can still fail under the service if I would try this shape first, using either an absolute path to [[mcp.servers]]
name = "imap"
transport = "stdio"
command = "/absolute/path/to/npx"
args = ["-y", "mcp-mail-server"]
env = {
IMAP_HOST = "<hostname>",
IMAP_PORT = "993",
IMAP_SECURE = "true",
SMTP_HOST = "<hostname>",
SMTP_PORT = "465",
SMTP_SECURE = "true",
EMAIL_USER = "<email>",
EMAIL_PASS = "<app-password>"
}
[mcp_bundles.imap]
servers = ["imap"]
[agents.emails]
mcp_bundles = ["imap"]Then restart the affected session/daemon after changing the bundle. MCP bundle grants are resolved when the agent/session is constructed, so editing The logs should tell us which layer is failing. For an eager MCP setup ( If instead you see One small expectation-setting note: the external tools should show up with the server prefix, for example For marking mail as read, that MCP server appears to expose |
|
Thank you so much for the detailed and precise answer! The Exa MCP was already working, maybe because I had this on my zeroclaw.service file: I'll change it to your recommendation to make it cleaner, and as an example I can follow in the future: For the IMAP MCP, this is what worked for me: I've removed the module as a global module: I've configured it like this: journalctl now shows:
The agent can see the IMAP MCP tools :) |
Thank you so much for the detailed and precise answer!
The Exa MCP was already working, maybe because I had this on my zeroclaw.service file:
EnvironmentFile=/home/{user}/.zeroclaw/.envI'll change it to your recommendation to make it cleaner, and as an example I can follow in the future:
headers = { Authorization = "Bearer <token>" }For the IMAP MCP, this is what worked for me:
I've removed the module as a global module:
bun remove -g mcp-mail-serverThen installed it inside ~/.zeroclaw
bun add mcp-mail-serverI've configured it like this: