> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yield.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up your AI coding tool

> Connect Claude Code, Cursor, Windsurf, VS Code, Codex or another coding agent to Yield.xyz's live docs and API spec, in under five minutes.

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.

> [!NOTE]
>
> 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](https://docs.yield.xyz/documentation/ai-agents/mcp-server.md) 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.

> [tab] Claude Code
>
> ```bash theme={null}
> claude mcp add --transport http yield-xyz-agentkit https://mcp.yield.xyz/mcp
> ```
>
> Confirm it connected:
>
> ```bash theme={null}
> claude mcp list
> ```
>
> The output should show `yield-xyz-agentkit` with status `Connected`.

> [tab] Cursor
>
> Add to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (this project only):
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "yield-xyz-agentkit": {
>       "url": "https://mcp.yield.xyz/mcp"
>     }
>   }
> }
> ```
>
> Cursor supports remote MCP servers directly, so no local process or bridge command is needed here.

> [tab] Windsurf
>
> Add to `~/.codeium/windsurf/mcp_config.json`:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "yield-xyz-agentkit": {
>       "url": "https://mcp.yield.xyz/mcp"
>     }
>   }
> }
> ```

> [tab] VS Code
>
> Add to `.vscode/mcp.json` in your project:
>
> ```json theme={null}
> {
>   "servers": {
>     "yield-xyz-agentkit": {
>       "type": "http",
>       "url": "https://mcp.yield.xyz/mcp"
>     }
>   }
> }
> ```
>
> The tools are then available to GitHub Copilot in agent mode.

> [tab] Codex CLI
>
> Add to `~/.codex/config.toml`:
>
> ```toml theme={null}
> [mcp_servers.yield-xyz-agentkit]
> command = "npx"
> args = ["-y", "mcp-remote", "https://mcp.yield.xyz/mcp"]
> ```

> [tab] Claude Desktop
>
> In Claude Desktop, open **Settings**, then **Connectors**, choose **Add custom connector** and enter `https://mcp.yield.xyz/mcp`.

> [!NOTE]
>
> 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](https://docs.yield.xyz/documentation/ai-agents/mcp-server.md) 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:

```bash theme={null}
/plugin marketplace add stakekit/agentkit
/plugin install yield-xyz-agentkit-builder@agentkit
```

The builder plugin is for writing integration code; see [AgentKit builder](https://docs.yield.xyz/guides/ai/agentkit-builder.md). To run yields conversationally instead, install `yield-xyz-agentkit`; see [AgentKit for Claude Code](https://docs.yield.xyz/documentation/ai-agents/agentkit/claude-code.md). Codex has the same plugins; see [AgentKit](https://docs.yield.xyz/documentation/ai-agents/agentkit/index.md).

## 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](https://docs.yield.xyz/documentation/ai-agents/integrate/docs-for-llms.md) 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:

```text theme={null}
https://api.yield.xyz/docs.json
```

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:

```text theme={null}
How do I fetch the available yields, and then enter one for a given
wallet and amount? Include how to authenticate and the amount format.
```

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

> [card] [Prompting patterns](https://docs.yield.xyz/guides/ai/prompting-patterns.md)
>
> Get better, more reviewable output once your tool has current context.

> [card] [AgentKit builder](https://docs.yield.xyz/guides/ai/agentkit-builder.md)
>
> Have the agent generate the integration itself.

> [card] [MCP server](https://docs.yield.xyz/documentation/ai-agents/mcp-server.md)
>
> Connect the wallet-execution tools and see every tool's inputs.

> [card] [Guardrails](https://docs.yield.xyz/documentation/ai-agents/agentkit/guardrails.md)
>
> Rules an agent follows before it signs or broadcasts anything.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.