npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-ragchat

v1.0.0

Published

MCP server that adds RAG-powered AI chat to any website. One command from Claude Code.

Readme


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.

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 |

Embeddings (vector search)

| 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