mcp-dockhand
Copilot instructions49 starsChanged 8 months agoMITView on GitHub
This is a Model Context Protocol (MCP) server for Dockhand Docker Management. It wraps the Dockhand REST API into 130+ MCP tools using Streamable HTTP transport. Upstream repositories (source of truth for API behavior): - Dockhand Server: https://github.com/finsys/dockhand (SvelteKit, Bun) - Hawser Agent: https://github.com/finsys/hawser (Go) When reviewing MCP tool implementations, always cross-reference with the upstream Dockhand source code: If a tool's implementation differs from upstream, flag it as HIGH priority.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
15 rules. About 0 are common, 9 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
When reviewing MCP tool implementations, always cross-reference with the upstream Dockhand source code:
- Very specific: line 16
HTTP Methods: Check src/routes/api//+server.ts in finsys/dockhand for the correct HTTP method (GET/POST/PUT/DELETE/PATCH).
- Distinctive: line 17
Request Body Fields: Check the actual request parsing in the Dockhand route handlers to verify parameter names and types match what our …
- Distinctive: line 18
Response Format: Verify our tools correctly handle the response structure (JSON object vs array, pagination, error format).
- Very specific: line 27
All path parameters MUST use encodePath() from src/utils/encode-path.ts
- Distinctive: line 28
No hardcoded credentials or tokens
- Very specific: line 34
All parameters must have Zod validation with .describe() annotations
- Very specific: line 36
Prefer explicit typed parameters over generic Record<string, unknown>
- Very specific: line 42
Use z.infer<> for type derivation from Zod schemas
- Distinctive: line 43
All async operations must have proper error handling
- Distinctive: line 44
No unnecessary GET requests (e.g.
- Distinctive: line 47
All new tools MUST have corresponding test coverage
- Distinctive: line 51
Verify tests actually test what they claim (no false positives from loose matching)
- Very specific: line 57
Node.js major: Check Dockerfile compatibility
- Distinctive: line 58
MCP SDK updates: Check for API changes in the SDK changelog
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Copilot Instructions — MCP-Dockhand
Project Context
This is a Model Context Protocol (MCP) server for Dockhand Docker Management. It wraps the Dockhand REST API into 130+ MCP tools using Streamable HTTP transport.
Upstream repositories (source of truth for API behavior):
- Dockhand Server: https://github.com/finsys/dockhand (SvelteKit, Bun)
- Hawser Agent: https://github.com/finsys/hawser (Go)
Critical: Verify Against Upstream
When reviewing MCP tool implementations, always cross-reference with the upstream Dockhand source code:
- HTTP Methods: Check
src/routes/api/**/+server.tsin finsys/dockhand for the correct HTTP method (GET/POST/PUT/DELETE/PATCH). Our MCP tools MUST match. - Request Body Fields: Check the actual request parsing in the Dockhand route handlers to verify parameter names and types match what our tools send.
- Response Format: Verify our tools correctly handle the response structure (JSON object vs array, pagination, error format).
- Hawser Protocol: For environment/hawser-related tools, check
internal/protocol/messages.goandinternal/docker/compose.goin finsys/hawser. - API Schema: Compare against
docs/dockhand-openapi.json(pinned upstream OpenAPI spec, single source since #222; refreshed nightly by.github/workflows/api-schema-sync.yml).
If a tool's implementation differs from upstream, flag it as HIGH priority.
Code Review Guidelines
Security
- All path parameters MUST use
encodePath()fromsrc/utils/encode-path.ts - No hardcoded credentials or tokens
- Session cookies must not be logged
- Environment filter must be applied on all environment-scoped endpoints
additionalConfig/additionalSettingsmust be merged BEFORE explicit fields (not after)
MCP Tool Quality
- All parameters must have Zod validation with
.describe()annotations - Tool descriptions must be clear and actionable for LLMs
- Prefer explicit typed parameters over generic
Record<string, unknown> - Required vs optional parameters must match the Dockhand API
connectionTypegating: host/port only forhawser-standard, nothawser-edge
TypeScript
- Strict mode — no
anytypes unless absolutely necessary - Use
z.infer<>for type derivation from Zod schemas - All async operations must have proper error handling
- No unnecessary GET requests (e.g. don't fetch just to read one field)
Tests
- All new tools MUST have corresponding test coverage
tests/path-encoding.test.ts: every${...}in API paths must useencodePath()tests/tool-registration.test.ts: every tool module must have its register function calledtests/environment-scope.test.ts: tools withenvironmentIdmust pass it asenvquery param- Verify tests actually test what they claim (no false positives from loose matching)
Dependency Updates (Dependabot)
- Patch/Minor updates: Auto-merge if CI passes
- Major updates: Review carefully for breaking changes
- Zod v3 to v4: Breaking change — requires migration (do NOT auto-merge)
- Node.js major: Check Dockerfile compatibility
- MCP SDK updates: Check for API changes in the SDK changelog
Docker
- Multi-stage build must be maintained
- Non-root user (
node) required - Healthcheck must be present
- Base image should be Alpine-based for minimal size
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

