**MCP 伺服器** · [API](https://to.co/zh-tw/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)
