1. Conduid
  2. RAG
  3. Rag Node
MCP server · RAG

Rag Node

Simple MCP RAG server using @modelcontextprotocol/sdk

37Low

Scored 6 months ago · breakdown

About Rag Node

Rag Node is an MCP server in the RAG category: simple MCP RAG server using @modelcontextprotocol/sdk.

Install

Claude Code
claude mcp add rag-node -- npx -y @laskarks/mcp-rag-node
npx
npx -y @laskarks/mcp-rag-node

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Tools (2)

save_to_ragChunk text, create embeddings, and save to Pinecone.

Parameters not published.

search_document_on_ragSearch documents by keyword using semantic similarity.

Parameters not published.

Ask AI

✦

Ask AI about Rag Node

Powered by Claude · Grounded in docs

I know everything about Rag Node. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

RAG MCP Server

MCP (Model Context Protocol) server for RAG (Retrieval-Augmented Generation) using Pinecone, OpenAI-compatible embedding APIs, and the official MCP SDK. Save documents and search by semantic similarity via MCP tools.

Add to MCP clients

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "rag": {
      "command": "npx",
      "args": ["-y", "@laskarks/mcp-rag-node"],
      "env": {
        "APIKEY": "sk-...",
        "EMBEDDING_MODEL": "text-embedding-3-small",
        "RAG_CHUNK_MAX_TOKENS": 1536,
        "PINECONE_API_KEY": "...",
        "PINECONE_INDEX": "rag-index",
        "PROVIDER": "openai | openrouter"
      }
    }
  }
}

Cursor (.cursor/mcp.json or MCP settings):

{
  "mcpServers": {
    "rag": {
      "command": "npx",
      "args": ["-y", "@laskarks/mcp-rag-node"],
      "env": {
        "APIKEY": "sk-...",
        "EMBEDDING_MODEL": "text-embedding-3-small",
        "RAG_CHUNK_MAX_TOKENS": 1536,
        "PINECONE_API_KEY": "...",
        "PINECONE_INDEX": "rag-index",
        "PROVIDER": "openai | openrouter"
      }
    }
  }
}

Tools

Tool Description
save_to_rag Chunk text, create embeddings, and save to Pinecone.
search_document_on_rag Search documents by keyword using semantic similarity.

Installation

npm i @laskarks/mcp-rag-node

Environment Variables

Required

Variable Description Example
APIKEY OpenAI or OpenRouter API key for embeddings sk-...
EMBEDDING_MODEL Embedding model ID text-embedding-3-small, openai/text-embedding-3-small
PINECONE_API_KEY Pinecone API key ...
PINECONE_INDEX Pinecone index name (dimension must match embedding model) rag-index
PROVIDER AI provider (allowed values: openai, openrouter) openai or openrouter

Important: Create your Pinecone index with the same dimension as your embedding model.

Embedding models and vector dimensions

Use the Dimension column when creating your Pinecone index.

Model Dimension Provider
text-embedding-3-small 1536 OpenAI, OpenRouter
text-embedding-3-large 3072 OpenAI, OpenRouter
text-embedding-ada-002 1536 OpenAI, OpenRouter
text-embedding-3-small (with dimensions param) 512–1536 OpenAI
voyage-3 1024 Voyage (via OpenRouter)
nomic-embed-text-v1.5 768 Nomic (via OpenRouter)
mistral-embed 1024 Mistral (via OpenRouter)
cohere/embed-english-v3.0 1024 Cohere (via OpenRouter)

For OpenRouter, use the model ID format, e.g. openai/text-embedding-3-small or voyage/voyage-3.

Optional

Variable Description Default
RAG_CHUNK_MAX_TOKENS Max tokens per chunk before embedding 1536
RAG_CHUNK_OVERLAP Overlap tokens between chunks 50

Usage

Run the server

npm run build
npm start

Or with env file:

# .env
APIKEY=sk-...
EMBEDDING_MODEL=text-embedding-3-small
PINECONE_API_KEY=...
PINECONE_INDEX=rag-index
PROVIDER=openai
npm start

Development

# Install dependencies
npm install

# Build
npm run build

# Run server (from compiled JS)
npm start

# Run server (dev, from TypeScript)
npm run dev

# Run sample client
npm run client

Project structure

src/
├── index.ts    # MCP server entry, tools registration
├── ai.ts       # AI controller (chunking, embeddings, Pinecone)
├── env.ts      # Environment loading
└── client.ts   # Example MCP client for testing
dist/           # Compiled output (after npm run build)

Publish to npm

Before publishing:

  1. Add files to package.json to include only dist/ and docs:
 "files": ["dist", "README.md"]
  1. Ensure npm run build succeeds and dist/ is committed or built on publish.
  2. Add bin entry for npx rag-mcp-nodejs (optional):
 "bin": { "rag-mcp-nodejs": "dist/index.js" }

Note: MCP servers are usually run via node dist/index.js; a bin is optional. 4. Set a unique package name (npm may require scoped name, e.g. @yourname/rag-mcp-nodejs). 5. Add repository, homepage, and engines.node in package.json (optional but recommended).

Requirements

  • Node.js >= 18
  • Pinecone account
  • OpenAI or OpenRouter API key

License

ISC

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Rag Node

How do I install Rag Node?

Run claude mcp add rag-node -- npx -y @laskarks/mcp-rag-node, then add the server to your MCP client's configuration.

Is Rag Node safe to use with an AI agent?

Its trust score is 37 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Rag Node still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.