Skip to main content

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​

  1. Declare the server with the McpServer kind and the command that starts it:

    apiVersion: afe.dev/v1alpha1
    kind: McpServer
    metadata:
    name: websearch
    spec:
    transport: stdio
    command:
    - npx
    - -y
    - tavily-mcp
  2. Cite its tools in an agent as mcp:<server>.<tool> or mcp:<server>.*.

  3. Run the flow. The afe-mcp plugin 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.

note

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>.*.

See also​