|
| 1 | +--- |
| 2 | +id: tools-for-ai |
| 3 | +title: Tools for AI Agents |
| 4 | +description: "Guide your agent on building NEAR applications" |
| 5 | +--- |
| 6 | + |
| 7 | +import Card from '@site/src/components/UI/Card'; |
| 8 | + |
| 9 | +NEAR offers multiple tools and resources to help your AI agents build and use NEAR applications. This page provides an overview of the key tools available and how to use them effectively. |
| 10 | + |
| 11 | +<div className="row" style={{ marginTop: '2rem' }}> |
| 12 | + <div className="col col--6"> |
| 13 | + <Card title="llms.txt"> |
| 14 | + <p>When you need to provide your agent with a quick reference to all NEAR docs.</p> |
| 15 | + <a href="#llms-txt">Open section →</a> |
| 16 | + </Card> |
| 17 | + </div> |
| 18 | + <div className="col col--6"> |
| 19 | + <Card title="Docs MCP"> |
| 20 | + <p>When you want agents to search docs in real-time for up-to-date details.</p> |
| 21 | + <a href="#docs-mcp-endpoint">Open section →</a> |
| 22 | + </Card> |
| 23 | + </div> |
| 24 | +</div> |
| 25 | +<div className="row" style={{ marginTop: '2rem' }}> |
| 26 | + <div className="col col--6"> |
| 27 | + <Card title="Agent Skills"> |
| 28 | + <p>When you need your agent to become an expert in a specific task (e.g. using our API).</p> |
| 29 | + <a href="#near-agent-skills">Open section →</a> |
| 30 | + </Card> |
| 31 | + </div> |
| 32 | + <div className="col col--6"> |
| 33 | + <Card title="NEAR MCP"> |
| 34 | + <p>When your agent needs to perform on-chain actions (e.g., transfers and function calls).</p> |
| 35 | + <a href="#near-mcp-server">Open section →</a> |
| 36 | + </Card> |
| 37 | + </div> |
| 38 | +</div> |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +## llms.txt |
| 43 | + |
| 44 | +**What it is:** Curated NEAR docs context for coding assistants. |
| 45 | + |
| 46 | +**Use it when:** You need to provide your agent with a quick reference to all NEAR docs. |
| 47 | + |
| 48 | +**Link:** [https://docs.near.org/llms.txt](https://docs.near.org/llms.txt) |
| 49 | + |
| 50 | +<details> |
| 51 | +<summary>VS Code Setup</summary> |
| 52 | + |
| 53 | +Use `#fetch` in your prompt: |
| 54 | + |
| 55 | +```text |
| 56 | +How can I upgrade a contract state? |
| 57 | +#fetch https://docs.near.org/llms.txt |
| 58 | +``` |
| 59 | + |
| 60 | +</details> |
| 61 | + |
| 62 | +<details> |
| 63 | +<summary>Cursor Setup</summary> |
| 64 | + |
| 65 | +Add docs source once in Cursor Chat: |
| 66 | + |
| 67 | +1. `@` → `Docs` → `+ Add new doc` |
| 68 | +2. Add: `https://docs.near.org/llms.txt` |
| 69 | +3. Select the source while prompting |
| 70 | + |
| 71 | +</details> |
| 72 | + |
| 73 | +--- |
| 74 | + |
| 75 | +## Docs MCP endpoint |
| 76 | + |
| 77 | +**What it is:** An endpoint to search NEAR documentation via MCP. |
| 78 | + |
| 79 | +**Use it when:** You want agents to search docs in real-time for up-to-date details and narrower API lookups. |
| 80 | + |
| 81 | +**Link:** [https://docs.near.org/mcp](https://docs.near.org/mcp) |
| 82 | + |
| 83 | +Use two complementary layers: |
| 84 | + |
| 85 | +1. **Static context (`llms.txt`)** for fast, high-signal docs grounding. |
| 86 | +2. **Retrieval (Docs MCP)** when the agent needs live lookup across docs. |
| 87 | + |
| 88 | +--- |
| 89 | + |
| 90 | +## NEAR Agent Skills |
| 91 | + |
| 92 | +NEAR Agent Skills are reusable capabilities that package repeatable workflows. |
| 93 | + |
| 94 | +**Use it when:** You need your agent to become an expert in specific tasks (for example, using NEAR APIs). |
| 95 | + |
| 96 | +**Link:** [https://github.com/near/agent-skills](https://github.com/near/agent-skills) |
| 97 | + |
| 98 | +| Skill | Focus | |
| 99 | +|----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------| |
| 100 | +| [near-ai-cloud](https://github.com/near/agent-skills/tree/main/skills/near-ai-cloud) | Verifiable private AI inference and attestation | |
| 101 | +| [near-api-js](https://github.com/near/agent-skills/tree/main/skills/near-api-js) | JS/TS blockchain interaction, transactions, tokens, and wallet integration | |
| 102 | +| [near-dapp](https://github.com/near/agent-skills/tree/main/skills/near-dapp) | dApp project setup, wallet integration, React/Next.js patterns | |
| 103 | +| [near-intents](https://github.com/near/agent-skills/tree/main/skills/near-intents) | Cross-chain swaps via the 1Click API | |
| 104 | +| [near-kit](https://github.com/near/agent-skills/tree/main/skills/near-kit) | TypeScript SDK with type-safe contracts and sandbox testing | |
| 105 | +| [near-smart-contracts](https://github.com/near/agent-skills/tree/main/skills/near-smart-contracts) | Rust smart contract development, security, and state management | |
| 106 | + |
| 107 | +--- |
| 108 | + |
| 109 | +## NEAR MCP Server |
| 110 | + |
| 111 | +The NEAR MCP Server is a tool server (currently [23 tools](https://github.com/nearai/near-mcp/blob/main/TOOLS.md)) that enables agents to perform blockchain operations. |
| 112 | + |
| 113 | +**Use it when:** Your agent needs to hold funds, transfer funds, interact with smart contracts, or perform any action on-chain in NEAR Protocol |
| 114 | + |
| 115 | +**Repo**: [https://github.com/nearai/near-mcp](https://github.com/nearai/near-mcp) |
| 116 | + |
| 117 | +**Remote deployment guide**: [https://github.com/nearai/near-mcp/blob/main/tee.md](https://github.com/nearai/near-mcp/blob/main/tee.md) |
| 118 | + |
| 119 | +:::warning |
| 120 | + |
| 121 | +The NEAR MCP is designed to run **locally** or on your **trusted infrastructure** because it handles private keys. There is no hosted public version. |
| 122 | + |
| 123 | +::: |
| 124 | + |
0 commit comments