> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/ai-assistants-and-mcp.md).

# AI Assistants & MCP

Connect Claude, Cursor, VS Code, Codex or any MCP client to the TNID documentation, and let your app ask the docs a question from inside the API.

TNID's documentation is available to AI coding assistants through the Model Context Protocol (MCP), an open standard that lets an assistant call outside tools. Connect the server below and your assistant can search these docs, read any page, and report documentation problems back to us instead of guessing from stale training data.

## The documentation MCP server

| Setting        | Value                                             |
| -------------- | ------------------------------------------------- |
| Server URL     | `https://docs.tnid.com/~gitbook/mcp`              |
| Transport      | Streamable HTTP                                   |
| Authentication | None. The server only reads public documentation. |
| Cost           | Free                                              |

The server covers both the guides and the API Reference section of this site. It exposes three tools:

| Tool                  | What it does                                                                                                               |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `searchDocumentation` | Full-text search across every page. Returns matching excerpts with titles and links.                                       |
| `getPage`             | Fetches the complete Markdown of one page by its URL, for example `https://docs.tnid.com/company/search-companies`.        |
| `sendFeedback`        | Lets the assistant report outdated, contradictory or missing content on a page. Reports go to the TNID documentation team. |

{% hint style="info" %}
This server covers documentation only. It cannot log in, create connections, send subscription requests or call the TNID API. Your tokens and client secrets never pass through it. To act on the platform, your code still calls the `/user` and `/company` GraphQL servers described in this documentation.
{% endhint %}

## Connect your assistant

{% tabs %}
{% tab title="Claude Code" %}
Run once in your terminal:

```bash
claude mcp add --transport http tnid-docs https://docs.tnid.com/~gitbook/mcp
```

Then ask, for example, "Using the TNID docs, write a client that authenticates as a company and lists pending B2B connection requests."
{% endtab %}

{% tab title="Claude.ai / Desktop" %}
Open **Settings → Connectors → Add custom connector**, name it "TNID docs", and paste `https://docs.tnid.com/~gitbook/mcp` as the URL. No authentication is needed. Enable it in a chat from the tools menu.
{% endtab %}

{% tab title="Cursor" %}
Add to `.cursor/mcp.json` in your project (or `~/.cursor/mcp.json` for all projects):

```json
{
  "mcpServers": {
    "tnid-docs": {
      "url": "https://docs.tnid.com/~gitbook/mcp"
    }
  }
}
```

{% endtab %}

{% tab title="VS Code" %}
Add to `.vscode/mcp.json` in your workspace, then start the server from the MCP view:

```json
{
  "servers": {
    "tnid-docs": {
      "type": "http",
      "url": "https://docs.tnid.com/~gitbook/mcp"
    }
  }
}
```

{% endtab %}

{% tab title="Codex" %}

```bash
codex mcp add tnid-docs --url https://docs.tnid.com/~gitbook/mcp
```

{% endtab %}

{% tab title="Other clients" %}
Any MCP client that supports streamable HTTP can connect. Point it at `https://docs.tnid.com/~gitbook/mcp` with no bearer token. `stdio` and SSE transports are not offered.
{% endtab %}
{% endtabs %}

## Other machine-readable formats

| Resource                          | URL                                                                                                        | Use it for                                                                          |
| --------------------------------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| Index of all pages with summaries | `https://docs.tnid.com/llms.txt`                                                                           | Give an assistant a map of the docs                                                 |
| Every page in one file            | `https://docs.tnid.com/llms-full.txt`                                                                      | Load the whole guide into context                                                   |
| Any single page                   | Append `.md` to its URL, e.g. `https://docs.tnid.com/getting-started-guide.md`                             | Fetch one page without HTML                                                         |
| API Reference                     | [docs.tnid.com/api-reference](https://docs.tnid.com/api-reference/) (every page also available with `.md`) | Every query, mutation, type and enum, generated from the API source                 |
| One-page API summary              | [API Quick Reference](/api-quick-reference.md)                                                             | Environments, authentication, feature map, webhooks and pagination in a single read |

## Ask the docs from inside the API

Both GraphQL servers expose a mutation that answers a natural-language question from this documentation and names the pages it drew on. It is useful for in-app help and for agents that already hold a TNID token:

```graphql
mutation ($question: String!) {
  askDocsQuestion(question: $question) {
    answer
  }
}
```

A user token is answered from the user half of the reference, a company token from the company half. See the API Reference: [user assistant](https://docs.tnid.com/api-reference/001_user/016_assistant), [company assistant](https://docs.tnid.com/api-reference/002_company/020_assistant).

## What to expect

* Answers are grounded in the published documentation. If a page is wrong, the assistant will be wrong too; the `sendFeedback` tool exists so it can tell us.
* The assistant still needs your credentials to run code against the API. Keep client secrets and tokens in environment variables, never in prompts or chat history.
* Prompts that work well: "Search the TNID docs for how B2C subscription requests are accepted and write the webhook handler", "Which server, /user or /company, exposes createSpamReport?", "Compare the plain and paginated variants of b2bConnections."

Questions or ideas for the MCP server? Email <support@tsgglobal.com>.
