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.

Inputs: domain (required), port.

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.

Inputs: domain (required), content (required), systemPrompt (required).

ragchat_statusA

List all configured domains with document counts and config status. Shows what's been set up and what's ready to serve.

Inputs: no named parameters.

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.

Inputs: domain (required), message (required).

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.

Inputs: domain (required), chatUrl, title, color.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    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 recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      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.
      528 npm
      2
      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
      -