Skip to content

OpenAI-compatible API, MCP server and widgets

DocsGPT gives every agent an OpenAI-compatible API, an MCP server for Claude, Cursor and other AI clients, and open-source chat and search widgets, with Telegram, Discord, Slack and Chatwoot bots on top. Put your private RAG backend into your product, your docs or your support desk.

/v1/chat/completions · /mcp · npm install docsgpt · access tokens

Last updated:

claude code — docsgpt mcp
claude code — docsgpt mcp

OpenAI-compatible API

Anything that already speaks OpenAI can talk to your agents by changing one URL.

Each agent is reachable at /v1/chat/completions with its own API key. The OpenAI SDKs, opencode, Aider and LibreChat work by changing the base URL; the key decides which agent, prompt, sources and model answer.

Send files and images in the messages, set sampling parameters or keep the agent's defaults, and get back the token usage, cached prompt tokens included, and the model that answered, including when a fallback model stepped in.

  • streamingtoken by token
  • files and imagesin messages
  • structured outputsJSON Schema
  • tool callingyour functions, our RAG
  • sampling parametersor the agent's defaults
  • usage and modelreported per answer
# drop-in for the OpenAI SDK: change base_url and the key
from openai import OpenAI

client = OpenAI(
    base_url="https://docsgpt.example.com/v1",
    api_key=AGENT_API_KEY,
)

