MCP use case: RAG knowledge base

Build a RAG knowledge base with the Ethora MCP server

Crawl a website, upload documents, tag and reindex them from Claude, ChatGPT or Cursor, then create an agent that answers from those sources. Sources belong to an app, so each tenant keeps its own.

Crawl sites, upload PDF and text Tags narrow retrieval Async jobs, wait variants
Ethora MCP server

In 30 seconds

A RAG knowledge base on the Ethora MCP server is the set of sources indexed for one app: crawled website pages and uploaded documents, each with an id and retrieval tags. The 14 sources tools crawl, upload, list, tag, reindex and delete them; an agent created with isRAG: true retrieves from them when it answers. Sources are scoped to an app, so two apps never share a document unless you ingest it twice.

Use this if

  • you want an agent that answers from your own site and documents
  • your material changes and you need to reindex in place
  • each tenant needs its own sources, tags and agents

Best for: support, intake and internal-help agents grounded in a website and a few PDFs.

Step by step

1

Select the app and switch auth for the sources tools

The sources tools authenticate in app-token or B2B mode with an explicit appId. Store the token with ethora-app-select { appId, appToken }, which defaults the session to app-token mode, or ethora-configure { appToken } then ethora-auth-use-app. Switch back with ethora-auth-use-user before the agent tools, which reject app tokens.

2

Crawl the website

ethora-sources-site-crawl-v2 { url, followLink } ingests a URL and returns once the job is accepted; followLink: true follows in-domain links. ethora-sources-site-crawl-v2-wait { url, followLink, timeoutMs } blocks until crawl and embedding finish; on a timeout the job may still complete, so check ethora-sources-site-list-v2 before crawling again.

3

Upload documents

ethora-sources-docs-upload-v2 { files } takes one to five files as base64, PDF or text among others, 50MB each; an unsupported type returns 422. ethora-sources-docs-list-v2 shows each document’s id, name and tags. The legacy ethora-sources-docs-upload does the same in user auth for an app you own.

4

Tag sources so each agent retrieves the right slice

ethora-sources-site-tags-update-v2 { sourceId, tags } and ethora-sources-docs-tags-update-v2 { docId, tags } replace the tag set; not additive, and [] clears it. An agent created with ragTags retrieves only from sources carrying those tags, so one app can give each agent its own slice.

5

Create the agent that uses the sources

Back in user mode, ethora-agents-create-v2 { name, prompt, isRAG: true, ragTags } creates the persona; tune it later with ethora-agents-update-v2. Invite it to a room and ask a question with ethora-chats-message-v2 { waitForReplySec } to confirm it answers from the right material.

You: Crawl harbor-physio.example with linked pages, tag it public, make Front Desk answer only from public sources.

Assistant: ethora-sources-site-crawl-v2-wait { url, followLink: true, timeoutMs: 600000 } ... done in 84s.
ethora-sources-site-tags-update-v2 { sourceId, tags: ["public"] } ... ok.
ethora-agents-create-v2 { name: "Front Desk", isRAG: true, ragTags: ["public"] } ... created.
6

Keep it fresh and prune

ethora-sources-site-reindex-v2 { urlId } re-crawls and re-embeds a source in place (ethora-sources-site-reindex-v2-wait blocks). Remove sources with ethora-sources-site-delete-url-v2-batch { ids } (1 to 100 ids) or ethora-sources-docs-delete-v2 { docId }; both delete the embeddings too and are irreversible.

The tools this uses

Names and descriptions come from the server’s own tool list. Read-only tools are safe to auto-approve; destructive ones make your client ask first. Full reference.

