ClayDocs MCP server

Use your repositories' living documentation and code right inside your team's coding assistant. The ClayDocs MCP server answers with the same tools as the chat, always citing the section, PR or code lines each piece of information came from.

Endpoint

One endpoint for every workspace: the API key tells which workspace the client reads. The transport is Streamable HTTP, with no session.

URL
https://claydocs.com.br/api/mcp
Authentication header
Authorization: Bearer cdk_SUA_CHAVE

How to connect

  1. A workspace admin opens Settings → API keys and creates a key with a name that identifies its use (e.g. "Team Cursor").
  2. Copy the key right away: for security it is not shown again. If you lose it, revoke it and create another.
  3. Configure your client with the endpoint and the key, as in the examples below, replacing cdk_SUA_CHAVE with the copied key.
  4. Ask your assistant. It calls the ClayDocs tools when the question is about the workspace's documentation, history or code.
Create an API key

Configuration per client

Claude Code

terminal
claude mcp add --transport http claydocs https://claydocs.com.br/api/mcp \
  --header "Authorization: Bearer cdk_SUA_CHAVE"

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "claydocs": {
      "url": "https://claydocs.com.br/api/mcp",
      "headers": {
        "Authorization": "Bearer cdk_SUA_CHAVE"
      }
    }
  }
}

VS Code

.vscode/mcp.json
{
  "servers": {
    "claydocs": {
      "type": "http",
      "url": "https://claydocs.com.br/api/mcp",
      "headers": {
        "Authorization": "Bearer cdk_SUA_CHAVE"
      }
    }
  }
}

The key grants read access to the whole workspace: do not commit it to the repository. Prefer your client's user settings or environment variables.

Tools

The same as the ClayDocs chat. All of them are read-only and limited to the key's workspace.

ToolParametersWhat it does
semanticSearchquery, repository?Searches the living documentation by the meaning of the question: architecture, configuration, APIs and business rules.
getSectionsectionIdReturns the full text of a section found by the search.
searchChangesrepository?, kind?, dateFrom?, dateTo?, limit?Lists documented changes (merged PRs and direct pushes), newest first, filtered by repository, kind and period.
countChangesrepository?, kind?, dateFrom?, dateTo?Counts documented changes with the same filters. It is the tool for "how many" questions.
searchCodequery, repository?Finds the functions, methods, classes and types closest to the question, with file, lines and a GitHub link.
getCodeSnippetrepository, path, startLine, endLineReads the lines of a file found by searchCode, fetched from GitHub on demand (up to 200 lines per call).

Example questions

  • Where is the order discount computed and how does it work?
  • What changed in the payments API last month?
  • How many PRs were documented this week?
  • Which environment variables does the ingestion service need?

Limits and errors

Each key can make up to 60 requests per minute, and each request can take up to 60 seconds.

  • 401: missing, invalid or revoked key.
  • 403 local_only_workspace: the workspace has a project that forbids cloud LLMs, and your client's model may be one. These workspaces are not available over MCP.
  • 429: the key's request limit was reached. Wait a minute.
  • 503: the documentation could not be queried right now. Try again shortly.

Security

  • Read-only: no tool changes the documentation, approves sections or touches the repository.
  • Each key reads a single workspace, set when it is created. The client cannot pick another.
  • Admins revoke a key anytime in Settings, effective immediately. The list shows each key's last use.
  • Values that look like credentials (API keys, tokens, passwords) are masked before leaving ClayDocs.
  • ClayDocs does not store your repositories' code: the code index keeps only where each definition is, and snippets are fetched from GitHub when asked for.