How to connect your docs to Claude Code with an MCP server

Nova C. ·

Biel.ai MCP server connecting documentation to Claude Code

By the end of this guide you will have your product documentation registered as a tool inside Claude Code, so you can ask "how do I authenticate API requests?" in the terminal and get an answer cited from your own docs, with no browser tab. The whole setup is one CLI command plus an indexed Biel.ai project. Budget about five minutes once your docs are indexed.

This is a Guide: follow the steps in order and you end with a working result. We run Biel.ai's hosted MCP server across hundreds of docs sites, and the configuration below is the exact path we hand to new customers.

What you'll end up with

You will have a Biel.ai project indexing your docs, a hosted MCP endpoint for that project, and Claude Code configured to call it. MCP (the Model Context Protocol) is an open standard that lets an AI coding assistant talk to external tools and data sources over a consistent JSON-RPC interface. In plain terms: instead of pasting doc URLs into prompts or hoping the model saw your docs in training, MCP gives Claude Code a live connection to retrieve current answers on demand.

From Claude Code's side, an MCP server is just another tool it can call, the same way it calls a file reader or a code runner. You register it once and Claude Code decides when to query it. The payoff is that your whole loop, writing, testing, debugging, stays in the terminal.

Before you start

You need three things before the steps below will work:

  • Claude Code installed and authenticated. Run claude --version to confirm it is on your PATH.
  • A Biel.ai account. A free trial is enough to follow this guide end to end.
  • Your documentation in a crawlable form: a sitemap URL, a public site, a GitHub repo, or files you can upload.

One caveat worth stating up front: this connection only answers what your docs actually cover. If a topic is missing from your documentation, the MCP server cannot invent it. Connecting Claude Code is most useful when your docs are already structured for retrieval, which is the subject of our complete guide to optimizing docs for AI agents.

Step 1: Index your docs in a Biel.ai project

First create a project and point it at your documentation source. The crawl runs server-side; you do not deploy anything.

  1. Sign up or log in at app.biel.ai.
  2. Click Projects > Create project and give it a name.
  3. Add your documentation source. A sitemap URL works best for most doc sites.
  4. Click Create. Biel.ai begins crawling and indexing.

Here is a quick reference for the source types and when to use each:

Source typeWhen to use
Sitemap URLDoc sites with a sitemap.xml (Docusaurus, MkDocs, and similar)
Single URLSmall sites or one specific section
GitHub repoREADME-based or Markdown documentation
File uploadPDFs, Word docs, internal specs

Indexing usually finishes in a few minutes. When it does, click New chat in the dashboard and ask a known question to confirm the answers are accurate. If a response looks wrong, open Logs to see which pages were indexed and whether any source failed.

Before you move on, note your project slug. It is the identifier in the dashboard URL and in project settings, and every step after this depends on it.

Step 2: Get your MCP endpoint URL

Biel.ai hosts the MCP server for you at a predictable URL built from your project slug:

https://mcp.biel.ai/v2/YOUR_PROJECT_SLUG/mcp

For a public project, that URL is all you need. The server is hosted and maintained by Biel.ai, so there is no deployment and no infrastructure to run.

For a private project (on Business or Enterprise plans), append an API key as a query parameter:

https://mcp.biel.ai/v2/YOUR_PROJECT_SLUG/mcp?api_key=sk_...

You will find your API key under Team Settings in the dashboard. The fastest way to get the exact, correctly formed URL is to open your project, click Connect in the widget header, and select Claude Code. That copies the full installation command to your clipboard, slug and all. The full reference for endpoints and authentication lives on the Biel.ai MCP server docs page.

Step 3: Register the server in Claude Code

Add the server with one command. Replace the slug with yours:

claude mcp add --transport http biel-ai https://mcp.biel.ai/v2/YOUR_PROJECT_SLUG/mcp

The --transport http flag tells Claude Code this is a remote HTTP server rather than a local stdio process. The argument order is flag, then a name (biel-ai), then the URL. Claude Code writes the entry to your global config at ~/.claude.json and the server is available immediately.

If you prefer to edit the config by hand, open ~/.claude.json and add an entry under mcpServers:

{
  "mcpServers": {
    "biel-ai": {
      "type": "http",
      "url": "https://mcp.biel.ai/v2/YOUR_PROJECT_SLUG/mcp"
    }
  }
}

If you already run other MCP servers, add biel-ai alongside them. The mcpServers object holds multiple entries.

To check that the server registered and connected, run claude mcp list outside a session, or type /mcp inside a session to open the MCP panel. A healthy server shows as connected; a red status usually means a wrong slug or a blocked host, both covered in Troubleshooting below.

