CastLog MCP
by anthonys1760
README.md
# CastLog MCP
An MCP server for a fishing log that never gives away your spots.
Version 0.1.0 is **demo mode only**. It serves four read-only tools over synthetic catches and recorded weather fixtures. There is no account, no production database, and no outbound call. Account mode (OAuth, Supabase, your own journal) is **Planned** and is not in this build.
The scoring formula is the same code the CastLog app uses after PR #151 (`799442b`). It is intentionally open source. See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
```mermaid
flowchart LR
client["MCP client"]
draw["Drawbridge, optional, later"]
stdio["stdio"]
http["stateless demo endpoint"]
tools["4 read-only tools"]
core["bite-core"]
guard["leak guard"]
data["synthetic data and recorded weather"]
client --> stdio --> tools
client --> http --> tools
draw -. "in front, not in v1" .-> stdio
tools --> core --> guard --> data
```
Landing page: [https://anthonys1760.github.io/CastLog-mcp/](https://anthonys1760.github.io/CastLog-mcp/). Repository: [https://github.com/anthonys1760/CastLog-mcp](https://github.com/anthonys1760/CastLog-mcp).
## Demo quickstart
Requires Node.js 22. The package is private. Clone and build:
```bash
git clone https://github.com/anthonys1760/CastLog-mcp.git && cd CastLog-mcp && npm ci && npm run build
```
Without `--demo` the process prints that account mode is Planned and exits nonzero.
### Local stdio
Cursor `~/.cursor/mcp.json`:
```json
{
"mcpServers": {
"castlog": {
"command": "node",
"args": ["/absolute/path/to/CastLog-mcp/dist/cli.js", "--demo"]
}
}
}
```
Claude Code `.mcp.json`:
```json
{
"mcpServers": {
"castlog": {
"command": "node",
"args": ["/absolute/path/to/CastLog-mcp/dist/cli.js", "--demo"]
}
}
}
```
```bash
claude mcp add castlog -- node /absolute/path/to/CastLog-mcp/dist/cli.js --demo
```
### Hosted demo
Streamable HTTP: https://castlog-mcp.vercel.app/api/mcp
Claude Code, using the URL on the line above:
```bash
claude mcp add --transport http castlog-demo <hosted demo URL>
```
Cursor `~/.cursor/mcp.json`:
```json
{
"mcpServers": {
"castlog-demo": {
"url": "<hosted demo URL>"
}
}
}
```
## Demo HTTP endpoint
`api/mcp.ts` is a stateless Vercel Hobby function on the Node.js 22 runtime. It does not use a paid add-on. CI does not deploy it.
No environment variable is required. When `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN` are both unset, the per-IP limit is in memory (20 requests per minute, or `DEMO_RATE_LIMIT_PER_MIN`).
`Host` and `Origin` must match localhost or `*.vercel.app`, plus any comma-separated hostnames in `ALLOWED_HOSTS`. `GET /` and `GET /health` return `{ "ok": true, "name": "castlog-mcp", "mode": "demo", "version": "0.1.0" }`. MCP traffic uses the `/api/mcp` path from the hosted demo line above.
## Tools
All four are read-only (`readOnlyHint: true`, `destructiveHint: false`, `openWorldHint: false`). `bite_score` and `conditions` are also `idempotentHint: true`.
| Tool | What it returns |
| -------------------------- | ------------------------------------------------------------------------------- |
| `search_catches` | Species, date, size, lure category, conditions bucket, `spot_alias`, water type |
| `bite_score` | Score 0–100, label, pressure trend, conditions line |
| `conditions` | Temperature, cardinal wind, pressure, moon. No location field |
| `similar_weather_patterns` | Aggregates for the current weather bucket. Small samples suppress breakdowns |
A recorded call against `spot-7f3a` returns **67 / Good bite / Falling -3 / 6h**. The transcript is in [docs/demo-transcript.md](docs/demo-transcript.md). The static page in `site/` uses that same output.
## Demo mode and Planned account mode
| | Demo mode (this release) | Account mode (Planned) |
| --------- | ---------------------------------------------------- | ------------------------------------- |
| Data | Seeded synthetic catches and fixture weather | The signed-in user's journal |
| Transport | stdio via `--demo`, or Streamable HTTP at `/api/mcp` | OAuth 2.1 on a Supabase Edge Function |
| Auth | None. Starting without `--demo` exits | Not built. No auth code paths |
Water bodies are aliases such as `spot-7f3a`. Tool output does not include coordinates, real water names, notes, or photos. A leak guard fails closed with JSON-RPC error `-32000` and the message `redaction_guard`.
## Development
```bash
npm test
npm run typecheck
npm run lint
npm run check:tools
npm run check:secrets
```
`tools.lock.json` is the sha256 of the canonical tool definitions. Changing a tool schema is a version bump and a CHANGELOG entry.
## Status
The package stays private. Making the repository public, selecting GitHub Pages source "GitHub Actions", and creating the Vercel Hobby project are still manual. This repository does not tag or deploy on its own.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues