**MCP 服务器** · [API](https://to.co/zh-cn/docs/api?format=md)

# to.co MCP 服务器

让 AI 助手查询 to.co 上已发布的企业记录，并保持您自己的企业资料为最新。查询企业免费，且无需登录。

[连接您的助手](#connect) · [工具](#tools)

- 服务器网址: `https://mcp.to.co/mcp`
- 传输方式: Streamable HTTP（MCP 协议版本 2026-07-28, 2025-11-25）

<a id="connect"></a>
## 连接您的助手

将服务器网址添加到您的助手中。查询功能可立即使用。如需让助手管理您自己的企业，请在其提示时登录 to.co，详见“登录”一节。

### Claude (claude.ai and the desktop app)

1. Open Settings, then Connectors, and choose Add custom connector.
2. Name it to.co and enter https://mcp.to.co/mcp as the URL.
3. Leave the client ID and secret empty. Lookups work at once; to let Claude work on your own businesses, sign in to to.co and choose Allow when it asks.

### Claude Code

1. Run this in a terminal, then run /mcp in Claude Code and choose toco to sign in when you want the companies and locations tools.

```sh
claude mcp add --transport http toco https://mcp.to.co/mcp
```

### Cursor

1. Add this to ~/.cursor/mcp.json (or .cursor/mcp.json in a project). Cursor asks you to sign in to to.co when the companies or locations tool first needs it.

```json
{
  "mcpServers": {
    "toco": {
      "url": "https://mcp.to.co/mcp"
    }
  }
}
```

### VS Code

1. Add this to .vscode/mcp.json, then start the server from the MCP view. VS Code asks you to sign in to to.co when the companies or locations tool first needs it.

```json
{
  "servers": {
    "toco": {
      "type": "http",
      "url": "https://mcp.to.co/mcp"
    }
  }
}
```

### ChatGPT

1. In Settings, open Apps and connectors and turn on developer mode under Advanced.
2. Create a connector with https://mcp.to.co/mcp as the server URL and OAuth as the authentication.

### Windsurf

1. Add this to ~/.codeium/windsurf/mcp_config.json. The Authorization header, with an agent token, is needed only for the companies and locations tools; leave it out for lookups.

```json
{
  "mcpServers": {
    "toco": {
      "serverUrl": "https://mcp.to.co/mcp",
      "headers": {
        "Authorization": "Bearer toco_at_…"
      }
    }
  }
}
```

### Any other client

1. Use Streamable HTTP at https://mcp.to.co/mcp.
2. For the companies and locations tools, sign in with OAuth (the server advertises https://my.to.co in its protected resource metadata) or send Authorization: Bearer with an agent token.

## 登录

identity 和 help 工具无需登录。companies 和 locations 工具作用于您账户拥有的企业，因此助手必须以您的身份操作。有两种方式。

使用 to.co 登录（OAuth）。当助手首次使用 companies 或 locations 工具时，服务器会回复需要登录，助手会打开一个 to.co 页面，您在其中登录并查看它请求的权限：读取您的企业，以及更改其公开资料。您可以取消勾选更改权限。之后它会获得一个有效期一小时并可自动续期的令牌；您可以随时在“登录与安全”页面断开连接。这适用于支持 MCP 登录（OAuth）的助手。

或者使用代理令牌，适用于脚本和不支持 MCP 登录的助手。在 my.to.co 的“登录与安全”页面创建。令牌有效期 90 天，以 toco_at_ 开头，可以执行 companies 和 locations 工具的所有操作，您可以在该页面撤销。以 Authorization: Bearer toco_at_… 的形式发送。请像对待密码一样对待它：来自网页的令牌会被拒绝。无论采用哪种方式，服务器都会在每次调用时核对所有权：其他账户的企业会显示为未找到。

[管理已连接的应用和令牌](https://my.to.co/account/security)

<a id="business"></a>
## 每家企业自己的服务器

to.co 上每家已发布的企业还有自己的 MCP 服务器，位于其自己网址的 /mcp 下，例如 https://mybusiness.uk.to.co/mcp。它是独立于 mcp.to.co 的服务器，拥有专门针对该企业的工具：企业在其主页上发布的内容（它是谁、如何联系、何时何地营业，以及它允许助手做什么）、在企业接收的情况下发送消息，以及供其所有者使用的工具。这些工具都不会查询其他企业，也不接受网址参数。查询该企业免费，且无需登录。每家企业的服务器都在其自己网址的 /mcp/docs 下提供文档，使用读者的语言。企业主页链接到该文档，其 llms.txt 和 Link 标头（rel="service-desc"）指向其服务器卡片 /.well-known/mcp.json。

如需连接，请将以 /mcp 结尾的企业网址作为自定义连接器或 MCP 服务器添加到您的助手中。登录方式如“登录”一节所述，且该连接仅对该企业有效：针对其他企业或 mcp.to.co 的令牌会被拒绝。所有者可在 my.to.co 中企业的“AI 助手”标签页找到该网址。

无论是否登录，查询企业都不收费：每个调用方（令牌；没有令牌时按 IP 地址计）在每家企业的服务器上每小时可查询 600 次。需要登录的调用由调用者付费。所有者的账户在所有套餐中都使用企业的月度 API 额度。其他任何人在所有企业间共享一份自己的额度：每小时 60 次，每月 500 次。超出每月 500 次后，如果其自己的账户在 to.co 上有企业，则从该企业的月度 API 额度中扣除；没有的话，调用会被拒绝，直到下月 1 日。拒绝时返回 HTTP 429：企业当月额度用完时为 credits_exhausted，个人当月额度用完时为 allowance_exhausted，每小时限制则为 rate_limited 并附 Retry-After。

在 Pro 和 Grow 套餐中，所有者可以允许助手通过 messages 工具向企业发送消息，前提是助手所代表的人已看过该消息并请求发送，且使用其本人的姓名和联系方式。此功能默认关闭，需所有者开启。

<a id="tools"></a>
## 工具

每个连接都有以下四个工具；已登录的账户还可以使用单据、贸易伙伴和消息工具。每个工具接收一个 action 参数说明要做什么，以及该操作所需的参数。参数和结果的字段名使用 snake_case，与 to.co API 一致。所有结果均为 JSON，以结构化内容返回并附有匹配的输出架构。营业时间保持其存储形式：day（0 为周日至 6 为周六）或 date（YYYY-MM-DD），以及 open、open_time 和 close_time（24 小时制 HH:mm）；关门时间早于开门时间表示跨越午夜。

### `identity` — Look up a business identity

Look up published business identities on to.co. Anyone can call it; no sign-in needed. Records are the public projection: never internal keys or account details.

- `resolve` (任何人, 只读): The business at a to.co address.
  - `host` (string, 必填): A to.co address, e.g. mybusiness.uk.to.co or mybusiness-bristol.biz.to.co
- `website` (任何人, 只读): The businesses whose website is on this hostname. A website can belong to more than one business, so this returns a list.
  - `website` (string, 必填): The business's own website, e.g. mybusiness.com or https://www.mybusiness.com/
- `search` (任何人, 只读): Businesses whose name matches, newest first.
  - `query` (string, 必填): Part of the business name, at least 2 characters
  - `limit` (integer): Maximum results, 1-25 (default 10)

调用示例:

```json
{
  "name": "identity",
  "arguments": {
    "action": "resolve",
    "host": "mybusiness.uk.to.co"
  }
}
```

### `companies` — Manage your businesses

Read and update the businesses the connected account owns, drafts included. Needs the person to sign in (OAuth) or an agent token; only the owning account can read or change a record.

- `list` (需登录，权限范围 `companies:read`, 只读): Every business the account owns, with its record key and publish status.
- `get` (需登录，权限范围 `companies:read`, 只读): One business the account owns, by record key.
  - `domain` (string, 必填): The record key of a company you own, as returned by companies list (the `domain` field)
- `update` (需登录，权限范围 `companies:write`, 会更改数据): Change profile fields and publish the page again. Fields you leave out keep their value; an empty string or null clears one. A registered company takes its official name from the company register, so its name cannot be changed; set informal_name instead.
  - `domain` (string, 必填): The record key of a company you own, as returned by companies list (the `domain` field)
  - `name` (string): The name of a business that is not registered. Refused for a registered company
  - `informal_name` (string): A shorter everyday name. An empty string or null clears it
  - `description` (string): What the business does, up to 2000 characters. An empty string or null clears it
  - `website_url` (string): The business website, a full https:// URL. An empty string or null clears it
  - `email` (string): A public contact email. A new address is shown on the page only after its owner confirms it from a link emailed to it; the old one stays until then. An empty string or null clears it
  - `phones` (object): Phone numbers by kind; kinds you leave out keep their value. Whether to.co verified a number is read-only
  - `links` (object): Links shown as actions on the page; links you leave out keep their value
  - `keywords` (string): Search keywords, up to 1000 characters. An empty string or null clears it
  - `category` (string): The business category shown on the page, e.g. Bakery. An empty string or null clears it
  - `vat_registration_number` (string): An optional VAT, GST or other tax registration number for the company's home country. Up to 100 characters; upper-cased, and anything but letters and digits removed. Where the country has a rule (the EU, the UK, Switzerland, Norway, Australia, New Zealand, Canada, India) its format and check digit are checked and a number that fails is refused; EU and UK numbers are saved with their country prefix. An empty string or null clears it
  - `contact_preferences` (object): How the business prefers to be contacted by to.co: true or false for email, sms, post and tel
  - `social_links` (object): Social profiles by network (linkedin, x, instagram, facebook, youtube, tiktok, pinterest, vimeo, snapchat, clubhouse): a profile link, or a handle for x and instagram. An empty string or null removes one

调用示例:

```json
{
  "name": "companies",
  "arguments": {
    "action": "list"
  }
}
```

### `locations` — Manage your trading locations

Read the locations of a business the connected account owns, and set the description, opening hours, phone numbers and social profiles of its trading locations. These changes keep a location verified. The registered office comes from the company register and cannot be changed here; moving an address needs new proof, in the to.co app.

- `list` (需登录，权限范围 `companies:read`, 只读): Every location of a business you own, with its record key, kind (registered or trading), hours, phones and profiles.
  - `domain` (string, 必填): The record key of a company you own, as returned by companies list (the `domain` field)
- `update` (需登录，权限范围 `companies:write`, 会更改数据): Set the description, opening hours, special hours, phone numbers or social profiles of a trading location and publish the page again. Hours replace the current ones; fields you leave out keep their value. Phone numbers are saved as international numbers; the answer's checks say what was changed, and a value that cannot be accepted is refused, naming the field.
  - `domain` (string, 必填): The record key of a company you own, as returned by companies list (the `domain` field)
  - `location` (string, 必填): The record key of a trading location, as returned by locations list (the `domain` field)
  - `description` (string): What this location offers: its own services, products and benefits, in plain words (no name, address, phone, email, links or prices; they are checked and removed). An empty string or null clears it
  - `normal_hours` (array): Weekly opening hours, replacing the current ones: one entry per slot, up to 4 a day; a day with no entry or open false is closed. [] or null clears them
  - `special_hours` (array): Holiday and closure hours that replace the weekly hours on their date, replacing the current list. [] or null clears them
  - `phones` (object): Phone numbers by kind; kinds you leave out keep their value. Whether to.co verified a number is read-only
  - `social_links` (object): Social profiles by network (linkedin, x, instagram, facebook, youtube, tiktok, pinterest, vimeo, snapchat, clubhouse): a profile link, or a handle for x and instagram. An empty string or null removes one

调用示例:

```json
{
  "name": "locations",
  "arguments": {
    "action": "list",
    "domain": "yxpx6pdx.uk.to.co"
  }
}
```

### `help` — Connection and usage help

Check this connection and read the usage guide.

- `whoami` (任何人, 只读): Whether this connection is signed in, and which tools and actions it can use.
- `guide` (任何人, 只读): The usage guide as Markdown (also the resource toco://guide).

调用示例:

```json
{
  "name": "help",
  "arguments": {
    "action": "whoami"
  }
}
```

## 资源

- `toco://guide` (text/markdown): How to look businesses up and keep your own profile current, with examples.
- `toco://identity/{host}` (application/json): The published record at a to.co address, as JSON. Example: toco://identity/mybusiness.uk.to.co

## 提示词

- `look_up_business`: Find a business on to.co by its to.co address, website or name, and summarize its record. 参数：`business`。
- `review_my_profile`: Read a business you own and suggest clearer wording for its public profile. Changes nothing until you confirm. 参数：`domain`。

## 错误

助手可以修正的调用会返回一个标记为错误的工具结果，以固定代码开头并说明需要更改什么：

- `invalid_arguments`: 参数缺失、超出范围或未知（字段名使用 snake_case），或操作未知。
- `not_found`: 没有匹配的已发布企业，或您拥有的企业或地点中没有该记录键。
- `unauthenticated`: 该操作需要登录（仅在客户端未对下述 HTTP 401 作出响应时出现）。
- `insufficient_scope`: 该连接未被授权执行此操作，例如在只允许读取时尝试更改。

未登录调用 companies 或 locations 会返回 HTTP 401，并附带指向服务器受保护资源元数据的 WWW-Authenticate 标头，助手据此知道要开始登录。超出您允许范围的操作会返回 HTTP 403，附 error=insufficient_scope 及需要申请的权限范围。无效、过期或已撤销的令牌会在任何工具运行前返回 HTTP 401；绝不会被视为没有令牌。请求过多会返回 HTTP 429，并附 Retry-After 标头。

## 限制

- 每个代理令牌（没有令牌时按 IP 地址计）每分钟 120 次请求。
- 请求正文最大 1024 KB。
- 每次搜索调用最多返回 25 家企业。

## 发现

- 服务器卡片: https://mcp.to.co/.well-known/mcp.json
- MCP Registry 条目（co.to/mcp）: https://mcp.to.co/server.json
- 受保护资源元数据（RFC 9728）: https://mcp.to.co/.well-known/oauth-protected-resource
- 授权服务器元数据（RFC 8414）: https://my.to.co/.well-known/oauth-authorization-server

## 数据与隐私

查询只返回已发布的记录，与企业公开主页上的信息相同。服务器会记录运行了哪个工具和操作、是否成功以及耗时，不记录参数和记录内容。当您连接助手时，to.co 会保存该连接的记录（应用名称、您允许的权限、创建时间和最近使用时间），断开连接后该记录作为安全记录保留。

## 后续步骤

- [阅读发布文章](https://to.co/en-us/blog/mcp-server)
- [开始使用](https://my.to.co/claim)
