27 Commits

Author SHA1 Message Date
f58be224fe Fix splash page CSS: use correct Starlight attribute selector
Starlight doesn't emit data-page-template="splash" — it uses
data-has-hero on <html>. All splash-scoped selectors were dead code.

Also remove .card-grid a rules that collided with Starlight's
<CardGrid> component (same class name), causing "See how it works"
links to render as bordered boxes instead of inline text.
2026-02-24 11:31:46 -07:00
de95271f53 Fix card link styling on splash page
Override Starlight's scoped card link styles (display:block, border,
padding) so "See how it works" links render as inline teal text
instead of bordered pill boxes.
2026-02-24 11:29:02 -07:00
37b3cd721d Add clickable links and chart showcase to landing page
- Each use-case card now links to its how-to guide
- Chart showcase below cards: tide chart + conditions dashboard
  side by side, with caption linking to visualization guide
- CSS for showcase grid layout and card link styling
2026-02-24 11:23:17 -07:00
7e10496e0a Rewrite landing page: ELI5 intro, no AI buzzwords
- Lead with "One question away" — explains NOAA's station network, the
  API gap, and what mcnoaa-tides does, in plain language
- Progressive disclosure: simple explanation → use cases → technical
  details → install
- Remove all "AI" references across docs (tagline, getting-started)
- Install section leads with generic MCP JSON config, not product-specific
2026-02-24 11:16:25 -07:00
a900581af5 Add splash landing page, conversation-style guides, beach activities
- New splash landing page at / with hero SVG, feature cards, use-case
  scenarios, and quick install section
- Replace Caddyfile redirect with direct index.mdx serving
- Header social icons: git→Gitea source, python→PyPI (was GitHub→PyPI)
- Rewrite fishing-trip, smartpot, and visualization guides as
  conversation-style walkthroughs with tool calls behind tabs
- New beach activities guide: snorkeling, tide pooling, beachcombing,
  kayak/paddleboard timing
