视觉画布设计
canvas-design
基于设计原则创作静态视觉作品,用于海报与品牌图形。
analyze-codebase-for-mcp【文档与办公】Analyze an arbitrary codebase to identify functions, APIs, and data sources suitable for exposure as MCP tools, producing a tool specification document. Use when planning an MCP server for an existing project, auditing a codebase before wrapping it as an AI-accessible tool surface, comparing what a codebase can do versus what is already exposed via M…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Scan codebase → fns, REST endpoints, CLI cmds, data access candidates → MCP tool exposure → structured tool spec doc.
scaffold-mcp-server1.1. Glob → dir tree, src dirs:
src/**/*.{ts,js,py,R,go,rs} → src files**/routes/**, **/api/**, **/controllers/** → endpoints**/cli/**, **/commands/** → CLI entries**/package.json, **/setup.py, **/DESCRIPTION → dep metadata1.2. Categorize by role:
1.3. Count files, LOC, exported symbols → gauge size.
→ Categorized inventory w/ role annotations.
If err: Too large (>10K files) → narrow via domain focus. No src found → verify root path + lang params.
2.1. Grep exported fns + public APIs:
export (async )?function, export default, module.exports_ prefix, @app.route, @router#' @export roxygen2.2. Per candidate extract:
2.3. REST APIs, also extract:
2.4. Sort by potential utility (public, documented, well-typed first).
→ 20-100 candidates w/ extracted metadata.
If err: Few candidates → broaden → include internal that could be public. Sparse docs → flag as risk.
3.1. Per candidate → MCP tool criteria:
3.2. Score 1-5:
3.3. Filter ≥3. Flag score-2 → "future candidates" needing refactor.
→ Scored + filtered list w/ suitability rationale.
If err: Most <3 → codebase needs refactor pre-MCP. Doc gaps → recommend (add types, extract pure fns, wrap side effects).
4.1. Per selected (≥3) draft spec:
- name: tool_name
description: >
One-line description of what the tool does.
source_function: module.function_name
source_file: src/path/to/file.ts:42
parameters:
param_name:
type: string | number | boolean | object | array
description: What this parameter controls
required: true | false
default: value_if_optional
returns:
type: string | object | array
description: What the tool returns
side_effects:
- description of any side effect
estimated_latency: fast | medium | slow
suitability_score: 5
4.2. Group logical categories ("Data Queries", "File Ops", "Analysis", "Config").
4.3. Identify deps between tools ("list_datasets" before "query_dataset").
4.4. Need wrappers?
→ Complete YAML spec w/ categories, deps, wrapper notes.
If err: Ambiguous → Step 2 → more src detail. Param types uninferable → flag manual review.
5.1. Final doc sections:
5.2. Save mcp-tool-spec.yml (machine) + mcp-tool-spec.md (human).
5.3. Existing MCP server provided → gap analysis:
→ Complete doc → consumable by scaffold-mcp-server.
If err: >200 tools → split modules w/ cross-refs. No candidates → "readiness assessment" doc w/ refactor recs.
Grep file writes, network, DB.scaffold-mcp-server — use out spec → working MCPbuild-custom-mcp-server — manual impl refconfigure-mcp-server — connect to Claude Code/Desktoptroubleshoot-mcp-connection — debug after deployreview-software-architecture — arch review for tool surfacesecurity-audit-codebase — audit pre-external exposure