Skip to main content
This gives your coding agent current Yield.xyz context instead of stale training data: the live documentation, the live OpenAPI spec, and (optionally) the MCP server’s read-only doc tools. It takes three additions and one test prompt.
This page is about build-time context, not runtime execution. The MCP server also exposes wallet-execution tools (actions_enter, actions_exit, actions_manage, yields_get_balances) that build real transactions and are metered per wallet address. Connecting them is covered in the MCP server page; you don’t need them just to get accurate docs and spec answers while you code.

Connect the MCP doc tools

The MCP server at https://mcp.yield.xyz/mcp exposes five read-only tools built for this: yield_lookup_docs, yield_fetch_doc, yield_get_api_spec, yield_troubleshoot_error, and yield_list_repos. They carry no quota and need no API key. Connect the one that matches your client.
Confirm it connected:
The output should show yield-xyz-agentkit with status Connected.
Other MCP-compatible editors or agents: use the same https://mcp.yield.xyz/mcp URL wherever your client takes a remote server. If it only supports local stdio servers, bridge it with npx -y mcp-remote https://mcp.yield.xyz/mcp instead of a direct URL. See MCP server for the full connection reference and every tool’s inputs.

Add the AgentKit plugin (Claude Code)

In Claude Code you can also install AgentKit as a plugin, which bundles the MCP server with skills that tell the agent how to use it:
The builder plugin is for writing integration code; see AgentKit builder. To run yields conversationally instead, install yield-xyz-agentkit; see AgentKit for Claude Code. Codex has the same plugins; see AgentKit.

Add the docs

Point your tool’s own doc indexing at the live site rather than relying on the MCP tools alone:
  • Claude Code and Codex: add a line to your project’s CLAUDE.md or AGENTS.md telling the agent to read https://docs.yield.xyz/llms.txt before writing Yield.xyz code.
  • Cursor: add a doc source for https://docs.yield.xyz (Cursor settings, under Docs). Cursor’s exact menu labels change between versions, so if the step above doesn’t match what you see, search Cursor’s settings for “Docs” and add the URL there.
  • Any agent that reads plain text: point it at https://docs.yield.xyz/llms.txt (a page index) or https://docs.yield.xyz/llms-full.txt (the full site as one file). See Docs for LLMs for what each format contains and when to use it.

Add the live API spec

Add a second doc source for the OpenAPI spec, fetched live from the API itself:
The same spec is also served as YAML at https://api.yield.xyz/docs.yaml; use whichever your client indexes better. The MCP doc tools and the AgentKit builder read the JSON version. If your client is already connected to the MCP doc tools above, yield_get_api_spec reads this same live spec on demand, so a separate doc source is a convenience rather than a requirement.

Verify it worked

Ask a question that only the live docs and spec can answer correctly:
A correct answer names GET /v1/yields for discovery, the x-api-key header for authentication, and states that amount is a human-readable decimal string such as "1.5", never wei or another base unit. If the answer is missing any of these, or invents a different auth header or endpoint shape, the docs or spec source isn’t wired in yet: check the config file for typos and confirm claude mcp list (or your client’s equivalent) shows the server connected.

Next steps

Prompting patterns

Get better, more reviewable output once your tool has current context.

AgentKit builder

Have the agent generate the integration itself.

MCP server

Connect the wallet-execution tools and see every tool’s inputs.

Guardrails

Rules an agent follows before it signs or broadcasts anything.