Clarity

mcp

設定指南

在 2 分鐘內於 Claude Desktop、Cursor 或任何 MCP 相容客戶端中設定 Clarity MCP。

先決條件

  • 擁有至少一個專案的 Clarity 帳號
  • 一個 MCP 相容的 AI 客戶端(Claude Desktop、Cursor、Windsurf 等)

下方的設定精靈會為您的客戶端生成可直接貼上的設定片段。只需貼上您的 API 金鑰並複製設定即可。

1Get your API key

Generate an API key in your Clarity settings. You'll paste it into the config below.

Create API key in Settings
2Configure your client
Config file location:
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Win%APPDATA%\Claude\claude_desktop_config.json
json
{
  "mcpServers": {
    "clarity": {
      "command": "npx",
      "args": [
        "-y",
        "clarity-mcp@latest"
      ],
      "env": {
        "CLARITY_API_KEY": "<your-api-key>",
        "CLARITY_API_URL": "https://www.claritynotes.xyz"
      }
    }
  }
}
  1. 1Open Claude DesktopSettingsDeveloperEdit Config
  2. 2Paste the config below into claude_desktop_config.json
  3. 3Replace <your-api-key> with the key you copied
  4. 4Save the file and restart Claude Desktop
3Verify the connection

Ask your AI assistant:

“List my Clarity projects”

If configured correctly, it will call the list_projects tool and return your workspace.


疑難排解

問題解決方案
"CLARITY_API_KEY is required"確認 env 區塊中包含您的金鑰
"API 401: Invalid API key"在 Settings → MCP / API 中重新生成金鑰
工具未顯示編輯設定後重新啟動您的 AI 客戶端

您可以透過詢問 AI:「列出我的 Clarity 專案。」 來測試連線。如果它回傳您的工作區內容,表示一切正常。

這對您有幫助嗎?
設定指南 — Clarity Docs