Skip to content

Kickoff

Implement the Claude Context MCP Server — a Cloudflare Worker exposing skills, agent profiles, and documentation over MCP.

Read specification.md in this directory first — it is the authoritative specification for this project. It defines the API contracts, authentication design, build process, caching strategy, technology stack (DR-18), and all design decisions (DR-01 through DR-18).

Arda-cards/skills-mcp — currently contains only a .gitignore. All code is written from scratch.

27 files in the Arda-cards/skills-mcp repository, organized in 6 phases. The full file inventory with per-file instructions is in implementation-changes.md.

FileContent
src/types.tsEnv interface, GitHub API response types, index entry types, error codes
src/auth.tsURL-safe Base64 token decode, PAT prefix validation (ghp_, github_pat_, gho_)
src/validation.tsPath traversal rejection (.., absolute paths, backslashes)
src/github.tsGitHub Contents API client — fetch, error mapping, content decode
src/cache.tsCloudflare Cache API wrapper — get/set with 10-min TTL, skipCache bypass
src/index.tsMcpAgent class with 7 tool registrations, bundled index imports
FileContent
scripts/build-skills-agents-index.jsGenerate skills + agents indexes from YAML frontmatter (js-yaml)
scripts/build-docs-index.jsGenerate docs index from Astro content frontmatter (.md + .mdx)
FileContent
tests/auth.test.tsToken decode, Base64 edge cases, PAT format validation
tests/validation.test.tsPath traversal rejection
tests/github.test.tsMocked fetch — URL construction, content decode, error mapping, index.md fallback
tests/cache.test.tsMocked Cache API — hit/miss, skipCache, key construction
tests/tools.test.tsTool handler logic — bundled indexes, get_* integration with mocks
FileContent
package.jsonDependencies, scripts, Cloudflare Worker config
tsconfig.json / tsconfig.eslint.jsonTypeScript strict mode, bundler resolution
wrangler.tomlWorker config, environment variables, compatibility_date
.prettierrc / eslint.config.js / vitest.config.tsCode quality tooling
.gitignoreUpdated with src/generated/, .wrangler/
CHANGELOG.md / .github/clq/changemap.jsonChangelog with clq validation
scripts/ensure-generated.jsPlaceholder indexes for local dev
.github/workflows/publish.ymlCI/CD — 3 triggers, index generation, Cloudflare deploy
.github/workflows/pull_request_upkeep.ymlPR project board automation
README.mdInstallation guide, PAT setup, Base64 encoding, MCP client config

Read every file in this directory before writing any code. They form a complete specification:

DocumentWhat It Contains
specification.mdFull design — API contracts, auth flow, configuration, caching, build process, error handling, decisions DR-01 through DR-18
design.mdArchitecture diagrams (PlantUML) — runtime flow, deployment, test strategy, pipeline
requirements.md27 functional requirements with unique IDs (REQ-AUTH-, REQ-SKILL-, etc.)
verification.md51 test cases mapped to requirements
implementation-changes.mdPer-file implementation instructions with code templates and open questions
plan/task-plan.md30 tasks across 6 phases with gates, parallelization, and acceptance criteria
plan/team-split-assessment.mdComplexity analysis — single agent recommended

The hypothesis-mcp repository (Arda-cards/hypothesis-mcp, local at /Users/jmp/code/arda/hypothesis-mcp/) is the reference implementation for project structure, code style, CI/CD, and conventions. Read these files:

  • package.json — dependency patterns, scripts, publish config
  • src/index.ts — MCP tool registration pattern (server.registerTool())
  • src/client.ts — API client pattern (generic request<T>(), auth headers, error handling)
  • src/types.ts — type organization (raw vs normalized)
  • tests/client.test.ts — test patterns (global fetch mock, fixture helpers)
  • .github/workflows/publish.yml — CI pipeline (clq, build-and-test, publish)
  • tsconfig.json — TypeScript strict settings
  • eslint.config.js — linting rules

Important differences from hypothesis-mcp:

  • This project is a Cloudflare Worker (not a stdio MCP server)
  • Uses McpAgent from the agents npm package (not StdioServerTransport)
  • Uses bundler module resolution (not NodeNext)
  • Has build scripts that generate bundled indexes
  • Deploys via wrangler (not npm publish)

The task plan defines 5 gates. Do not proceed past a gate until it passes:

