Jamdesk Documentation logo

MCP Server

Every Jamdesk site includes a built-in MCP server. AI assistants like Claude and Cursor can search and read your docs directly.

Every Jamdesk site has a built-in MCP (Model Context Protocol) server. llms.txt gives AI tools a static snapshot of your docs. MCP lets them search and query your docs to find specific answers without reading everything.

What is MCP?

The Model Context Protocol is an open standard for connecting AI tools to external data sources. Your Jamdesk docs expose two MCP tools:

ToolPurpose
searchDocsSearch documentation by keyword, returns ranked results
getPageRetrieve a page as full Markdown

Your Endpoint URL

Your MCP endpoint is your docs URL with /_mcp appended. If you have a custom domain live, use it:

SetupEndpoint
Custom domain at docs.acme.comhttps://docs.acme.com/_mcp
No custom domainhttps://my-project.jamdesk.app/_mcp

Use the custom domain endpoint when one is connected. It keeps your branding in every URL AI tools see. It also keeps working if you later hide your .jamdesk.app subdomain with Custom domain only.

Quick Setup

Add your docs as an MCP server:

claude mcp add --transport http my-docs https://docs.acme.com/_mcp

Replace docs.acme.com with your docs domain. Use my-project.jamdesk.app if you haven't connected a custom domain.

Claude can now search and read your documentation when you ask about your project.

Available Tools

searchDocs

Search your documentation and get ranked results.

Parameters:

ParameterTypeRequiredDescription
querystringYesSearch terms (e.g., "authentication", "getting started")
limitnumberNoMax results (default: 10, max: 50)
typestringNoFilter by content type: all, api, guide, quickstart, help, component

Example request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "searchDocs",
    "arguments": {
      "query": "authentication",
      "limit": 5
    }
  }
}

Example response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [{
      "type": "text",
      "text": "{\"query\":\"authentication\",\"total\":1,\"results\":[{\"title\":\"Authentication\",\"description\":\"How to authenticate API requests\",\"url\":\"/docs/api/authentication\",\"type\":\"api\",\"score\":0.95}]}"
    }]
  }
}

getPage

Retrieve a documentation page as Markdown. Tables, lists and code blocks come back intact, not as short excerpts. Pass the url that searchDocs returned as url, or the page path as slug. Pages longer than 80,000 characters are cut at that length, with a pointer to the page's .md URL for the rest.

Parameters:

ParameterTypeRequiredDescription
urlstringOne of url or slugThe url from a searchDocs result (e.g., /docs/api/authentication). Full page URLs and .md links also work.
slugstringOne of url or slugThe page path without the /docs prefix (e.g., api/authentication)

Send one. If you send both, slug is used.

Example request:

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "getPage",
    "arguments": {
      "url": "/docs/api/authentication"
    }
  }
}

Example response:

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "content": [{
      "type": "text",
      "text": "{\"title\":\"Authentication\",\"description\":\"How to authenticate\",\"content\":\"## Overview\\n\\nUse API keys to authenticate...\",\"url\":\"/docs/api/authentication\"}"
    }]
  }
}

Testing the Endpoint

Test your MCP endpoint with curl:

# List available tools
curl -X POST https://docs.acme.com/_mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

# Search for content
curl -X POST https://docs.acme.com/_mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"searchDocs","arguments":{"query":"getting started"}}}'

Login-Protected Sites

If your site uses password or JWT authentication, the MCP server needs a project API key. Create one in Project Settings > API Keys and send it as a header:

claude mcp add --transport http my-docs https://docs.example.com/_mcp \
  --header "Authorization: Bearer jd_live_..."

A key lets an MCP client search and read the site's searchable pages, the same set the site search covers. Group-restricted pages are never available through MCP, with or without a key. Hidden pages and pages with search: false are left out unless you've made them searchable. Treat the key like a password. Revoke it in the dashboard if it leaks.

The same key also opens .md page URLs, llms.txt and llms-full.txt. See llms.txt and Markdown Source. The key never opens HTML pages or the AI chat. Those still need a login.

Without a key, the server answers with 401 and a JSON body that says how to add one. A key from another project is rejected. The error codes are:

StatuserrorMeaning
401auth_requiredNo key was sent.
401invalid_api_keyThe key isn't valid for this site.
503auth_unavailableThe key couldn't be checked. Retry after the number of seconds in the Retry-After header.

How It Works

The MCP endpoint uses a search index built alongside your docs:

  • BM25 ranking: ranks results by relevance
  • Fuzzy matching: tolerates 1-character typos
  • Field boosting: titles and section headers weigh more than body content
  • Type filtering: filter results by content type (API, guide, etc.)

The index rebuilds with every deploy.

Rate Limits

Requests without an API key are limited to about 60 per minute per IP address. That's enough for one person's AI assistant. Everyone behind a shared IP, such as an office network or your own backend, draws from the same allowance.

Requests that send a project API key skip the per-IP limit and get 120 per minute per key instead, on any site. Add the key to your MCP client config the same way as for login-protected sites.

On a login-protected site, .md page requests and llms.txt or llms-full.txt requests made with a key count toward that key's limit too. The Search API keeps its own limit of 60 per minute per key.

Requests over a limit get a 429 response with Retry-After: 60.

Troubleshooting

Verify your endpoint URL is correct and accessible:

curl https://docs.acme.com/_mcp

You should see a JSON response with server info. If not, check that your docs have been built at least once.

Jamdesk generates the search index at build time. Trigger a rebuild from your Jamdesk dashboard to index new content.

Pass the url from a searchDocs result to avoid slug mismatches. If you send a slug, match it to your page path exactly, without the .mdx extension. A page at api/authentication.mdx has the slug api/authentication.

The site uses password or JWT authentication. The request needs a project API key. Add the Authorization: Bearer header with a key from Project Settings > API Keys. See Login-Protected Sites.

What's Next?

Writing with AI

Tips for using AI tools to write documentation

llms.txt

Auto-generated page index for AI tools