ToolNameWhat it doesAccess
Crawl Website Sourceethora-sources-site-crawl-v2Crawl a website URL and ingest its content into an app’s RAG sources (app-token / B2B variant of ethora-sources-site-crawl).write
Crawl Website Source and Waitethora-sources-site-crawl-v2-waitCrawl a website URL and block until the server finishes - a single-call, long-timeout variant of ethora-sources-site-crawl-v2 (same crawl + embed effect).write
Reindex Website Sourceethora-sources-site-reindex-v2Re-crawl and re-embed a previously crawled URL by its urlId, refreshing its RAG content (app-token / B2B variant of ethora-sources-site-reindex).write
List Website Sourcesethora-sources-site-list-v2List an app’s crawled website sources, including each source’s id, URL, and current RAG tags.read-only
Update Website Source Tagsethora-sources-site-tags-update-v2Set the RAG retrieval tags on a crawled website source - replaces the source’s tag set with the provided tags array (not additive; pass [] to clear all).write
Delete Website Source URLsethora-sources-site-delete-url-v2-batchBulk-remove crawled website sources (1-100) from an app in one call, matched by their source record ids.destructive
Upload Knowledge Documentethora-sources-docs-upload-v2Upload documents (1-5; PDF, text, etc.) into an app’s RAG sources (app-token / B2B variant of ethora-sources-docs-upload).write
List Knowledge Documentsethora-sources-docs-list-v2List an app’s ingested documents, including each document’s id, name, and current RAG tags.read-only
Update Knowledge Document Tagsethora-sources-docs-tags-update-v2Set the RAG retrieval tags on an ingested document - replaces the document’s tag set with the provided tags array (not additive; pass [] to clear all).write
Delete Knowledge Documentethora-sources-docs-delete-v2Remove a previously ingested document from an app’s RAG sources by docId (app-token / B2B variant of ethora-sources-docs-delete).destructive
Create Agentethora-agents-create-v2Create a reusable AI agent (POST /v2/apps/:appId/agents).write
Update Agentethora-agents-update-v2Update a saved AI agent (PUT /v2/agents/:agentId).write

A physiotherapy practice grounds its agent

“For my Harbor Physio app, crawl harbor-physio.example including linked pages and upload the attached cancellation policy PDF. Tag the website public and the PDF policy. Then create an agent called Front Desk that answers only from public and policy sources, put it in Reception and ask it what the cancellation window is.”
  1. ethora-app-select { appId: "66f1a0b2c3d4e5f60718293a", appToken: "********" }
  2. ethora-sources-site-crawl-v2-wait { url: "https://harbor-physio.example", followLink: true, timeoutMs: 600000 }
  3. ethora-sources-docs-upload-v2 { files: [ cancellation-policy.pdf as base64 ] }
  4. ethora-sources-site-list-v2 { appId: "66f1a0b2c3d4e5f60718293a" }
  5. ethora-sources-site-tags-update-v2 { sourceId: "src_9c1e", tags: ["public"] }
  6. ethora-sources-docs-tags-update-v2 { docId: "doc_41ab", tags: ["policy"] }
  7. ethora-auth-use-user {}
  8. ethora-agents-create-v2 { name: "Front Desk", prompt: "Answer patient questions using only the practice website and policy documents.", isRAG: true, ragTags: ["public", "policy"] }
  9. ethora-agent-invite-to-chat { agentIdOrAddress: "66f1a1c4d5e6f7a8b9c0d1e2", chatJid: "66f1a0b2c3d4e5f60718293a_reception" }
  10. ethora-chats-message-v2 { text: "What is the cancellation window?", roomJid: "66f1a0b2c3d4e5f60718293a_reception", waitForReplySec: 45 }

An app whose sources are the practice website and a policy PDF, tagged, with an agent in Reception answering from them only.

Good to know

FAQ

What is a RAG MCP server?

An MCP server whose tools build and maintain the retrieval index an AI agent answers from. On Ethora that index is a set of crawled pages and uploaded documents attached to an app; the assistant crawls, uploads, tags and reindexes them through tool calls, and agents created with isRAG: true retrieve from them.

Which file formats can I upload to the knowledge base?

The upload tools accept one to five files per call as base64, PDF and text among the supported document types, up to 50MB each. An unsupported type returns 422 and an oversized file 413. Content becomes queryable once indexing finishes, after the call returns.

How do I update a knowledge base when the website changes?

Call ethora-sources-site-reindex-v2 with the urlId from ethora-sources-site-list-v2. It re-crawls and re-embeds the URL and updates the existing record in place, so tags and ids survive. Use the -wait variant when your automation needs to know the fresh content is live.

Do I need my own vector database for RAG over MCP?

No. Ethora indexes and embeds the sources as part of the app; the tools return job status, source ids and tags, never raw vectors, and deleting a source removes its embeddings with it. On a self-hosted Ethora deployment the same index runs inside your own infrastructure.

Get started

Ground an agent in your content

Create a free account, get your connector URL under Account, AI Assistants, and ask your assistant to crawl your site.

Free tier available Revocable API keys Self-host with the monoserver