- Make all examples LLM-agnostic (MCP server works with any client)
- Add CSS for splash page layout and conversation blockquote styling
2026-02-24 11:11:42 -07:00
ad17d72894 Return HTML charts as EmbeddedResource instead of server-side files
HTML charts were being written to the server filesystem and returning
a path the client couldn't access. Now returns the HTML content
inline as an MCP EmbeddedResource with text/html MIME type, so the
client receives the full interactive chart over the wire.
2026-02-23 19:50:36 -07:00
89cdeb0967 Fix HTML chart output path for nobody container user
Use MCNOAA_CHARTS_DIR env var (defaults to artifacts/charts/ for
local dev) so the container's nobody user can write HTML charts
to /tmp/charts instead of the read-only /app working directory.
2026-02-23 19:46:29 -07:00
c0826e1a36 Set MPLCONFIGDIR for matplotlib in nobody container
The nobody user has no writable home directory, so matplotlib falls
back to creating a temporary cache dir on every import. Setting
MPLCONFIGDIR to /tmp/matplotlib gives it a stable writable path.
2026-02-23 19:45:08 -07:00
5649d0004a Fix double image/ prefix in chart MIME type
FastMCP's Image class prepends "image/" to the format string, so
passing "image/png" produced "image/image/png". Use bare "png".
2026-02-23 19:44:01 -07:00
f6e1fee392 Include viz extras in MCP container image
Adds --extra viz to uv sync so matplotlib and plotly are available
for visualize_tides and visualize_conditions in production.
2026-02-23 19:39:25 -07:00
77ad2a6bd1 Fix MCP endpoint for Claude.ai connector (serve at root path)
FastMCP defaults to /mcp but Claude.ai sends requests to /.
Add MCP_PATH env var to configure the endpoint path, set to /
in docker-compose for the connector subdomain.
2026-02-23 18:25:14 -07:00
baab9abab2 Bump fastmcp 3.0.1 → 3.0.2 2026-02-23 16:04:19 -07:00
10e9bf9185 Update docs for MCP primitives and fix Vite allowedHosts
Document tool annotations, structured logging, sampling summaries,
and the new test_client_capabilities diagnostic tool across getting
started, reference, and architecture pages. Fix Vite 6+ host blocking
when serving behind a reverse proxy.
2026-02-23 15:18:25 -07:00
2443d0687a Add tool annotations, structured logging, sampling summaries, and client diagnostics
- ToolAnnotations (readOnlyHint, openWorldHint) on all 14 tools
- ctx.info/warning/debug logging for data quality, fetch status, assessments
- ctx.sample() summaries in conditions snapshot, deployment briefing, anomaly detection
- New test_client_capabilities diagnostic tool for MCP feature discovery
2026-02-23 15:01:07 -07:00
fb574d26b8 Add MCP progress reporting to all multi-fetch tools
ctx.report_progress() gives clients real-time visibility into
long-running tool calls. Per-fetch counters for parallel gather
calls, stage-based milestones for linear pipelines. No-op when
client doesn't send a progressToken.
2026-02-23 13:28:56 -07:00
9d25f5efe3 Fix docs root showing Caddy default page, fix MCP healthcheck
- Clear /usr/share/caddy/* before copying build output to remove
  the default "Caddy works!" index.html from the base image
- Add root redirect: / -> /getting-started/ (permanent)
- Fix try_files to use {path}/index.html for Starlight directories
- Switch MCP healthcheck to TCP socket (GET /mcp returns 406
  without proper Accept headers)
2026-02-23 05:44:58 -07:00
962ee2e0e0 Bump version to 2026.02.22 for initial PyPI release
Adds Starlight docs site and MCP HTTP transport support.
2026-02-23 03:58:52 -07:00
4a358050f0 Fix MCP Dockerfile: include README.md for hatchling build
hatchling validates readme field during wheel build — the file
must be present in the Docker build context.
2026-02-22 19:17:51 -07:00
a02d660764 Add Starlight docs site and MCP HTTP transport
- Starlight documentation with 12 Diátaxis-organized pages covering
  getting started, how-to guides, reference, and architecture
- Docker Compose with two services: docs (Starlight/Caddy) and
  mcp (FastMCP streamable-http), both behind caddy-docker-proxy
- Env-based transport selection in server.py — stdio default preserved,
  MCP_TRANSPORT=streamable-http activates HTTP mode for Docker
- Ocean/maritime theme with dark mode default
2026-02-22 19:05:12 -07:00
c7320e599b Add SmartPot tidal intelligence tools
4 new tools (tidal_phase, deployment_briefing, catch_tidal_context,
water_level_anomaly) and 2 prompts (smartpot_deployment, crab_pot_analysis)
for autonomous crab pot deployment planning and catch correlation.

Pure tidal phase classification in tidal.py with no MCP dependencies.
65 tests passing, lint clean.
2026-02-22 18:31:03 -07:00
9f6d7bb4ac Rename package from noaa-tides to mcnoaa-tides
Distribution name, import package, entry point script, MCP config,
and all internal references updated. Git tracks the directory rename
so file history is preserved.
2026-02-22 16:53:56 -07:00
66ec2ba9e7 Add visualization tools: tide charts and conditions dashboards
New visualize_tides and visualize_conditions MCP tools that generate
PNG (inline via MCP ImageContent) or interactive HTML (Plotly) charts.
Optional dependency group [viz] keeps the base install lightweight.

- charts/ package: rendering logic separated from MCP tool wiring
- Shared marine color palette (ocean blue, teal, slate, sand, coral)
- 14 new tests (parsing, PNG/HTML rendering, tool registration)
- Example chart images in README with realistic synthetic tidal data
2026-02-22 16:51:00 -07:00
560a72eaf6 Add README with real API response examples
Every example uses actual NOAA data captured from the live API.
Larger responses linked as JSON files in examples/ directory.
2026-02-21 21:26:57 -07:00
58022cc8c4 Fix time_zone param: lst_lte -> lst_ldt
NOAA data API accepts gmt, lst, lst_ldt — not lst_lte.
Metadata API doesn't use this param, which masked the bug.
2026-02-21 21:15:18 -07:00
bb1d26332d Add extra=ignore to Station model for NOAA API resilience 2026-02-21 21:08:36 -07:00
20059b9476 Harden error handling and input validation
- Station ID validation (7-digit regex) prevents path traversal
- Stale cache fallback: serve expired data if refresh fails
- Resilient startup: server starts even if NOAA is down
- Contextual HTTP error messages with recovery hints
- Hours range validation (1-720)
- find_nearest limit/distance validation
- search() and find_nearest() now async with cache TTL checks
- Better error type info in conditions snapshot partial failures
2026-02-21 21:08:16 -07:00
6c244b3a63 Initial implementation: FastMCP 3.0 server wrapping NOAA CO-OPS API
7 tools: station search/nearest/info, tide predictions/observations,
meteorological data (Literal selector for 8 products), and parallel
marine conditions snapshot. 3 resources, 2 prompts, full test suite.
2026-02-21 21:04:03 -07:00