> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://www.openfort.io/api/mcp` to find what you need.
>
> **Have feedback?** Use `submit_feedback` on the same MCP server.

# Use Openfort with AI

To use Openfort from Claude Code, Cursor, or Codex, connect the [docs MCP server](#docs-mcp-server) at `https://www.openfort.io/api/mcp`. It gives the agent `search_docs`, `read_page`, and source-code search tools over the Openfort docs and SDK repositories. Add the [docs skill](#docs-skill) for setup guidance, register the [CLI MCP server](#cli-mcp-server) when the agent needs to act on your Openfort account, and point any tool at [llms.txt](https://www.openfort.io/docs/llms.txt), [llms-full.txt](https://www.openfort.io/docs/llms-full.txt), or the [Markdown version](#read-the-docs-as-markdown) of any page. The same setup works in any MCP client that supports remote HTTP servers.

## Docs MCP server

Give agents **search and read** tools for the Openfort documentation and SDK source, straight from your editor. Add it with one command:

:::code-group
```bash [Claude Code]
claude mcp add --transport http openfort-docs https://www.openfort.io/api/mcp
```

```bash [Codex CLI]
codex mcp add openfort-docs --url https://www.openfort.io/api/mcp
```

```bash [Amp]
amp mcp add openfort-docs https://www.openfort.io/api/mcp
```
:::

In Cursor, add the server to `.cursor/mcp.json` in your project, or to `~/.cursor/mcp.json` to use it in every project. Other MCP clients take the same `url` entry:

```json [.cursor/mcp.json]
{
  "mcpServers": {
    "openfort-docs": {
      "url": "https://www.openfort.io/api/mcp"
    }
  }
}
```

The docs server exposes tools for navigating documentation and the SDK source repositories:

| Tool | Description |
| --- | --- |
| `list_pages` | List all documentation pages with their paths |
| `read_page` | Read the content of a specific documentation page |
| `search_docs` | Search documentation for a query string |
| `list_sources` | List available source code repositories |
| `list_source_files` | List files in a directory |
| `read_source_file` | Read a source code file |
| `get_file_tree` | Get a recursive file tree |
| `search_source` | Search source code for a pattern |
| `submit_feedback` | Submit feedback about a documentation page |

## CLI MCP server

Give agents the ability to **act on your Openfort account** — create wallets, manage policies, send transactions — by exposing every [Openfort CLI](https://www.openfort.io/docs/overview/building-with-cli) command as an MCP tool.

Register the CLI as an MCP server with a single command:

```bash
openfort mcp add
```

This registers the CLI with Claude Code, Cursor, and Amp. To register it with a single agent, or with another MCP client, configure it manually:

```json
{
  "mcpServers": {
    "openfort": {
      "command": "npx",
      "args": ["@openfort/cli", "--mcp"],
      "env": {
        "OPENFORT_API_KEY": "sk_test_..."
      }
    }
  }
}
```

:::warning
The CLI MCP server runs commands with your credentials. Make sure `OPENFORT_API_KEY` (your secret key, and optionally `OPENFORT_WALLET_SECRET` and `OPENFORT_PUBLISHABLE_KEY`) are available as environment variables, or run `openfort login` and `openfort backend-wallet setup` first.
:::

Every CLI command is exposed as a tool (subcommand paths joined with underscores):

| Tool | Description |
| --- | --- |
| `accounts_list` | List all accounts across chains |
| `accounts_evm_create` | Create a new EVM backend wallet |
| `accounts_evm_send-transaction` | Send a gasless EVM transaction |
| `accounts_solana_create` | Create a new Solana backend wallet |
| `accounts_solana_transfer` | Transfer SOL or SPL tokens |
| `contracts_create` | Register a smart contract |
| `policies_create` | Create an access-control policy |
| `policies_evaluate` | Pre-flight check if an operation is allowed |
| `sponsorship_create` | Create a gas sponsorship |
| `transactions_create` | Create a transaction intent |
| `transactions_estimate` | Estimate gas cost |
| `users_list` | List users |
| `sessions_create` | Create a session key |
| `message_hash` | Hash a message with keccak256 |

:::tip
Use both MCP servers together — the docs server for context and the CLI server for execution. An agent can look up how policies work via the docs MCP, then create one via the CLI MCP.
:::

## Docs skill

Install the [Openfort Agent Skills](https://github.com/openfort-xyz/agent-skills) to give AI coding agents (Amp, Claude Code, and others) docs, source, and examples in one step:

```bash
npx skills add openfort-xyz/agent-skills
```

Once installed, the agent uses it automatically when a relevant task is detected. Or install manually:

```bash
git clone https://github.com/openfort-xyz/agent-skills.git
cp -r agent-skills/skills/openfort ~/.config/agents/skills/
```

You can also add it to a project's [`.agents/skills/`](https://github.com/openfort-xyz/agent-skills/tree/main/skills) directory for project-specific access.

The React, React Native, JavaScript, Swift, Unity, and Node.js setup pages also each include a skill file for that SDK, served as Markdown. For example, [openfort-react.md](https://www.openfort.io/docs/skills/openfort-react.md) covers `@openfort/react` setup.

## Read the docs as Markdown

Every page on this site is available as plain Markdown — append `.md` to any URL:

```text
https://www.openfort.io/docs/products/embedded-wallet/react.md
```

AI user agents are detected automatically and served raw Markdown instead of rendered HTML, for better token efficiency and easier parsing. Two [`llms.txt`](https://llmstxt.org/) files are served at the root for whole-site consumption:

| URL | Contents |
|---|---|
| [/llms.txt](https://www.openfort.io/docs/llms.txt) | Concise index of all pages with titles and descriptions |
| [/llms-full.txt](https://www.openfort.io/docs/llms-full.txt) | Complete documentation in a single file |
