@tablestakes/latitude
v1.0.1
Published
MCP server for Meridian context delivery — local daemon, cache optimizer, read-optimized delivery layer
Maintainers
Readme
Latitude — MCP Harness for Meridian Context Delivery
Latitude is a local MCP server that acts as a read-optimized delivery layer for Meridian context. It normalizes Meridian context across AI clients, maximizes Anthropic prompt cache hits, and provides a transparent JSONL-based local cache.
What agents are told (the MCP server instructions, also at the head of the
bootstrap):
Latitude delivers this repository's recorded memory: the conventions, decisions, constraints, and past incidents the project has written down, which the code and general knowledge can't tell you. Call it first, when the requested work changes, and whenever you move into a new area of the repo. It ranks every recorded block against your query and returns the top third as summaries. The rest stay reachable through
load_more, so a topic that doesn't appear may be ranked lower, not missing.
Requirements
- npx (default): Node.js ≥ 24 (current LTS) on Linux, Windows or macOS.
- Docker: Docker Engine or Docker Desktop (
linux/amd64,linux/arm64). The imageghcr.io/tablestakesllc/latitudeis published from 1.0.1 on.
Latitude runs as one server per repository: each client entry names the repo whose Meridian memory it serves. Nothing leaves the machine.
First-Time Project Setup
Run once per repo:
npx -y @tablestakes/latitude --init /path/to/your-repo # config + Meridian seed
npx -y @tablestakes/latitude --init --config-only /path/to/your-repo # config only (repo already has Meridian)Add --client <client> (vscode, cursor, claude-code, cline, windsurf,
claude-desktop) to also put a short pointer at the top of the file that client
auto-loads, sending the agent to agent_docs/SESSION_INIT.md:
npx -y @tablestakes/latitude --init --client claude-code /path/to/your-repo--init never overwrites existing files.
Connect Your AI Client
-y skips npx's install prompt, which an MCP client cannot answer. Pin a version
with @tablestakes/latitude@<version>.
Per-project clients keep the config in the repo:
| Client | File |
|---|---|
| Claude Code | <repo>/.mcp.json |
| VS Code (Copilot) | <repo>/.vscode/mcp.json |
| Cursor | <repo>/.cursor/mcp.json |
Claude Code starts the server in the project directory, so no path is needed:
{
"mcpServers": {
"latitude": { "command": "npx", "args": ["-y", "@tablestakes/latitude"] }
}
}VS Code, .vscode/mcp.json:
{
"servers": {
"latitude": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@tablestakes/latitude", "${workspaceFolder}"]
}
}
}Cursor, .cursor/mcp.json: the VS Code entry under "mcpServers", without "type".
Global-only clients (Cline, Windsurf, Claude Desktop) keep one config for every workspace, so add one named entry per repo, each with an absolute path:
{
"mcpServers": {
"latitude-my-app": {
"command": "npx",
"args": ["-y", "@tablestakes/latitude", "/home/me/repos/my-app"]
}
}
}| Client | File |
|---|---|
| Cline | …/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
| Claude Desktop | claude_desktop_config.json (%APPDATA%\Claude, ~/Library/Application Support/Claude) |
Docker, in any client (from 1.0.1):
{
"mcpServers": {
"latitude-my-app": {
"command": "docker",
"args": ["run", "-i", "--rm", "--user", "1000:1000",
"--mount", "type=bind,src=/home/me/repos/my-app,dst=/work",
"ghcr.io/tablestakesllc/latitude", "/work"]
}
}
}-i is required (stdio is the MCP channel). --user keeps the files Latitude
writes (.latitude/cache.jsonl, .agent/context_swap.json) owned by you; use your
own id -u:id -g.
Windows: double the backslashes in JSON paths
("C:\\Users\\me\\repos\\my-app"), and prefer a native Windows path over a
\\wsl$\... path. If the client reports spawn npx ENOENT, use
"command": "npx.cmd".
Check the connection: the server logs [latitude] Project root: … to stderr
at startup, and the latitude://status resource reports its version and surface.
MCP Surface
15 tools, 4 resources, 1 prompt. Agents call bootstrap as a tool. It is
also registered as a prompt, for hosts that can invoke prompts; the prompt
includes tool schemas and the top weighted blocks.
| Type | Name | Purpose |
|------|------|---------|
| Tool | get_context_for_task | Phase 1: weight-sorted block summaries |
| Tool | load_blocks | Phase 2: full block content for selected IDs |
| Tool | load_more | Pagination: page through tail summaries that clients truncate |
| Tool | load_skill | Full SKILL.md for a named skill |
| Tool | load_skills | Paginated skill directory, ordered by aggregate weight |
| Tool | record_blocks_used | Feedback loop: records which blocks were used |
| Tool | reset_session | Resets context_swap.json to {} |
| Tool | cache_stats | Transparency: hit rate, entry count, stale ratio |
| Tool | cache_report | Per-entry hit counts, sorted by frequency |
| Tool | compact_checkpoint | Pre-compaction checkpoint (merged into context_swap.json) + metrics emit + token-counter reset |
| Tool | compact_rehydrate | Post-compaction recovery payload |
| Tool | session_tokens | Session token budget: served tokens, limit, remaining, breakdown |
| Tool | metrics_push | Emits metrics without resetting session state |
| Tool | bootstrap | Ordered session bootstrap (static→warm→fluid); onboarding when the repo has no Meridian |
| Tool | meridian_verify | Checks a Meridian setup and returns the one next step (install → fill → L1 → complete) |
| Resource | latitude://context/l1 | Full L1_CONTEXT.md |
| Resource | latitude://block/{id} | Single block by ID |
| Resource | latitude://skill/{name} | Skill content on demand |
| Resource | latitude://status | Availability + version + MCP surface check |
AI Client Latitude MCP Meridian
│ │ │
├── get_context_for_task ──►│── loadIndex() ───────────►│
│ │ score + order │
│◄── block summaries ──────│ │
│ │ │
├── load_blocks(ids) ─────►│── loadBlock(id) ─────────►│
│ │ │
│◄── full block content ───│ │
│ │ │
├── record_blocks_used ────►│── context_swap.json ─────►│ (weight feedback)
│ │ │
├── load_more(cursor) ─────►│── cache (full summaries)─│ (pagination)Session open: the agent reads agent_docs/SESSION_INIT.md (the cross-agent
entry point per Meridian convention). Its checklist-head HALT block checks for
Latitude tools — if present, the agent calls the bootstrap tool for an
optimized, cache-stable boot instead of the manual 7-step checklist.
Supported Platforms
| Platform | Status |
|---|---|
| Linux | Supported — primary development and CI platform |
| Windows | Supported — covered by a native windows-latest CI job |
| macOS | Supported — packaged-install smoke test in the release pipeline |
Security and Trust Model
The project repository is the trust boundary. Latitude serves the Meridian files
in agent_docs/ and .agents/skills/ to your agent verbatim, and your agent
treats them as instructions. Review those directories before running Latitude
against a repository you did not author. Nothing leaves the machine.
Report vulnerabilities privately to [email protected].
Development
The source repository is private for now; this section is for contributors with access. From a checkout:
npm run mcp-configwrites the client entries above for you (--client <client> --path <repo> [--method npx|docker|node] [--write]).- From source:
npm ci && npm run build && node dist/index.js /path/to/your-repo. - Guides:
docs/SETUP.md(clients, Windows, metrics),docs/RUNBOOK.md(run, test, testing another Meridian repo),docs/RELEASING.md,CONTRIBUTING.md,SECURITY.md.
| Suite | Command | What |
|-------|---------|------|
| Unit tests | npm test | ~590 tests (node:test), coverage ≥85% |
| Integration | npm run integration-test | Atomic criteria against this repo's real Meridian blocks |
| Session sim | npm run session-sim | SESSION_INIT→task→task→SESSION_END workflow |
| Retrieval quality | npm run retrieval-quality | Recall + noise gate; LATITUDE_ROOT=<repo> tests another Meridian repo |
| Local CI | pwsh linux-local-ci.ps1 [-Repo <path>[#branch],…] | Full suite in Docker (mirrors GitHub CI) |
latitude/
├── src/ # MCP server (TypeScript); index.ts = server + handlers
├── scripts/ # CI gates, dogfood and release tooling
├── test/fixtures/ # Meridian layout samples, example retrieval scenarios
├── seed/ # Pinned Meridian seed shipped for --init
├── docs/ # SETUP, RUNBOOK, RELEASING, MERIDIAN_CONTRACT
├── agent_docs/ # This repo's own Meridian memory
├── .github/workflows/ # ci.yml, release.yml
└── linux-local-ci.ps1 # Local CI (mirrors GitHub Actions)Disclaimer
Latitude is provided "as is", without warranty of any kind. You are solely
responsible for how you use it, for the repositories you configure it to read,
and for anything your agent does with the content Latitude returns. Table Stakes
Software, LLC accepts no responsibility for the use of Latitude or for any
content served from a repository a user has configured. The binding terms are
in the LICENSE file shipped with this package (sections 7 and 8).
License
Licensed under the Apache License, Version 2.0 (the LICENSE file in this
package). Copyright 2026 Table Stakes Software, LLC. See NOTICE.
