Campervan-mcp
Uses Cloudflare D1 for relational database of component specs and Cloudflare Vectorize for semantic search over van build manuals and documentation.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Campervan-mcpCalculate wire gauge for 12V 30A circuit 15 feet long"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Campervan-mcp
A production-grade Model Context Protocol (MCP) server for campervan/DIY-van-build technical and electrical planning, built with TypeScript and deployed on Cloudflare Workers.
It gives AI assistants (Claude, etc.) tool access to deterministic electrical calculations, payload/weight capacity checks, a component specs database (Cloudflare D1), and semantic search over van build manuals and documentation (Cloudflare Vectorize).
Features
Deterministic calculations — All electrical, wire sizing, and weight math is implemented in pure TypeScript (
src/utils/formulas.ts), never left to LLM guesswork.Component spec lookup — Query a D1-backed relational database of electrical/mechanical component specs (busbars, inverters, heaters, etc.).
Semantic manual search — Search vectorized PDF/HTML documentation (wiring diagrams, body builder guides, error codes) via Cloudflare Vectorize.
Stateless HTTP transport — Uses the MCP Streamable HTTP transport, well suited to Cloudflare Workers' request/response model.
Related MCP server: CalcsLive MCP Server
Tools
Tool | Description |
| Calculates recommended AWG wire size, conductor resistance, voltage drop percentage, and fuse sizing for a DC circuit based on electrical load, wire run distance, and system voltage. |
| Validates a solar panel string configuration (series/parallel) against MPPT charge controller specifications, checking cold-weather open-circuit voltage (Voc) safety and current limits. |
| Calculates total component weight against vehicle GVWR for Sprinter, Transit, and Promaster vans. Returns remaining payload capacity and estimated axle load distribution. |
| Lists all supported van models with their GVWR, curb weight, maximum payload, and axle ratings. |
| Queries the D1 database for component specifications including terminal stud sizes, max continuous amp ratings, dimensions, and idle power draw. |
| Retrieves exact specifications for a component by its model number from the D1 database. |
| Searches the vector database of campervan documentation using semantic similarity (wiring diagrams, error codes, body builder guides, equipment manuals). |
Architecture
src/
├── index.ts # Worker entrypoint — wires up McpServer + HTTP transport
├── tools/
│ ├── electrical.ts # Wire gauge & solar array validation tools
│ ├── payload.ts # Van payload/weight capacity tools
│ ├── specs.ts # D1-backed component spec lookup tools
│ └── manuals.ts # Vectorize-backed semantic manual search tool
└── utils/
├── formulas.ts # Pure TypeScript electrical/weight calculation helpers
└── db.ts # D1 database helpers
d1/
├── migrations/ # Sequential, non-destructive D1 schema migrations
└── seeds/ # Seed data for component_specs table
scripts/
└── ingest-docs.ts # Ingests PDF/HTML docs into Vectorize for RAG search
tests/
├── unit/ # Unit tests for formulas and tools
└── e2e/ # End-to-end tests against the MCP HTTP endpointsThe server binds to two Cloudflare resources (see wrangler.toml):
D1 (
DB) — relational database of component specs.Vectorize (
VECTOR_INDEX) — vector index of chunked manual/documentation text, with an optional Workers AI (AI) binding for embeddings.
Prerequisites
Node.js >= 20
A Cloudflare account with Workers, D1, and Vectorize enabled (for deployment)
Wrangler CLI (installed as a dev dependency)
Getting Started
Install dependencies:
pnpm installRun the worker locally:
pnpm devApply D1 migrations locally:
npx wrangler d1 migrations apply DB --localType-check the project:
pnpm tsc --noEmitTesting
pnpm test # run all tests (unit + e2e)
pnpm test:unit # unit tests only
pnpm test:e2e # end-to-end tests only
pnpm test:coverage # unit tests with coverageServer Smoke Test
scripts/smoke-test-server.sh spins up the worker locally with wrangler dev,
applies local D1 migrations, and exercises the live MCP JSON-RPC endpoints
(initialize, tools/list, and several tools/call requests) to verify the
server actually runs end-to-end. Run it locally:
./scripts/smoke-test-server.shThis same script runs in the MCP Server Smoke Test
GitHub Actions workflow, which can be triggered manually (workflow_dispatch)
or automatically on pull requests.
Linting
pnpm lintUses ESLint 9 flat config (eslint.config.mjs) with typescript-eslint recommended rules.
Deployment
Deployment uses two GitHub Actions pipelines with CLOUDFLARE_ACCOUNT_ID and
CLOUDFLARE_API_TOKEN configured as repository secrets:
Setup Cloudflare Infrastructure(workflow_dispatch, manual) — a one-time bootstrap pipeline that creates the D1 database, the Vectorize index, and thecategory/doc_typemetadata indexes on that Vectorize index (required for metadata filtering) if they don't already exist. Run it once from the Actions tab, then copy the printeddatabase_idintowrangler.toml, commit, and push tomain.Deploy to Production(runs automatically on every push tomain) — applies any new D1 migrations ind1/migrations/and deploys the Worker.
To deploy manually instead, update wrangler.toml with your own D1
database_id, then run:
pnpm deployIngesting Documentation
Automated PDF Manual Ingestion (GitOps)
PDF manuals placed in docs/manuals/*.pdf are automatically parsed, chunked, embedded, and
synced to the van_manuals_index Vectorize index by the .github/workflows/ingest-manuals.yml
workflow whenever they are added, modified, or deleted on main. PDF parsing and chunking happen
in the GitHub Actions runner (not the Cloudflare Worker) to avoid edge CPU limits.
npx wrangler vectorize create van_manuals_index --dimensions=768 --metric=cosine
# Ingest / update manuals
npx tsx scripts/ingest-manuals.ts --added-modified "docs/manuals/velit-heater-manual.pdf"
# Remove manuals that were deleted
npx tsx scripts/ingest-manuals.ts --deleted "docs/manuals/old-manual.pdf"Each chunk is embedded via the Cloudflare Workers AI REST API (@cf/baai/bge-base-en-v1.5,
768 dimensions) and upserted into Vectorize with a deterministic vector ID
({sanitized_filename}#chunk_{index}), so re-ingesting an updated manual overwrites its
previous chunks. Requires CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN environment
variables.
Metadata Schema
Every vector upserted by ingest-manuals.ts or sync-r2-manuals.ts carries the following
metadata, so results can be filtered by document type/category in addition to full-text search:
{
"filename": "travel/vancouver_island.pdf",
"manual_title": "Vancouver Island",
"title": "Vancouver Island",
"doc_type": "road_trip_guide",
"category": "travel",
"chunk_index": 0,
"total_chunks": 12,
"text": "Raw extracted text chunk..."
}doc_type/category are inferred from the file's folder prefix:
Path prefix |
|
|
|
|
|
|
|
|
|
|
|
Filtering on category/doc_type requires Vectorize metadata indexes, which the
setup-infrastructure.yml workflow creates automatically:
npx wrangler vectorize create-metadata-index van_manuals_index --property-name=category --type=string
npx wrangler vectorize create-metadata-index van_manuals_index --property-name=doc_type --type=stringManual R2 Bucket Sync (Large Manuals)
Large PDF manuals (too big to comfortably commit to the git repo) can instead be uploaded to
the campervan-mcp Cloudflare R2 bucket, including nested subfolders (e.g.
heaters/velit-2026.pdf or electrical/victron/multiplus.pdf). Run the
Manual Sync R2 Manuals to Vectorize workflow (.github/workflows/sync-r2.yml) from the
GitHub Actions UI (workflow_dispatch) to recursively list the bucket, diff it against a
manifest persisted in R2, and stream/chunk/embed/upsert only the added or modified PDFs while
deleting vectors for any PDFs removed from the bucket.
# Sync R2 bucket manuals (uses R2_ACCESS_KEY_ID / R2_SECRET_ACCESS_KEY for the R2
# S3-compatible access, and CLOUDFLARE_ACCOUNT_ID / CLOUDFLARE_API_TOKEN for the
# Workers AI / Vectorize REST APIs)
npx tsx scripts/sync-r2-manuals.ts
# Preview the diff without embedding/upserting anything
npx tsx scripts/sync-r2-manuals.ts --dry-run
# Force re-indexing of every PDF in the bucket, ignoring the manifest cache
npx tsx scripts/sync-r2-manuals.ts --force-reindexVector IDs are derived from the full R2 object key (subfolder path included), e.g.
electrical_victron_multiplus_pdf#chunk_0, so nested manuals with the same filename in
different folders don't collide.
Legacy Ad-Hoc Ingestion Script
Older HTML/PDF sources can still be ingested individually using the legacy script:
npx tsx scripts/ingest-docs.ts --source ./docs/transit-body-builder.pdf --name ford_transit_body_builderRequires CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN environment variables.
Contributing
See AGENTS.md for repository conventions and rules that apply to automated/AI contributors (deterministic calculations, migration policy, schema validation with Zod, and testing thresholds), which are also good practices for human contributors.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceProvides AI assistants with access to 30+ validated financial independence calculation functions, eliminating hallucinations by ensuring accurate calculations for retirement planning, CoastFI, investment returns, and other FI metrics.Last updatedMIT
- AlicenseAqualityDmaintenanceEnables AI agents to perform unit-aware engineering calculations with automatic unit conversion, dependency resolution, and access to 500+ units across 75+ categories through the CalcsLive calculation engine.Last updated326MIT
- Flicense-quality-maintenanceEnables AI assistants to read, write, search, and navigate Obsidian vault notes with support for CRUD operations, full-text search, graph navigation, daily notes, and frontmatter management.Last updated3,424
- AlicenseAqualityBmaintenanceProvides AI agents with instant, structured access to electronic component datasheets, pinouts, and electrical specifications without requiring PDF uploads. It enables seamless part searching, design validation, and side-by-side component comparisons across major hardware providers.Last updated12848MIT
Related MCP Connectors
500+ deterministic tools for AI agents: math, conversion, validation, hashing, encoding, date/time.
AI-callable calculators and engineering models with real formulas. No hallucinated math.
60+ units, live FX, timezones, and date arithmetic for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sekka1/Campervan-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server