Model Context Protocol server for progressive discovery and validation of VA Lighthouse APIs. Built on Cloudflare Workers with TypeScript and Zod validation.
13 MCP Tools for VA API exploration:
- Discovery (2): List APIs, get metadata
- Exploration (5): Summarize APIs, browse endpoints, search operations, view schemas
- Validation (4): Validate payloads, generate examples, get validation rules
- Utilities (2): Check health, compare versions
Production-Ready
- 314 tests (226 unit, 88 integration) with 94% code coverage
- LRU cache with 1hr TTL for optimal performance
- OpenAPI 3.0 parsing and dereferencing
- Zod-based validation with fix suggestions
- Cloudflare Workers deployment
# Install dependencies
npm install
# Start development server
npm run dev
# Run all tests
npm run test:allServer runs at http://localhost:8788/sse
curl http://localhost:8788/healthTest tools interactively:
npx @modelcontextprotocol/inspector@latest
# Open http://localhost:5173
# Connect to http://localhost:8788/sseAdd to claude_desktop_config.json:
{
"mcpServers": {
"va-lighthouse": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:8788/sse"]
}
}
}For production, use: https://va-lighthouse-mcp.<your-account>.workers.dev/sse
- Tools Reference - Complete documentation for all 13 MCP tools
- Development Guide - Setup, testing, code coverage, debugging
- Deployment Guide - Cloudflare Workers deployment, configuration, monitoring
- Integration Tests - Integration test patterns and harness usage
- Test Harness - Reusable test infrastructure
┌─────────────────────────────────────────┐
│ 13 MCP Tools (4 categories) │
├─────────────────────────────────────────┤
│ • Cache (LRU, 1hr TTL) │
│ • API Client (VA Lighthouse) │
│ • OpenAPI Parser (@scalar) │
│ • Validator (Zod) │
├─────────────────────────────────────────┤
│ Cloudflare Workers Runtime │
└─────────────────────────────────────────┘
src/
├── index.ts # MCP server entry point
├── services/ # Cache, API client, parser, validator
├── tools/ # 13 MCP tools (4 files)
└── utils/ # Error formatting, example generation
test/
├── unit/ # 226 tests (Workers pool, 94% coverage)
└── integration/ # 88 tests (Node.js + HTTP)
docs/
├── TOOLS.md # Complete MCP tools reference
├── DEVELOPMENT.md # Development and testing guide
└── DEPLOYMENT.md # Cloudflare deployment guide
Run All Tests (314 tests)
npm run test:allUnit Tests (226 tests, 94% coverage)
npm run test:unit # Run unit tests
npm run test:coverage # Generate coverage report
npm run test:coverage:open # View coverage HTML reportIntegration Tests (88 tests)
npm run dev # Terminal 1: Start server
npm run test:integration # Terminal 2: Run integration testsCode Coverage
- Overall: 94%
- openapi-parser: 99%
- api-client: 96%
- json-schema-to-zod: 93%
- validator: 85%
See Development Guide for detailed testing information.
Deploy to Cloudflare Workers:
npm run deployYour server will be available at:
https://va-lighthouse-mcp.<your-account>.workers.dev/sse
See Deployment Guide for:
- Account setup and configuration
- Custom domains
- Environment variables and secrets
- Monitoring and observability
- Cost estimation
- Runtime: Cloudflare Workers
- Language: TypeScript 5.9
- MCP: @modelcontextprotocol/sdk 1.19
- Validation: Zod 3.25
- Parser: @scalar/openapi-parser 0.22
- Testing: Vitest 3.2 (314 tests, 94% coverage)
MIT