mcp-github-project-manager AGENTS.md

Repository instructions for a GitHub project-management server built with domain-driven design and the MCP standard. Domain-driven design organizes code around the real business concepts, while MCP connects the server to AI assistants.

In plain words
What is it for?
Building and inspecting the server, running unit and end-to-end tests, checking coverage and formatting, and testing project-management tools with mocked or live APIs.
Why use it?
They explain the project's commands, structure, error handling, configuration rules, and testing options so changes can be made and diagnosed consistently.

Instructions file for CodexOpenCode

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 instructions/kunwarvivek/mcp-github-project-manager/agents-md
Clone the repo
git clone --depth 1 https://github.com/kunwarVivek/mcp-github-project-manager

Made for: Codex, OpenCode.

Per session 3,572 This file is loaded in full into every session.
When invoked 3,572 The same file — it is already loaded in full.
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.03572 $0.03572
Opus 5 $0.01786 $0.01786
Sonnet 5 $0.00714 $0.00714
Haiku 4.5 $0.00357 $0.00357

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

Security

Grade A, and why

mcp-github-project-manager AGENTS.md 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 yesterday.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 238 lines

How it starts

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

Commands

Task Command
Build npm run build (tsc → fix-imports.js → chmod)
Dev (watch) npm run dev (tsx — ts-node cannot load under TS 7)
Unit tests npm test · core only npm run test:core · AI npm run test:ai
E2E (mock) npm run test:e2e · tools npm run test:e2e:tools
E2E (live API) E2E_REAL_API=true npm run test:e2e:tools:real
Coverage npm run test:coverage
Lint / format npm run lint (Biome) · npm run format
Inspect MCP server npm run inspect

Architecture (DDD, MCP stdio server)

  • src/index.ts — entry; boots an McpServer (@modelcontextprotocol/server v2, 2026-07-28 spec) via serveStdio, which negotiates the protocol revision per connection. Each tool is registered with registerTool; all of them share one dispatchTool carrying the shutdown gate, in-flight tracking and result formatting. Wires ToolRegistry + ProjectManagementService through src/container.ts (tsyringe DI).
  • Tool errors: an execution failure returns {content, isError: true} so the model can see and recover from it. A JSON-RPC error is reserved for protocol faults (unknown tool). Note v2 validates arguments against the declared inputSchema before the handler runs, so ToolValidator never sees a missing required field.
  • src/domain/ — types, zod schemas, errors. No logic.
  • src/services/ — business logic. ProjectManagementService orchestrates per-feature services; services/ai/ holds AI SDK providers.
  • src/infrastructure/github/ (Octokit GraphQL/REST), tools/ (MCP tool defs + registry + validators), plus cache, persistence, resilience, events.
  • src/env.ts + src/cli.ts — config. CLI flags override env vars.

Environment (.env or CLI flags; CLI wins)

  • Required: GITHUB_TOKEN, GITHUB_OWNER, GITHUB_REPO.
  • GitHub credential chain, first hit wins: --token CLI flag → $SECRETS_DIR/GITHUB_TOKEN file → GITHUB_TOKEN env → gh auth token. The gh fallback means a developer with a working gh login needs no configuration at all; disable it with GH_CLI_TOKEN_FALLBACK=false (it is also off automatically under NODE_ENV=test, so tests never shell out).
  • GitHub App installation auth (optional, outranks the PAT when all three are set): GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY, GITHUB_APP_INSTALLATION_ID. A partial App config falls back to the PAT rather than failing, so a half-set environment cannot lock the server out.
  • Every credential read goes through getSecret()/requireToken(). Do NOT read process.env.GITHUB_TOKEN directly — that bypasses the whole chain, which is exactly how SECRETS_DIR and --token were silently broken before.
  • AI (optional, unlocks AI tools): ANTHROPIC_API_KEY, GOOGLE_API_KEY, OPENAI_API_KEY, PERPLEXITY_API_KEY; model overrides AI_MAIN_MODEL, AI_PRD_MODEL, AI_RESEARCH_MODEL, AI_FALLBACK_MODEL.
  • Optional: SYNC_ENABLED, SYNC_TIMEOUT_MS, CACHE_DIRECTORY, WEBHOOK_SECRET, WEBHOOK_PORT, SSE_ENABLED.
  • Webhook security: signature validation fails closed. With no WEBHOOK_SECRET, webhooks are rejected unless WEBHOOK_ALLOW_UNSIGNED=true (trusted dev only).
  • Secrets: set SECRETS_DIR (e.g. /run/secrets) to load any config/secret from a file named after it (Docker/k8s secret convention), checked before env vars. getSecret(name) in env.ts reads fresh (rotation-aware). Vault/AWS SM are an extension point via SecretProvider (src/infrastructure/secrets/).
  • Startup validation runs against the resolved config, not raw process.env — validating the environment directly meant a token supplied by file or CLI flag failed the required-field check and the process exited before the resolver ran.
  • Logs are redacted: redactSecrets() in infrastructure/logger strips token/secret/password/apiKey/authorization-shaped keys from anything the logger stringifies, and GitHubConfig.token is non-enumerable so JSON.stringify cannot emit the PAT.

Read the full file on GitHub · 238 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. yesterday First seen · 238 lines · 3,572 tokens per session scan A a8ab01866304

Subscribe to this mod's changes

mcp-github-project-manager AGENTS.md is an instructions file published in the GitHub repository kunwarVivek/mcp-github-project-manager (95 stars, last pushed 21d ago), licensed MIT. It adds 3,572 tokens to every session, about $0.0179 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-30.