Scope it to one repository instead

If you want the server available only inside a specific project, add the --scope project flag:

claude mcp add --scope project --transport http biel-ai https://mcp.biel.ai/v2/YOUR_PROJECT_SLUG/mcp

This writes a .mcp.json file at the repository root instead of your global config, which is the right choice when you want to commit the MCP setup so every teammate on the repo gets it. Project-scoped servers require a one-time approval the first time they load; approve it when prompted or via /mcp.

Step 4: Query your docs from the terminal

Biel.ai MCP integration in action

With the server registered, Claude Code calls Biel.ai on its own when it judges a question to be about your documentation. You can also force a lookup by naming the tool:

You: biel_ai, how do I authenticate API requests?
Claude: [Searches your docs and returns the answer with citations]

Including biel_ai anywhere in your message explicitly triggers a documentation search. Without it, Claude Code uses its own judgment about when to query the server, which is reliable for clear product questions and less so for ambiguous ones. When in doubt, name the tool.

Three workflows get noticeably smoother once the docs are connected. Debugging gets faster, because Claude Code can pull the actual meaning of a status code from your API reference instead of guessing. Writing integration code gets more accurate, because it checks the real parameter names and types as it goes, which cuts down on hallucinated field names. And answering "where is this documented?" stops being a tab-switch, because the citation comes back inline with the answer.

Make Claude check your docs automatically

For a repository where you work in your own product daily, add a project rules file so Claude Code consults your docs without being asked each time. Create a CLAUDE.md at the repository root:

For questions about our product, API, or troubleshooting steps:
always check the biel-ai MCP server before responding.

Claude Code reads CLAUDE.md from the project root at the start of every session, so this rule applies to every prompt in that repo. It is especially useful for onboarding teammates working in a codebase they are still learning: the docs surface in context instead of in a browser. For a broader look at why this matters for first-run developer experience, see how teams cut time-to-first-API-call with AI-ready docs.

Troubleshooting

These are the errors people actually hit, with the fix for each.

Claude Code can't connect to the server

claude mcp list shows the server as failed, or /mcp reports a connection error. Three things to check, in order:

  1. Confirm the project slug in the URL is exact. Copy it straight from the dashboard rather than typing it.
  2. Check that mcp.biel.ai is not blocked by a corporate firewall or VPN. Remote HTTP MCP servers need outbound HTTPS.
  3. For a private project, verify the API key is appended to the URL and has not been revoked under Team Settings.

The server connects but returns no results

The connection is green but answers come back empty. Usually the project has not finished indexing yet:

  1. Confirm indexing completed; a brand-new project takes a few minutes.
  2. Test the same question in the dashboard chat to confirm answers exist there.
  3. Include biel_ai explicitly in your message to force the lookup rather than relying on Claude Code's routing.

Answers seem stale

Biel.ai re-indexes your sources automatically on a schedule, so most drift resolves itself. After a large docs change you can force it: click Refresh sources in the project dashboard to trigger an immediate re-crawl.

Responses hit the context limit

A very large docs site can occasionally produce a response that exceeds Claude Code's context window. Split the docs into a second Biel.ai project scoped to one section, for example the API reference alone, and register both endpoints under mcpServers with different slugs. Claude Code happily holds multiple MCP servers and will pick the relevant one.

Frequently asked questions

What is MCP and why does Claude Code use it?

MCP (the Model Context Protocol) is an open standard for connecting AI assistants to external tools and data over a consistent JSON-RPC interface. Claude Code uses it so that a documentation source, a database, or any other system becomes a tool the model can call mid-task, which keeps your workflow in the terminal instead of in a browser.

Do I have to host the MCP server myself?

No. Biel.ai hosts the server for you at https://mcp.biel.ai/v2/YOUR_PROJECT_SLUG/mcp. There is nothing to deploy or maintain on your side; you index your docs in a project and point Claude Code at the URL.

Can I share the MCP setup with my whole team?

Yes. Use claude mcp add --scope project, which writes a .mcp.json file at the repository root. Commit that file and every teammate who works in the repo gets the same MCP server, subject to a one-time approval prompt on first load.

Does this work with editors other than Claude Code?

The same hosted endpoint works with any MCP-capable client, including Cursor and VS Code. The only thing that changes is where you paste the URL; the Biel.ai project and slug stay the same.

Try it on your own docs

If you use Claude Code daily, connecting your docs is one of the highest-return setup steps available: create a project, copy the endpoint, run one command, and your documentation becomes a first-class tool in every session. Start a free Biel.ai trial and you can have your first project indexed and connected before the end of this page.

Try me ↓