Getting started

MCP Server

Connect AI coding assistants — Claude Code, Cursor, Cline, and others — directly to your ScopeDocs workspace via the Model Context Protocol.

Overview

The ScopeDocs MCP server exposes your workspace's documentation and knowledge graph to any AI assistant that supports the Model Context Protocol. Once connected, your AI assistant can search and retrieve context from your codebase docs directly within its reasoning — without you having to copy-paste anything.

The server is hosted remotely at {API_BASE_URL}/mcp and supports both MCP transports on that single URL: Streamable HTTP (recommended) and legacy SSE for older clients. Clients that require a local stdio process can use mcp-remote as a bridge.

The server exposes 29 tools. Tool names below are exactly what your client sees — no route suffix to decode.

Retrieval — Return the evidence itself, so your assistant reasons over the raw material instead of a summary of it.

ToolDescription
search_codeSearch indexed code and return the matching chunks themselves.
search_contextSearch the non-code knowledge — Slack threads, tickets, PRs, wiki pages.
search_docsVector search over generated documentation, optionally filtered by category.
get_snippetRead the actual source lines behind a search hit or citation.
get_file_contextEverything indexed about one file: chunks, graph nodes, generated docs.

Documentation and wiki — The prose ScopeDocs generates and keeps up to date.

ToolDescription
list_docsList generated documentation.
get_docRetrieve a specific generated document.
generate_docTrigger documentation generation for a graph node.
get_wikiThe generated wiki index for a repo — module list, staleness, freshness.
get_wiki_pageOne wiki page with its full markdown.

Code graph — Structure, ownership, and blast radius.

ToolDescription
list_graph_reposList repositories that have graph/embedding/doc data.
get_full_graphReturn the full knowledge graph (nodes + edges) for a repository.
get_nodeReturn a single graph node with its linked documentation.
get_node_contextDiscussion attached to a code node — the Linear issues and Slack threads about it.
get_node_cross_refsCross-references between code and database schema for a node.
impactMap blast radius for a target — direct consumers, recent incidents, verdict.

Change history and delivery — What changed, why, and whether it matched the spec.

ToolDescription
get_pr_timelineChange history for a repo — PRs/MRs newest first, with the why-summary when one has been generated.
get_prReturn a PR with its cached explanation snapshot (if available).
get_repo_storyThe generated narrative of how a repo evolved, read from cache.
get_scope_reportAgreed-vs-built report: what was agreed, what got added later, and what shipped that nobody agreed to.
drift_checkRun a spec drift check: does this code change actually implement this spec?
drift_run_reportFetch the report for a spec drift run.

Ask a question — One call that searches everything and answers in prose, with citations.

ToolDescription
askAsk a question about this workspace and get an answer with citations.
rate_answerRate an answer a previous `ask` call returned.

Workspace and connection state — What this key can see, and whether the data is there yet.

ToolDescription
get_caller_identityIdentity attached to this API key.
get_workspace_infoReturn workspace(s) accessible to this API key.
get_index_statusPer-repo indexing status — is a repo indexed, indexing, or failed.
get_integration_statusReturn which integrations are connected for the workspace(s) accessible to this API key.
get_integration_sync_statusReturn last sync timestamps for each integration for the workspace(s) accessible to this API key.
Tip:

Start with get_index_status. Every other tool depends on the repo having been indexed, and it is the fastest way to tell an empty answer apart from an unindexed repo.

Prerequisites

You need a ScopeDocs API key with the relevant scopes. Create one in Settings → Organization.

The following scopes are required depending on which MCP tools you want to expose:

ScopeDescription
docs:read`get_doc`, `get_scope_report`, `get_wiki`, `get_wiki_page`, `list_docs`, `search_context`, `search_docs`
docs:write`generate_doc`
graph:read`get_file_context`, `get_full_graph`, `get_node`, `get_node_context`, `get_node_cross_refs`, `get_snippet`, `impact`, `list_graph_repos`, `search_code`
prs:read`drift_check`, `drift_run_report`, `get_pr`, `get_pr_timeline`, `get_repo_story`
chat:write`ask`, `rate_answer`
workspace:read`get_caller_identity`, `get_index_status`, `get_integration_status`, `get_integration_sync_status`, `get_workspace_info`
Tip:

Create a dedicated key named something like mcp-claude so you can revoke it independently if needed.

Configuration

Pick the client you use and paste the matching config. Replace <your_api_key> with your actual API key before saving.

claude mcp add scopedocs \
  --transport http \
  "https://api.scopedocs.ai/mcp" \
  --header "Authorization: Bearer <your_api_key>"

Use npx mcp-remote for clients that only support a local stdio process. If your MCP client supports streamableHttp natively, use the Direct HTTP tab instead. Clients that only speak the legacy SSE transport can point at the same URL — {API_BASE_URL}/mcp serves both transports (SSE clients use "type": "sse" or the equivalent setting).

Note:

Using an environment variable for the key keeps secrets out of version control when the config file is committed or synced.

Client notes

  • Claude Code: the CLI command is the quickest setup path and avoids editing JSON by hand.
  • Cursor: open Settings → MCP, then add the server or paste the JSON into ~/.cursor/mcp.json.
  • Cline: open MCP Servers → Edit Config and ensure mcpServers stays at the top level.
  • Other clients: if they support streamableHttp directly, no mcp-remote bridge is needed.
Warning:

Restart the client after saving the config. The scopedocs server should appear as active before you start prompting.

Usage

Once the server is connected, your AI assistant can reference ScopeDocs context automatically. You can also prompt it explicitly:

  • "Search the docs for how authentication works in this project."
  • "Use ScopeDocs to find all functions related to the ingestion pipeline."
  • "What does the EmbeddingService class do? Check the ScopeDocs knowledge graph."

The assistant will call the appropriate MCP tool, retrieve the relevant documentation, and incorporate it into its response.

Troubleshooting

401 Unauthorized

Your API key is missing, malformed, or has been revoked. Check that:

  • The Authorization header is set to Bearer <your_api_key> (with the Bearer prefix)
  • The key hasn't expired — check Settings → Organization
  • The key has the required scopes for the tools you're using

Connection timeout / server not reachable

  • Confirm your network can reach {API_BASE_URL}
  • If you're behind a corporate proxy, you may need to whitelist the domain
  • Try running npx mcp-remote {API_BASE_URL}/mcp directly in your terminal to test connectivity

No results returned

  • Try broader or different keywords — the search is semantic, not keyword-exact
  • Check that your workspace has indexed documentation. Go to your dashboard and verify docs are present
  • Ensure the API key has docs:read scope for search tools