mcp-planning
Plan: MCP SDK v2 design decisions before implementation; mcp-router owns workflows, mcp-server and mcp-client own builds.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- mcp-planning
- metadata
- { "category": "technique" }
- description
- Plan: MCP SDK v2 design decisions before implementation; mcp-router owns workflows, mcp-server and mcp-client own builds.
- user-invocable
- false
03 SKILL.md 正文
MCP Planning
Decide-first. Record implementation choices before write MCP server or client code.
Steps
-
Inspect project: Find every
@modelcontextprotocol/dependency and import. v2 use several scoped packages, so inspect each rather than search one package name.Done: Existing MCP code, dependencies, schema libraries, runtime constraints identified.
-
Resolve decision set: Evaluate every trigger in Decisions. Ask about each triggered decision; apply stated default to every other decision.
Done: All 16 decisions have explicit value, every remote HTTP Auth value explicit, every non-default value traced to question.
-
Ask tight: Ask one triggered question per turn. Offer two stated choices; Auth ask its access gate first, three method choices only when authenticated, Era has three choices. Re-ask one vague answer, then use first listed choice. Treat "you choose" as that default choice.
Done: Each asked decision has one unambiguous selected value.
-
Write record: List all 16 decisions in record format, mark each
(asked)or(default).Done: Record exhaustive, every entry carries one source tag.
-
Append dated section: Add completed record to
docs/mcp-decisions.md, create when absent, preserve every earlier dated section.Done:
docs/mcp-decisions.mdhas new complete dated section, prior sections unchanged. -
Present result: Show completed record before implementation begins.
Done: User has exact recorded decisions guiding implementation.
Decisions
- Scope (default
server) — Ask when codebase not establish server versus client. Choices: Server | Client. - Transport (default
stdio) — Ask for remote, multi-user, or deployed use. Choices: stdio | Streamable HTTP. Gotcha: current SSE and WebSocket transports absent; frozen SSE remains at@modelcontextprotocol/server-legacy/sse. - Auth (default
nonefor local or stdio use) — For every remote HTTP deployment, ask: Authenticated | Private no-auth. Recordnoneonly for explicit private deployment; public endpoints use mcp-auth. When authenticated, choose: OAuth (clientOAuthClientProvider; serverrequireBearerAuth) | Custom bearer (clientAuthProvider; serververifyAccessToken) | Legacy authorization-server helpers (server-legacy/auth) | Machine auth (clientClientCredentialsProviderforclient_credentialsgrant,PrivateKeyJwtProviderforprivate_key_jwt(RFC 7523), orCrossAppAccessProviderfor cross-app access (SEP-990); for non-human callers such as jobs, backends, service accounts). Gotchas: token endpoints requirehttps:except loopback (InsecureTokenEndpointError, SEP-2207); key credentials byctx.issuer(SEP-2352). - Tool Surface (default
Few simple) — Ask for more than three tools or complex operations. Choices: Many simple | Few big with settings. - Input Schemas (default Standard Schema via
zod ^4.2.0) — Silently retain project's existing Standard Schema library; otherwise use zod. UsefromJsonSchema()only for existing raw JSON Schema. - Interaction (default
Request-response) — Ask for long-running work or required user input. Choices: Progress/Cancel | Multi-round-trip. - Prompts (default
None) — Ask for reusable or UI-integrated prompts. Choices: Static | Completable. - Error Strategy (default
Protocol errors only) — Apply without question. - Distribution (default
Local) — Ask for publishing or sharing. Choices: npm | Local. - Testing (default
1 test per tool) — Apply without question. - Session/Resumability (default
Stateless) — Ask when HTTP need multi-request client state. Choices: Stateless |EventStore-backed resumable sessions. - Notifications (default
None) — Ask when clients need list or data change updates. Choices:subscriptions/listenstream | None. - Era / Protocol Revision (default both eras,
legacy: 'stateless') — Ask only when modern 2026 behavior required. Three choices: Both eras (legacy: 'stateless') | Modern only (legacy: 'reject') | 2025-era only (hand-wired*StreamableHTTPServerTransport; nocreateMcpHandlerorlegacy:setting). - Runtime (default Node ≥20, ESM-first) — Apply without question; v2 also ships CommonJS build.
- Staging (default
one-shot) — Ask when large, multi-directory codebase already uses SDK v1. Choices: one-shot | stage by directory. Execute selected posture in mcp-migration step 1. - Elicitation (default
None) — Ask when handler must question end user mid-call. Choices:ctx.mcpReq.elicitInput(form mode withrequestedSchema, or URL mode withurl+elicitationId; client must declare matchingelicitationcapability) | None. For tools/call, prompts/get, and resources/read handlers requesting input mid-call on older protocol revisions whereelicitInputthrows, returninput_requiredresult type instead.
Record Format
Append dated section to docs/mcp-decisions.md listing every decision:
# MCP Decision Record — YYYY-MM-DD
1. Scope: server exposing 4 tools. (asked)
2. Transport: stdio. (default)
3. Auth: none. (default)
4. Tool Surface: few simple tools. (default)
5. Input Schemas: zod ^4.2.0. (default)
6. Interaction: request-response. (default)
7. Prompts: none. (default)
8. Error Strategy: protocol errors only. (default)
9. Distribution: local. (default)
10. Testing: 1 test per tool. (default)
11. Session/Resumability: stateless. (default)
12. Notifications: none. (default)
13. Era / Protocol Revision: both eras (legacy: 'stateless'). (default)
14. Runtime: Node ≥ 20, ESM-first. (default)
15. Staging: one-shot. (default)
16. Elicitation: none. (default)
04 同仓库更多 Skills
unslop
Use when writing or editing prose a person will read, or when text sounds AI-generated.
show-me
Use when asked to show, diagram, or walk through how code fits together or what a change does, or before explaining a multi-file flow in prose.
pr
Use when writing or updating a pull request description, or before running `gh pr create`.
commit
Use when writing a commit message, or before running `git commit`.
write-specs
Spec a feature's observable behavior. Use when asked for requirements, when a request says what the system should do but not how, or to capture what a built system already guarantees. Not for how to build it (write-plan).
write-skills
Write, fix, or audit a skill's frontmatter, trigger description, and body. Use when a skill is asked for, never fires, or fires at the wrong moment. Not for a hook (write-hooks) or the plugin manifest and catalog.