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

# Intents MCP Server

> 通过 Model Context Protocol 将 AI 工具连接到 LI.FI Intents 跨链托管订单和解算器运营

LI.FI Intents MCP Server 与 [LI.FI Intents API](/lifi-intents/introduction) 集成，通过 [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) 提供跨链托管订单管理和解算器运营能力。

专为 **解算器运营方** 构建——用对报价管理、订单生命周期和路由诊断的编程式访问，取代了手动的 [Lintent.org](https://lintent.org) UI 工作流。

<Warning>
  与通用的 [LI.FI MCP server](/mcp-server/overview)（只读报价和路由）不同，本服务器执行 **写操作**——它提交已签名的订单、注册解算器并管理常驻报价。托管服务器从不持有私钥。
</Warning>

## 快速开始

将托管的 LI.FI Intents MCP server 添加到你的 AI 工具。无需安装：

```json theme={"system"}
{
  "mcpServers": {
    "lifi-intents": {
      "type": "http",
      "url": "https://intents-mcp.li.fi/mcp",
      "headers": {
        "x-api-key": "your-solver-api-key"
      }
    }
  }
}
```

将其粘贴到你的 MCP 客户端配置中即可开始查询 intents 数据。工具专属的设置说明请参见[安装](/lifi-intents/mcp-server/installation)。

`x-api-key` 请求头仅在使用解算器工具时才需要。如果你有解算器 API 密钥，请将其设置为 `headers` 中的 `x-api-key`；否则删除该字段。

## 工作原理

MCP 服务器将 LI.FI Intents REST API 封装为 AI 智能体可直接调用的、兼容 MCP 的工具。你的 AI 工具无需构造 HTTP 请求，而是发现并调用诸如 `request-quote`、`prepare-order` 和 `submit-standing-quotes` 等结构化工具。

```
AI Tool (Claude, Cursor, etc.)
    |
    v
MCP Protocol
    |
    v
LI.FI Intents MCP Server (https://intents-mcp.li.fi/mcp)
    |
    v
LI.FI Order Server (https://order.li.fi)
    |
    v
Cross-chain escrow settlement via Polymer oracle
```

## 示例工作流

通过 MCP 服务器进行的典型跨链交换遵循以下流程：

```
1. get-supported-routes          # Discover available chain + token pairs
2. request-quote                 # Get pricing (chain names, symbols, or IDs all work)
3. prepare-order                 # Build order structure (unsigned)
4. (external) Sign the order using EIP-712 typed data signing
5. submit-order                  # Submit signed order to the order server
6. track-order                   # Monitor: Submitted -> Open -> Signed -> Delivered -> Settled
```

## API 密钥配置

没有 API 密钥时，只有 **集成方工具** 可用（只读操作）。有了 API 密钥后，解算器工具也会启用，包括 `submit-standing-quotes`、`debug-order` 和 `check-route-health`。

1. 前往 **[intents.li.fi](https://intents.li.fi)**（主网）或 **[devintents.li.fi](https://devintents.li.fi)**（测试网）
2. 连接你的钱包并注册为解算器
3. 从仪表盘复制你的 API 密钥
4. 在 MCP 配置的 `"headers"` 中将其添加为 `x-api-key`

<Card title="获取解算器 API 密钥" icon="key" href="https://intents.li.fi">
  在 intents.li.fi 注册以获取你的解算器 API 密钥
</Card>

## 环境

| 环境      | MCP Server URL                          | Order Server              | 链                                                               |
| ------- | --------------------------------------- | ------------------------- | --------------------------------------------------------------- |
| **主网**  | `https://intents-mcp.li.fi/mcp`         | `https://order.li.fi`     | Ethereum、Base、Arbitrum、Optimism 等                               |
| **测试网** | `https://intents-mcp-testnet.li.fi/mcp` | `https://order-dev.li.fi` | Ethereum Sepolia、Base Sepolia、Optimism Sepolia、Arbitrum Sepolia |

## 合约地址

在测试网和主网之间共享：

| 合约                 | 地址                                           |
| ------------------ | -------------------------------------------- |
| **Escrow Settler** | `0x00fC00edbe7C003b006f870068c548940000223e` |
| **CoinFiller**     | `0x75220B7600c300005038432a0000f308e0000068` |

**Polymer Oracle** 因环境而异：

| 环境  | Oracle 地址                                    |
| --- | -------------------------------------------- |
| 测试网 | `0xC401b53377b8A71A7cEB820e6a4dC53832343a90` |
| 主网  | `0x008C3800F3Ad9b3B662d002E90Cc00000000eE17` |

## 后续步骤

<CardGroup cols={2}>
  <Card title="安装" icon="download" href="/lifi-intents/mcp-server/installation">
    Claude、Cursor、Windsurf、VS Code 等的设置说明
  </Card>

  <Card title="可用工具" icon="wrench" href="/lifi-intents/mcp-server/tools">
    所有集成方和解算器工具的完整参考
  </Card>

  <Card title="示例" icon="code" href="/lifi-intents/mcp-server/examples">
    示例工作流、提示词和结算流程
  </Card>
</CardGroup>
