ref-project-reference

A project-specific reference guide for the Deephaven MCP repository, a codebase that connects AI agents to Deephaven data systems. It maps the architecture, important files, commands, settings, and test clients.

In plain words
What is it for?
Use it when changing server settings, running quality checks, navigating the codebase, or testing MCP tools and connections.
Why use it?
It reduces the time spent searching the repository or guessing how its servers and configuration fit together. It also helps avoid using the wrong command, file, or tool registration pattern.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/deephaven/deephaven-mcp/ref-project-reference
Any agent
npx skills add deephaven/deephaven-mcp --skill ref-project-reference
Clone the repo
git clone --depth 1 https://github.com/deephaven/deephaven-mcp

Made for: Claude Code, Codex.

Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,551 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00043 $0.04551
Opus 5 $0.00022 $0.02276
Sonnet 5 $0.00009 $0.00910
Haiku 4.5 $0.00004 $0.00455

Measured 2d ago against content hash aa68295f0a7b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ref-project-reference scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/ref-project-reference/SKILL.md · 170 lines

How it starts

The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Deephaven MCP Repository Reference

Architecture and Key Files

  • src/deephaven_mcp/mcp_systems_server/server.py — Multiplexed systems server entry point (main()); CLI parsing, transport selection, PSK resolution.
  • src/deephaven_mcp/mcp_systems_server/_lifespan.py — FastMCP lifespan factory: builds MultiSystemRegistry from ConfigTree, starts one Evictor per child registry.
  • src/deephaven_mcp/auth/middleware/_psk.pyPSKMiddleware: Starlette middleware gating inbound HTTP requests on a single shared PSK (X-Deephaven-PSK header). Mounted by the systems server's HTTP transport; reusable by other MCP servers.
  • src/deephaven_mcp/auth/credentials/ — Outbound credential dataclasses passed to CorePlusSessionFactory.from_credentials.
  • src/deephaven_mcp/mcp_systems_server/_tools/ — MCP tool modules. All registered on the single multiplexed server: session, table, script, session_community, session_enterprise, catalog, pq. Shared helpers in shared.py. Tools that name a system take a system argument; tools that take an id (<type>:<system>:<name>) parse the system out of it. There is no mcp_reload tool — config changes require a restart.
  • src/deephaven_mcp/mcp_docs_server/ — Docs MCP server for documentation Q&A.
  • src/deephaven_mcp/config/ — General-purpose config primitives reusable by any MCP server: _file_loader.py (async JSON5 reader + ConfigurationError wrapping), _templating.py (${env:VAR} / ${env:VAR:-default} / ${file:PATH} placeholder engine), _data_root.py (resolve_data_root — the sole reader of DH_AI_DATA_DIR, keyed on sys.platform for the per-OS default), _config_dir.py (the config/ subdir under that root), _store.py (ConfigStore — file-level read/modify/write that the dhcli config authoring verbs go through, so they never need a full-tree load), _dir_permissions.py (verify_config_directory_permissions — the startup policy: existence/is-dir checks, refuse-to-start, and aggregation of audit violations into one ConfigurationError; the per-OS audit mechanics are delegated to _platform.dir_permissions.audit_tree).
  • src/deephaven_mcp/_platform/ — OS abstraction layer (HAL): the single home for code that branches on os.name. _os_support.py (leaf module — SUPPORTED_OS_NAMES = frozenset({"posix", "nt"}) plus unsupported_os_error(component), the one dispatch-error factory every site uses), fsutil.py (advisory file locking, atomic private writes, Windows-retry filesystem helpers), spawn.py (spawn_detached detached-process launcher — start_new_session on POSIX, creationflags on Windows, fail-fast InternalError otherwise), dir_permissions.py (harden_private_dir + audit_tree, with per-OS _harden_*/_audit_* impls). The package __init__.py is docstring-only and imports no submodules (cycle-safety); submodules import the contract from the leaf ._os_support. Note: sys.platform-keyed path/venv resolution (config/_data_root.py, resource_manager/_launcher.py) is a different axis and intentionally stays in its domain modules.
  • src/deephaven_mcp/config/schema/ — Pydantic section schemas for the whole product (consumed by both the systems server and the dhcli CLI): the per-section schema/loader modules _server.py (ServerConfig + DaemonProcessConfig), _cli.py (CliConfig and the nested groups it composes — OutputConfig, DaemonControlConfig, RequestConfig, DocsConfig, ContextConfig, plus their timeout and policy types), _community.py, _enterprise.py (each owns its umbrella schema and load_<section> function), plus the tool-tunable schemas _response_limits.py (ResponseLimits) and _pq_config.py (PqToolsConfig) embedded by the community/enterprise schemas.
  • src/deephaven_mcp/config/tree.pyConfigTree (mirrors the on-disk layout server.json, cli.json, community/, enterprise/ one-for-one; the canonical aggregator type) and ConfigTreeLoader (walks the configuration directory and produces a validated ConfigTree). Lives at the top of the config package so both cli and mcp_systems_server depend on it without depending on each other; config/__init__.py stays primitives-only so import deephaven_mcp.config does not pull in the schema graph.
  • src/deephaven_mcp/resource_manager/_registry_multi.pyMultiSystemRegistry: composite registry over one community child + one enterprise child per configured system; routes session-id reads to the correct child.
  • src/deephaven_mcp/cli/ — The dhcli CLI (click + Pattern B). _main.py (root group), _commands/{daemon,tool,session,system,table,catalog,pq,docs,config,context,agents,self_cmd}.py (noun groups; daemon for daemon lifecycle, tool is the raw MCP escape hatch, config reads and authors the local config tree, the runtime nouns session/system/table/catalog/pq wrap specific MCP tools, docs connects directly to the docs MCP server (no daemon), context manages the sticky default id, agents emits machine-readable CLI metadata, self_cmd is the self noun group for tool self-management — today the completion verb printing shell tab-completion scripts), _async.py (run_async async-to-sync adapter), _errors.py (CliError + ErrorCode registry), _help.py (HelpSpec help vocabulary, build_help rendering, and the HelpfulMeta metadata base), _command.py (HelpfulCommand / HelpfulGroup, carrying the runtime-load hook and the --agents injection), _manifest.py (the agents manifest builders: build_manifest / build_summary_tree / describe_command), _params.py (the CLI-wide blank-value guard and NonBlankPath), _format.py (human/json/json-pretty/yaml renderers), _echo.py (printing a payload in the active output mode — echo_payload(runtime, ...) reads runtime.config.cli.output.format; echo_payload_no_runtime(ctx, ...) reads the root -o for callers that run before the config load, i.e. needs_runtime=False verbs and the eager --agents callback), _runtime.py (resolved Runtime context on ctx.obj), _context.py (ContextStore persisting the sticky default id to <runtime_dir>/context.json, plus the resolve_context_value / require_context_value / require_context_target resolution helpers and the single-sourced CONTEXT_HINT / CONTEXT_RISK_* help strings), _daemon/ (daemon-lifecycle package: _lifecycle.py orchestration core get_or_start_daemon(ctx, ...) -> DaemonRegistryEntry / stop_daemon(directory, *, kill_after_seconds); commands build the DaemonContext from a Runtime via DaemonContext.from_runtime(runtime) and read tunables from runtime.config.cli.daemon; the OS-specific spawn mechanic is delegated to _platform.spawn.spawn_detached), _mcp_client.py (loopback HTTP client). Async handlers must be wrapped with @run_async — see ref-python-coding-practices rule 15 and the cli-command-add skill.
  • src/deephaven_mcp/daemon_registry.py — Shared wire contract between the CLI and a local daemon process. DaemonRegistryEntry (Pydantic model for daemon.json with field-level invariants — Literal["127.0.0.1"] host, port range, AwareDatetime started_at, etc.; the recorded (pid, create_time_ns, process_name) triple is exposed as a ProcessIdentity via the .identity property, and DaemonRegistryEntry.is_live() is the single PID-reuse-safe liveness predicate shared by the CLI lifecycle and the server's registry-publish refusal), DaemonDirectory (typed handle to <runtime_dir>/daemon/ exposing registry_path/lock_path/log_path and atomic registry CRUD via tempfile.mkstemp), RegistryCorruptError, and filename constants. Imported by both mcp_systems_server (daemon entry point writes the registry) and cli (spawn/poll/stop reads it; reachable via runtime.daemon_dir).
  • src/deephaven_mcp/_processes.py — Portable process primitives (no os.name branch; stays top-level rather than under _platform). ProcessIdentity value object: a frozen (pid, create_time_ns) pair that anchors all PID-reuse-safe operations on a process. Provides is_alive(), send_signal_safely(sig) -> SignalOutcome (DELIVERED/GONE/DENIED/RECYCLED), and capture(pid, process_name) for first-publish capture. The recorded create_time_ns is compared by integer equality (no float drift). Replaces the _capture_create_time / _send_sigterm / _force_kill / _process_still_running helpers that previously had to trade a raw (pid, create_time) tuple by hand at every call site. The OS-dispatched detached-process launcher that used to live here moved to _platform.spawn.spawn_detached.
  • src/deephaven_mcp/mcp_systems_server/_idle.py — Generic idle-shutdown machinery: IdleTimer (monotonic-clock data), ActivityMiddleware (Starlette middleware bumping the timer), idle_watcher (lifespan coroutine that calls a supplied exit_fn on expiry). Opted into via make_lifespan(..., idle=IdleWatcher(...)); daemon mode always sets it.
  • scripts/ — Test clients and utilities.
  • tests/ — Comprehensive test suite with high line coverage on src/deephaven_mcp/ (run tests-run for the current count and report).
  • pyproject.toml — Project configuration and dependencies, including the supported Python floor (requires-python). The rule for consuming it is ref-python-coding-practices rule 16 (Python version floor).

Read the full file on GitHub · 170 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 170 lines · 43 tokens per session scan A aa68295f0a7b

Subscribe to this mod's changes

ref-project-reference is a skill published in the GitHub repository deephaven/deephaven-mcp (5 stars, last pushed 4d ago), licensed Apache-2.0. It adds 43 tokens to every session and 4,551 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens