Skip to main content
Glama
uatari

FDS Estimator MCP

by uatari
README.md
# FDS Estimator MCP

Cloudflare-hosted MCP server for stateful fence quoting.

## What it does

- Stores quote state per `quote_id`
- Validates submitted answers against family specs
- Computes BOMs from the provided pure resolver in `mcp/engine.js`
- Exposes 4 MCP tools:
  - `start_quote`
  - `submit_answers`
  - `quote_status`
  - `finalize`

## Runtime

- Cloudflare Workers
- Cloudflare Agents MCP transport
- Durable Objects with SQLite-backed storage

## Local development

```bash
npm install
npm run typecheck
npm test
npx wrangler dev
```

The MCP endpoint is served at `/mcp`.

## Deploy

```bash
npx wrangler login
npx wrangler deploy
```

After deploy, the remote MCP endpoint is:

```text
https://fds-estimator-mcp.<your-subdomain>.workers.dev/mcp
```

## Files

- `src/index.ts`: Worker entrypoint and MCP server bootstrap
- `src/quote-do.ts`: per-quote Durable Object state
- `src/quote-core.ts`: portable quote state logic
- `src/validate.ts`: spec-driven answer validation
- `src/snapshot.ts`: response snapshot shaping
- `mcp/`: engine, family specs, parity tests, and build brief