Skip to main content
Glama

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 build

2. 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

ragchat_setup

Seed a knowledge base from markdown content. Each ## section becomes a searchable document with vector embeddings.

ragchat_test

Send a test message to verify RAG retrieval and LLM response quality.

ragchat_serve

Start a local HTTP chat server with CORS and input sanitization.

ragchat_widget

Generate a self-contained <script> tag -- a floating chat bubble, no dependencies.

ragchat_status

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     |
                    +----------+-----------+
                               |
                            Reply

Everything runs locally. No cloud infrastructure. Bring your own API key.

Supported Providers

LLM (chat completions)

Provider

Env Var

Default Model

OpenAI

OPENAI_API_KEY

gpt-4o-mini

Anthropic

ANTHROPIC_API_KEY

claude-sonnet-4-5-20250929

Google Gemini

GEMINI_API_KEY

gemini-2.0-flash

Provider

Env Var

Default Model

OpenAI

OPENAI_API_KEY

text-embedding-3-small

Google Gemini

GEMINI_API_KEY

text-embedding-004

AWS Bedrock

AWS_REGION + IAM

amazon.titan-embed-text-v2:0

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 vectors
  • Vector 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.

Star History

Star History Chart


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 tools
ragchat_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
domainYesDomain to serve
portNoPort to listen on (default: 3456)

TDQS

A3.7/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name (e.g. 'mysite.com' or 'acme')
contentYesMarkdown content with ## headers. Each section becomes a searchable document. Minimum 50 chars per section.
systemPromptYesSystem prompt for the chat assistant (e.g. 'You are the Acme support agent. Answer questions about Acme products.')

TDQS

A3.7/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
domainYesDomain to test
messageYesTest message (e.g. 'What is your product?')

TDQS

A3.8/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name (used in widget title)
chatUrlNoChat server URL (default: http://localhost:3456). Change this when deploying to production.
titleNoWidget header title (default: 'Chat with us')
colorNoAccent color hex (default: '#22c55e')

TDQS

A4/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

  1. 5 tool updates
    • Addedragchat_serve
    • Addedragchat_setup
    • Addedragchat_status
    • Addedragchat_test
    • Addedragchat_widget

TDQS

A4/5.0

Scored across 5 tools

Disambiguation5/5

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.

Naming Consistency4/5

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.

Tool Count5/5

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.

Completeness4/5

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

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    A 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.
    224
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A 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.
    -
  • -
    license
    Not graded
    quality
    C
    maintenance
    Self-hosted MCP server that provides web scraping and crawling tools, integrating seamlessly with AI frameworks like OpenAI Agents SDK, Cursor, and Claude Code.
    4
    -