# Use Openfort with AI

Openfort is built to be driven by AI agents. Give your agent the **docs MCP server** for context, the **CLI MCP server** to act on your account, or the **docs skill** for both — then keep building in natural language.

## 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
```
:::

Or configure manually:

```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 |

## CLI MCP server

Give agents the ability to **act on your Openfort account** — create wallets, manage policies, send transactions — by exposing every [Openfort CLI](/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 auto-detects your installed AI agents (Claude Code, Cursor, Amp) and registers the CLI with all of them. To target a specific agent:

```bash
openfort mcp add --agent claude-code
openfort mcp add --agent cursor
openfort mcp add --agent amp
```

Or configure 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.

## 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 |