stream = client.chat.completions.create(
    # required by the SDK; the key decides which agent answers
    model="docsgpt-agent",
    messages=[{"role": "user", "content": "Summarise the Q3 security review"}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

MCP server for Claude, Cursor and other AI clients

Your coding assistant searches your company's knowledge without leaving the editor.

DocsGPT runs an MCP server, so Claude Code, Cursor and any other MCP client can search an agent's knowledge with the search_docs tool and answer from what it finds.

It authenticates with the agent's API key, so the client sees only the sources that agent uses, and every search is recorded in the agent's traces. Here DocsGPT is the server; when DocsGPT calls your MCP servers instead, see connectors.

# Claude Code: add DocsGPT as an MCP server
claude mcp add --transport http docsgpt \
  https://docsgpt.example.com/mcp \
  --header "Authorization: Bearer $AGENT_API_KEY"

API, access tokens and automation

Everything the app does is in the API, and scripts get their own scoped tokens.

Agents answer and stream over the native API, with citations, and the Search API returns the passages on their own. Webhooks let other systems trigger an agent, realtime events keep a client up to date, and a turn that needs approval can pause and resume over the API.

Personal access tokens let scripts, the CLI and CI pipelines act on your account: each is scoped to what it may do, can be limited to specific resources and expires when you say. With docsgpt-cli, agents become YAML you review and apply from CI. API clients can download the files an agent produces, and every instance serves its own REST reference.

  • Agent APIanswers and streaming, with citations
  • Search APIthe passages, without an answer
  • Webhookstrigger an agent from another system
  • Realtime eventslive notifications and stream resume
  • Tool approvalspause, approve, resume over the API
  • REST referenceevery endpoint, on every instance
app.docsgpt.cloud — Settings › Access Tokens
Settings › Access Tokens: a token named CI: agents apply with the scopes agents:write, prompts:read and sources:write, access to all resources and an expiry date, with Regenerate and Revoke buttons.
app.docsgpt.cloud — Settings › Access Tokens
Settings › Access Tokens: a token named CI: agents apply with the scopes agents:write, prompts:read and sources:write, access to all resources and an expiry date, with Regenerate and Revoke buttons.

Chat and search widgets

A chat widget, a sidebar assistant and a search bar for your docs or product, from one npm package.

The chat widget is a React or plain-HTML component on npm as docsgpt, themed to your site. It floats as a bubble or docks as a full-height sidebar, speaks eight languages, offers suggested questions and keeps each visitor's conversation history. Every answer lists its sources.

A JavaScript API opens the widget, asks a question for the visitor or reacts to events, and passthrough values such as the plan or the page reach the agent's prompt and its Logs. The same package has a search bar with voice search and an "Ask the AI" hand-off. Widget conversations feed the agent's docs-gap report.

Both are MIT and talk only to your instance with a per-agent key, so a public docs site can use a read-only agent while internal agents stay behind SSO.

floating · sidebar · 8 languages · suggested questions · history · javascript api · passthrough

Try the widget demo ↗

help center with the docsgpt widget, sidebar layout
The DocsGPT chat widget docked as a sidebar on a logistics company's help center: a visitor picked the suggested question Why did my ETA change?, and the answer cites the help articles, with New chat and Chat history in the header and a voice button in the composer.
help center with the docsgpt widget, sidebar layout
The DocsGPT chat widget docked as a sidebar on a logistics company's help center: a visitor picked the suggested question Why did my ETA change?, and the answer cites the help articles, with New chat and Chat history in the header and a voice button in the composer.
# chat widget + search bar, one MIT package
npm install docsgpt

import { DocsGPTWidget } from "docsgpt";

<DocsGPTWidget
  apiKey="…"
  layout="sidebar"
  suggestedQuestions={["How do I rotate a key?"]}
  passthrough={{ plan: user.plan }}
/>

Channels

Four supported channels; everything else through the API.

Bots relay questions from a chat platform to an agent on your instance and post the cited answer back. They need outbound access to that platform, so they are not for air-gapped estates.

Supported chat channels
 What it doesOutbound accessWhere it lives
Telegram botStreams answers into chats, groups and forum topics, with file and voice input and the files your agent producesYes, to the Telegram APIarc53/tg-bot-docsgpt-extenstion · MIT
Discord botAnswers direct messages and channel mentions, keeping the conversation for follow-upsYes, to the Discord APIarc53/discord-docsgpt-extension · MIT
Slack botAnswers mentions and direct messages in threads; several agents per workspaceYes, to the Slack API, Socket Modearc53/slack-bot-docsgpt-extenstion · MIT
Chatwoot extensionAnswers inside a Chatwoot support deskReachability to your ChatwootBuilt into DocsGPT · MIT

Other systems connect through the API or webhooks.

How it runs privately

The API, the MCP server, the widgets and the bots talk only to your instance URL; no Arc53 service sits in the path on Managed, On-premises or Air-gapped deployments. The Telegram, Discord and Slack bots need outbound access to those platforms, so they are for connected estates, not air-gapped ones. An air-gapped instance still serves the API, the MCP server and the widgets inside the network.

Every deployment posture includes the API and widgets at no extra charge; see pricing. Teams comparing this with building a RAG backend in-house get the retrieval, citations and agents behind one endpoint.

Example

A developer-tools company adds the chat widget to its public documentation with a read-only agent over the docs and changelog. The same agent answers the in-app help panel through /v1/chat/completions, its engineers search it from Cursor over MCP, and a webhook files a summary into the ticketing system when a conversation is escalated.

GitHub stars

18,334

on GitHub

Licence

MIT

platform and widgets

Widget package

docsgpt

npm

Named channels

4

Telegram · Discord · Slack · Chatwoot

Frequently asked questions

Is there an OpenAI-compatible API for RAG?

Yes. Each agent answers at /v1/chat/completions, authenticated with the agent's API key. Point the OpenAI SDKs, opencode, Aider or LibreChat at your instance and answers come back grounded in your documents, with streaming, files and images, structured outputs and tool calling. The key decides which agent, prompt, sources and model answer.

Can Claude Code or Cursor use my company's documents?

Yes. DocsGPT runs an MCP server, so Claude Code, Cursor and other MCP clients can search an agent's knowledge with the search_docs tool and answer from what it finds. It uses the agent's API key, so the client sees only that agent's sources.

Can I embed an AI chat widget in my documentation?

Yes. The chat widget is an open-source React or plain-HTML component published on npm as docsgpt, themable to your site. It opens as a floating bubble or a docked sidebar, shows its interface in your visitor's language, offers suggested questions, keeps conversation history in the browser and takes file attachments and voice input. The same package exports a search bar with voice search and an "Ask the AI" hand-off to the chat.

Can the widget know who the user is?

It knows what your page tells it. Passthrough values, such as a user id, a plan or the page being read, go with every question: the agent's prompt can use them and they show on each turn in the agent's Logs. They are context your page sends, not authentication, so use them to tailor answers, and keep anything that needs a sign-in behind SSO.

How do I automate DocsGPT from scripts or CI?

With personal access tokens. A token is scoped to what it may do, can be limited to specific resources and expires on a date you set. The docsgpt-cli uses one to upload sources, apply agents defined in YAML and run benchmarks from a pipeline.

Which chat channels are supported?

Four: Telegram, Discord and Slack bots, each an open-source project of its own, and the Chatwoot support-desk extension, which ships with DocsGPT. Other systems connect through the API or webhooks.

See DocsGPT on your documents

A 30-minute demo of the API, MCP server and widgets on your documents, or self-host and call the endpoint today.