Skip to content

Latest commit

 

History

History
101 lines (74 loc) · 3.26 KB

File metadata and controls

101 lines (74 loc) · 3.26 KB

EPLAN P8 Documentation RAG — Cloudflare MCP Server

Remote MCP server that lets Claude search the EPLAN Electric P8 documentation (API Reference, User Guide, hidden actions) through semantic vector search.

Deployed on Cloudflare Workers with Vectorize + Workers AI.

Counterpart of cloudflare-rag-eecpro/, which serves the EEC Pro docs.

Architecture

Claude Code  -->  MCP (Streamable HTTP)  -->  Cloudflare Worker (eplan-rag-mcp)
                                                   |
                                              Workers AI (bge-base-en-v1.5)
                                                   |
                                              Vectorize (eplan-knowledge-base)
                                              57,492 vectors / 768 dims / cosine

Install the MCP in Claude Code

Via mcp-remote

claude mcp add eplan-rag -- cmd /c npx mcp-remote https://rag2026.covaga.xyz/mcp

Verify

claude mcp list

eplan-rag should appear in the list. Then, inside Claude Code:

/mcp

It should show eplan-rag connected with 2 tools available.

Available Tools

Tool Description
eplan_search Semantic search in EPLAN documentation. Supports filtering by category (API Reference, User Guide, Api).
eplan_stats Statistics for the vector index (number of vectors, dimensions, metric).

REST Endpoints

In addition to the MCP, the worker exposes a direct REST API. Base URL: https://rag2026.covaga.xyz.

Method Endpoint Description
GET /health Health check
POST /search Semantic search (body: {"query": "...", "topK": 5})
GET /stats Index statistics
POST /add-vectors Insert vectors (requires Authorization: Bearer <WORKER_API_KEY>)

Usage Examples

1. Search using cURL (Windows CMD)

curl -X POST https://rag2026.covaga.xyz/search -H "Content-Type: application/json" -d "{\"query\": \"export project\", \"topK\": 3}"

2. Search using Python

import requests

url = "https://rag2026.covaga.xyz/search"
payload = {"query": "export project", "topK": 3}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)
print(response.json())

Structure

cloudflare-rag-eplan-p8/
├── migration/
│   ├── scripts/
│   │   ├── 01_verify_and_export.py    # Verify ChromaDB and export to NDJSON batches
│   │   └── 02_deploy_to_cloudflare.sh # Create index + upload vectors + deploy worker
│   └── manifest.json                  # (generated by step 01)
├── worker/
│   ├── src/
│   │   └── index.ts                   # Main worker (MCP + REST)
│   ├── wrangler.jsonc                 # Cloudflare configuration
│   ├── package.json
│   └── tsconfig.json
└── README.md                          # This file

Source Data

The vectors served by this worker are produced from the local ChromaDB at ../eplan-p8-mcp-server/chroma_db_sota/ by migration/scripts/01_verify_and_export.py, then uploaded to Cloudflare Vectorize by migration/scripts/02_deploy_to_cloudflare.sh.