MCP tools
Goal: declare a Model Context Protocol server and cite its tools in an agent.
Prerequisites
- The command that starts the MCP server (for example
npx -y tavily-mcp), installable on the worker.
Steps
-
Declare the server with the
McpServerkind and the command that starts it:apiVersion: afe.dev/v1alpha1kind: McpServermetadata:name: websearchspec:transport: stdiocommand:- npx- -y- tavily-mcp -
Cite its tools in an agent as
mcp:<server>.<tool>ormcp:<server>.*. -
Run the flow. The
afe-mcpplugin connects once per process and exposes the server's tools.
Notes
A server that does not answer fails only the operation that needs it, never the engine.
The agent harnesses (basic, deep, acp) arrive in the next milestone. Until then, providers
and tools are wired, but a --dry run uses no provider.
Troubleshooting
unknown MCP server 'websearch'
No McpServer manifest named websearch is in the configuration. Check the name in the agent's
tools list against the McpServer you declared.
MCP server 'websearch' has no tool 'search' (known: fetch, extract)
The tool name after the dot does not match a tool the server reports. The error lists the tools
the server actually has. Cite one of those, or use mcp:websearch.* for all of them.
unknown tool 'websearch' (expected 'mcp:<server>.<tool|*>')
The reference is missing the mcp: prefix or the .<tool> part. Use the full form,
mcp:<server>.<tool> or mcp:<server>.*.