mcp-dockhand
CLAUDE.md49 starsChanged 8 months agoMITView on GitHub
MCP Server (Model Context Protocol) für Dockhand Docker Management. Wrapt die Dockhand REST API in 130+ MCP-Tools mit Streamable HTTP Transport.
In this repositoryOne other file it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 80
Commit-Messages: Conventional Commits (feat, fix, docs, chore, refactor)
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md 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
CLAUDE.md — MCP-Dockhand Server
Projektübersicht
MCP Server (Model Context Protocol) für Dockhand Docker Management. Wrapt die Dockhand REST API in 130+ MCP-Tools mit Streamable HTTP Transport.
Tech Stack
- Runtime: Node.js 22+
- Sprache: TypeScript (strict mode)
- MCP SDK: @modelcontextprotocol/sdk
- Validierung: Zod (aktuell v3, Migration auf v4 geplant)
- Build:
npm run build(tsc) - Typecheck:
npm run typecheck - Tests: Vitest (geplant — siehe Issue für Test-Suite)
- Docker: Multi-stage Build, non-root User, Healthcheck
Verzeichnisstruktur
src/
├── index.ts # Entry Point, Express Server
├── server.ts # MCP Server Factory (Multi-Session)
├── auth/ # Dockhand Session-Authentifizierung
├── client/ # HTTP Client mit Cookie-Management
├── tools/ # Tool-Definitionen (130+)
│ ├── containers.ts # Container-Management (27 Tools)
│ ├── stacks.ts # Stack-Management (21 Tools)
│ ├── images.ts # Image-Management (9 Tools)
│ ├── networks.ts # Netzwerk-Management (7 Tools)
│ ├── volumes.ts # Volume-Management (9 Tools)
│ ├── git-stacks.ts # Git-Stack-Management (15 Tools)
│ ├── environments.ts # Environment-Management (18 Tools)
│ ├── users.ts # User/Rollen-Management (20 Tools)
│ ├── system.ts # System/Health/Metrics (19 Tools)
│ └── ... # Weitere Tool-Dateien
├── types/ # TypeScript-Typen
└── utils/ # HilfsfunktionenKonventionen
Code-Stil
- Alle Tool-Parameter mit Zod validieren
encodeURIComponent()auf ALLEN Pfad-Parametern (Container-IDs, Stack-Namen etc.)- Environment-ID als
environmentId(number) — IMMER als Query-Parameter?env= - Session-basierte Auth — automatisches Re-Login bei 401
- SSE für Deploy-Operationen (
postSSEMethode)
Tool-Definition Pattern
server.tool(
'tool_name',
'Beschreibung was das Tool tut',
{
environmentId: z.number().describe('Environment ID (required)'),
name: z.string().describe('Resource name'),
// Optionale Parameter:
option: z.string().optional().describe('Optional parameter'),
},
async ({ environmentId, name, option }) => {
const client = await getClient(session);
const result = await client.get(`/api/endpoint/${encodeURIComponent(name)}`, { env: environmentId });
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
}
);Bekannte Probleme (Audit 29.03.2026)
- Issue #16: Inkonsistentes
encodeURIComponentbei Pfad-Parametern - Issue #17: Generische
config/settingsstatt typisierter Parameter - Zod v3 → v4 Migration nötig (Breaking Change bei Dependabot PR #13)
Git
- Commit-Messages: Conventional Commits (feat, fix, docs, chore, refactor)
- Changelog: Keep a Changelog Format (CHANGELOG.md)
- Releases: Semver Tags (v1.0.0) → GHCR Image Build
- Branches: main + feature/fix Branches, PRs für Änderungen
CI/CD
- CI: Typecheck bei jedem Push/PR (
npm run typecheck) - Release: Docker Build + Push zu GHCR bei Tag-Push
- Dependabot: Wöchentlich (npm, GitHub Actions, Docker)
- API Change Detection: Wöchentlich Montag 06:00 UTC
Dockhand API
- Server: Dockhand v1.0.22+ (SvelteKit + Bun)
- Auth: Cookie-basiert (
dockhand_session) - Base URL: Konfigurierbar via
DOCKHAND_URLenv var - Alle Endpoints: Environment-scoped via
?env=<id>Query-Parameter - API Schema:
docs/dockhand-openapi.json— single pinned source (upstreamFinsys/dockhandcommit;PINNED_DOCKHAND_OPENAPI_COMMITinsrc/openapi/pinned.tsmirrorsSOURCE_COMMITinscripts/fetch-openapi.mjs) for routes, query params AND body contracts. Refreshed viascripts/fetch-openapi.mjs, re-fetched nightly by.github/workflows/api-schema-sync.yml(no-op unless the pin changed). - API Change Gate:
npm run api:validateis a hard, PR-blocking gate inci.yml(route/query mismatches plusBODY_PARAM_MISSING_REQUIREDfail the build; other body-contract findings stay advisory)..github/workflows/drift-bump.ymlruns weekly, bumps the pin toward upstreammain, and opens a PR (no auto-merge) so drift surfaces on review. - Not yet done: version-gating (comparing the live Dockhand server version against the pinned spec version) is a separate follow-up, not implemented here.
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.

