mcp-ragchat
Utilizes AWS Bedrock to generate vector embeddings for building the server's local searchable knowledge base.
Integrates with Google Gemini models to provide both text embedding generation and AI chat completions.
Processes Markdown content to seed a local vector store, treating header-delimited sections as searchable documents.
Connects to OpenAI's API for generating text embeddings and providing chat completions to power the RAG pipeline.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-ragchatset up AI chat for mybakery.com using the menu and FAQ content"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Tell Claude Code "add AI chat to mysite.com" and it will crawl your content, build a local vector store, spin up a chat server, and hand you an embed snippet. No cloud infra. No database. Just one API key.
Demo
You: "Set up AI chat for mybakery.com using this FAQ and menu content"
Claude: I'll set up RAG-powered chat for mybakery.com.
[1/4] ragchat_setup
Splitting content into sections...
Generating embeddings for 12 documents...
Domain "mybakery.com" configured with 12 documents.
[2/4] ragchat_test
Query: "What are your hours?"
Reply: "We're open Monday-Saturday 7am-6pm, and Sunday 8am-2pm."
RAG Sources: mybakery.com-3 (0.91), mybakery.com-7 (0.84)
Latency: 340ms
[3/4] ragchat_serve
Chat server running at http://localhost:3456
POST /chat ready.
[4/4] ragchat_widget
Generated embed code. Paste this into your HTML:
<script src="http://localhost:3456/widget.js"></script>
You: Done. Live chat on my site in under 60 seconds.Related MCP server: Crawl4AI MCP Server
Quick Start
1. Clone and build
git clone https://github.com/gogabrielordonez/mcp-ragchat
cd mcp-ragchat
npm install && npm run build2. Configure Claude Code (~/.claude/mcp.json)
{
"mcpServers": {
"ragchat": {
"command": "node",
"args": ["/absolute/path/to/mcp-ragchat/dist/mcp-server.js"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}3. Use it
Open Claude Code and say:
"Add AI chat to mysite.com. Here's the content: [paste your markdown]"
Claude handles the rest.
Tools
Tool | What it does |
| Seed a knowledge base from markdown content. Each |
| Send a test message to verify RAG retrieval and LLM response quality. |
| Start a local HTTP chat server with CORS and input sanitization. |
| Generate a self-contained |
| List all configured domains with document counts and config details. |
How It Works
+------------------+
| Your Markdown |
+--------+---------+
|
ragchat_setup
|
+------------v-------------+
| Local Vector Store |
| ~/.mcp-ragchat/domains/ |
| vectors.json |
| config.json |
+------------+-------------+
|
User Question |
| |
+------v------+ +------v------+
| Embedding | | Cosine |
| Provider +->+ Similarity |
+-------------+ +------+------+
|
Top 3 chunks
|
+----------v-----------+
| System Prompt |
| + RAG Context |
| + User Message |
+----------+-----------+
|
+----------v-----------+
| LLM Provider |
+----------+-----------+
|
ReplyEverything runs locally. No cloud infrastructure. Bring your own API key.
Supported Providers
LLM (chat completions)
Provider | Env Var | Default Model |
OpenAI |
|
|
Anthropic |
|
|
Google Gemini |
|
|
Embeddings (vector search)
Provider | Env Var | Default Model |
OpenAI |
|
|
Google Gemini |
|
|
AWS Bedrock |
|
|
Override defaults with LLM_MODEL and EMBEDDING_MODEL environment variables.
Architecture
~/.mcp-ragchat/domains/
mysite.com/
config.json -- system prompt, settings
vectors.json -- documents + embedding vectorsVector store -- Local JSON files with cosine similarity search. Zero external dependencies.
Chat server -- Node.js HTTP server with CORS and input sanitization.
Widget -- Self-contained
<script>tag. No frameworks, no build step.
Contributing
Issues and pull requests are welcome.
Found a bug? Open an issue
Want to add a feature? Fork, branch, PR.
Questions? Start a discussion
Star History
Enterprise
Need multi-tenancy, security guardrails, audit trails, and managed infrastructure? Check out Supersonic -- the enterprise AI platform built on the same RAG pipeline.
MIT License -- Gabriel Ordonez
Available Tools
5 toolsragchat_serveA
Start a local HTTP chat server for a domain. The server runs on localhost and handles POST /chat requests. Use ragchat_widget to get the embed code that connects to this server.
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain to serve | |
| port | No | Port to listen on (default: 3456) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the server runs on localhost and handles POST /chat, but does not mention key behaviors such as port occupation, domain validation, or how to stop the server. It adds some value but lacks depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: two sentences with no filler. The first sentence states the primary purpose, and the second provides a sibling pointer. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description is moderately complete. It specifies the HTTP endpoint and mentions a sibling tool, but omits important details such as whether the server runs synchronously, how to stop it, or what the return value is. For a 2-parameter tool, this is adequate but has gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% (both parameters have descriptions). The description adds minimal extra meaning by tying the domain parameter to 'domain to serve' and port with default 3456, but essentially repeats schema info. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the tool starts a local HTTP chat server for a domain, specifies the endpoint (POST /chat) and host (localhost). It also distinguishes itself from the sibling tool ragchat_widget, which provides the embed code.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by describing what the tool does, but does not explicitly state when to use it versus other sibling tools (e.g., ragchat_setup, ragchat_status, ragchat_test). It only mentions ragchat_widget for obtaining the embed code, providing limited usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ragchat_setupA
Initialize a domain with a knowledge base from markdown content. Each ## section becomes a searchable document with vector embeddings. This is the first step — run this before testing or serving.
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name (e.g. 'mysite.com' or 'acme') | |
| content | Yes | Markdown content with ## headers. Each section becomes a searchable document. Minimum 50 chars per section. | |
| systemPrompt | Yes | System prompt for the chat assistant (e.g. 'You are the Acme support agent. Answer questions about Acme products.') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavior. It mentions vector embedding creation but does not address side effects (e.g., whether re-running destroys previous data), authentication needs, or error scenarios. Significant gaps remain.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with no wasted words. The action verb is front-loaded, and the workflow hint is succinct.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Parameters are fully covered, but there is no output schema, and the description does not explain what the tool returns (e.g., confirmation, embedding IDs) or error conditions. For a tool that creates vector embeddings, more details on return values or success indicators are needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description reinforces the section-document relationship and mentions the 50-char minimum, which the schema already includes. It adds marginal contextual value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool initializes a domain with a knowledge base from markdown content, turning ## sections into searchable documents. It distinguishes itself from sibling tools (ragchat_serve, ragchat_test, etc.) by being the setup step.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'run this before testing or serving', giving clear ordering context. It does not explicitly state when not to use it or name alternatives, but the sequential workflow is implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ragchat_statusA
List all configured domains with document counts and config status. Shows what's been set up and what's ready to serve.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It accurately describes the read-only nature (listing counts and status) without hinting at destructive or side effects, which is appropriate for a simple list tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences front-load the core purpose and output, with no wasted words. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no output schema, no parameters), the description fully explains what is returned: domains, document counts, and config status. No gaps remain.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and full schema coverage, so the description needs no parameter details. The baseline is 4, and no additional information is required.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('List') and resource ('configured domains') and clearly distinguishes itself from siblings like 'ragchat_serve' or 'ragchat_setup' by focusing on status and readiness.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use when you want to see domain setup status, but it does not explicitly state when to use it over alternatives like 'ragchat_test' or provide any exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ragchat_testA
Send a test message to a domain's chat. Uses RAG search + LLM to generate a response, same as production. Good for verifying the knowledge base works.
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain to test | |
| message | Yes | Test message (e.g. 'What is your product?') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
It discloses that the tool uses RAG search + LLM and mirrors production behavior, but omits potential side effects, authentication requirements, or error handling. With no annotations, this is a moderate disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no unnecessary words. The information is front-loaded and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple test tool with no output schema, the description covers the core function and use case. It could mention the response format, but it's reasonably complete given the context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already defines 'domain' and 'message'. The description adds an example message but does not significantly enhance parameter meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the tool sends a test message to a domain's chat using RAG search and LLM, identical to production. It clearly distinguishes from siblings like ragchat_serve or ragchat_setup by focusing on testing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description says 'Good for verifying the knowledge base works,' implying a testing use case, but lacks explicit when-not-to-use or alternatives among siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ragchat_widgetA
Generate an embeddable chat widget. Returns a tag that creates a floating chat bubble on any webpage. Connects to the chat server started with ragchat_serve.
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name (used in widget title) | |
| chatUrl | No | Chat server URL (default: http://localhost:3456). Change this when deploying to production. | |
| title | No | Widget header title (default: 'Chat with us') | |
| color | No | Accent color hex (default: '#22c55e') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses the output type and server connection, but lacks details on side effects (e.g., overwriting existing widgets) or permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with no wasted words; purpose, output, and context are efficiently communicated.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description adequately covers the tool's purpose and output for a simple widget generator, but could mention customization limitations or additional usage notes.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds no extra parameter meaning beyond the schema's descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Generate' and resource 'embeddable chat widget', specifies the output as a '<script>' tag, and distinguishes it from siblings by mentioning connection to 'ragchat_serve'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the prerequisite of starting 'ragchat_serve' first, but does not explicitly state when to use this tool versus alternatives or provide exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
- Added
ragchat_serve - Added
ragchat_setup - Added
ragchat_status - Added
ragchat_test - Added
ragchat_widget
TDQS
Scored across 5 tools
Each tool targets a distinct operation: setup initializes a domain, status checks configuration, test sends a query, serve starts a server, and widget generates embed code. There is no overlap in functionality.
All tools share the consistent prefix 'ragchat_', but the second part mixes verbs (serve, setup, test) and nouns (status, widget). This is mostly predictable, though not strictly verb_noun.
With 5 tools, the server covers the essential lifecycle of a RAG chat system (setup, verify, test, deploy, embed) without unnecessary bloat or missing critical steps.
The tools cover the core workflow: initialize, check status, test, serve, and embed. Minor gaps exist (e.g., no update or delete domain), but the surface is complete for basic usage.
Maintenance
Related MCP Connectors
The CustomGPT.ai MCP server is a fully managed, RAG-powered endpoint that connects large language models with private knowledge bases and external data sources. It provides tools for retrieval-augmented generation queries (send_message), data ingestion (upload_file), and source listing, enabling AI agents to query private documents like PDFs with high accuracy and real-time citations.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceA self-hosted MCP server that crawls, indexes, and searches documentation from any website locally, including private sites requiring authentication. It provides hybrid search capabilities and local embedding generation to maintain privacy while keeping AI assistant knowledge up to date.2241MIT
- FlicenseNot gradedqualityDmaintenanceA locally-hosted MCP server that provides AI assistants with advanced web crawling capabilities, including structured data extraction, deep site crawling, and page screenshots. It enables users to convert single or multiple URLs into clean Markdown content for processing by LLMs without requiring external API keys for basic features.-
- AlicenseNot gradedqualityDmaintenanceA simple MCP server for local documentation with RAG capabilities, enabling AI assistants to access and search local documents.2MIT
- -licenseNot gradedqualityCmaintenanceSelf-hosted MCP server that provides web scraping and crawling tools, integrating seamlessly with AI frameworks like OpenAI Agents SDK, Cursor, and Claude Code.4-