GateAfter TasksVerification
#8: Scaffolding1-7npm ci succeeds, npx tsc --noEmit succeeds with placeholder indexes
#15: Source compiles9-14npx tsc --noEmit passes, wrangler dev starts without errors
#18: Index generation16-17Run scripts against local clones of source repos; verify JSON output
#24: Tests pass19-23npm test passes, npm run lint passes, npm run typecheck passes
#28: CI green25-27Push branch, open PR, all CI checks pass

4. Resolve Open Questions During Implementation

Section titled “4. Resolve Open Questions During Implementation”

Three questions are flagged as open in the implementation plan. Resolve them as you encounter them:

#QuestionWhenHow
1McpAgent API for accessing auth headersTask 14 (src/index.ts)Read the agents npm package source/docs. The auth token must flow from the initial HTTP request to tool handlers. Keep auth.ts as a pure function regardless.
2Durable Objects config in wrangler.tomlTask 4Check if McpAgent.mount() or McpAgent.serve() auto-configures DO bindings, or if explicit [durable_objects] and [[migrations]] sections are needed.
3Test approach for Worker-specific codeTask 19+Decision: test pure logic only (auth, validation, github client, cache). Verify McpAgent integration via manual smoke test after deploy.

Before any push to the remote:

Terminal window
npm run typecheck
npm run lint
npm test

All three must pass. Do not push with failing checks.

  • Branch name: jmpicnic/skills-mcp/initial-implementation
  • Commit messages: Conventional style, grouped by phase (e.g., “feat: add project scaffolding”, “feat: implement MCP tools and GitHub client”)
  • Single PR: One PR from the implementation branch to main

These skills must be loaded (via the Skill tool) before writing code. They define conventions that all deliverables must follow.

SkillPurposeWhen
general-conventionsWorkspace-wide conventions — stdout redirect to scratch/, agent branch naming, consultative mode.Before starting any work.
kotlin-codingNot needed — this is a TypeScript project. Listed here to explicitly exclude it.N/A
release-lifecycleCHANGELOG management, PR conventions, version extraction.When writing CHANGELOG.md and CI workflow.
document-writingMarkdown formatting, frontmatter, link conventions.When writing README.md.
SkillPurposeRelevant Tasks
knowledge-baseCheck for relevant entries on MCP servers, Cloudflare Workers, or CI patterns.All tasks (background context)
unit-tests-frontendJest/Vitest conventions — may inform test structure even though this isn’t React.Tasks 19-23 (test files)

If this task is executed by a team lead or coordinator, these agent profiles are recommended. However, the team split assessment recommends single agent execution — the project is small enough that team orchestration overhead is not justified.

Agent ProfileRecommended ForTasks
devops-engineerCloudflare Workers deployment, wrangler.toml, GitHub Actions CI/CD, branch protection.1-8, 25-26, 29-30
back-end-engineerTypeScript source code, MCP tool implementation, GitHub API client, tests.9-14, 16-24, 27
technical-writerREADME.md authoring — installation guide, PAT walkthrough, usage instructions.27
quality-reviewerCode review before merging — check for security issues (path traversal), coding standards, test coverage gaps.Post-task 28 (review before merge)
security-engineerReview path traversal validation, token handling, and error responses for information leakage.Post-task 24 (security review)

Use the back-end-engineer profile. This agent has TypeScript/Node.js expertise and can handle both the source code and infrastructure files. The project is 27 files with clear templates — a single agent can execute all 30 tasks sequentially in one session.

Load skills: general-conventions, release-lifecycle, document-writing
Read: specification.md, design.md, requirements.md, implementation-changes.md, plan/task-plan.md
Read: hypothesis-mcp/package.json, hypothesis-mcp/src/index.ts, hypothesis-mcp/.github/workflows/publish.yml
Execute: Tasks 1-30 following phase gates

If speed is prioritized over simplicity, a 2-agent team:

  1. Phase 1 (parallel):

    • devops-engineer writes scaffolding (Tasks 1-7)
    • Agent waits at Gate #8
  2. Phase 2-3 (sequential, single agent):

    • back-end-engineer writes source code (Tasks 9-14) and build scripts (Tasks 16-17)
    • Passes Gates #15 and #18
  3. Phase 4 (single agent):

    • back-end-engineer writes all tests (Tasks 19-23)
    • Passes Gate #24
  4. Phase 5-6 (parallel then sequential):

    • devops-engineer writes CI workflows (Tasks 25-26)
    • back-end-engineer writes README (Task 27)
    • Gate #28: CI green
    • devops-engineer handles deploy (Task 29) and branch protection (Task 30)

No worktrees needed — single repository, sequential writes within each phase.


Copyright: (c) Arda Systems 2025-2026, All rights reserved