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 uses mcp-remote as a bridge for clients that require a local stdio process.

ToolDescription
search_docsSemantic search over generated documentation.
get_docRetrieve the full content of a specific document by ID.
search_graphQuery the knowledge graph for code relationships and structure.
chatAsk natural-language questions about your codebase.

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`search_docs`, `get_doc`
graph:read`search_graph`
chat`chat`
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://scopedocs-ai-production.up.railway.app/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.

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