Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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 MCP, or generating a tool spec to hand off to scaffold-mcp-server.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-14 | ✗→✓ | ▲ Improved | 116% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 43% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 69% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 90% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 105% | 0% |
Scan codebase to discover functions, REST endpoints, CLI commands, data access patterns. Good candidates for MCP tool exposure. Produce structured tool specification document.
scaffold-mcp-server1.1. Use Glob to map directory tree, focusing on source directories:
src/**/*.{ts,js,py,R,go,rs} for source files**/routes/**, **/api/**, **/controllers/** for endpoint definitions**/cli/**, **/commands/** for CLI entry points**/package.json, **/setup.py, **/DESCRIPTION for dependency metadata1.2. Categorize files by role:
1.3. Count total files, lines of code, exported symbols to gauge project size.
Got: Categorized file inventory with role annotations.
If fail: Codebase too large (>10,000 files)? Narrow scan to specific directories or modules using domain focus input. No source files found? Verify root path and language parameters.
2.1. Use Grep to find exported functions and public APIs:
export (async )?function, export default, module.exports_, @app.route, @router#' @export roxygen tags2.2. For each candidate function, extract:
2.3. For REST APIs, additionally extract:
2.4. Build candidate list sorted by potential utility (public, documented, well-typed functions first).
Got: List of 20-100 candidate functions/endpoints with extracted metadata.
If fail: Few candidates found? Broaden search to include internal functions could be made public. Documentation sparse? Flag as risk in output.
3.1. For each candidate, assess against MCP tool criteria:
3.2. Score each candidate on 1-5 scale:
3.3. Filter candidates to those scoring 3 or above. Flag score-2 items as "future candidates" requiring refactoring.
Got: Scored and filtered candidate list with suitability rationale for each.
If fail: Most candidates score below 3? Codebase may need refactoring before MCP exposure. Document gaps and recommend specific improvements (add types, extract pure functions, wrap side effects).
4.1. For each selected candidate (score >= 3), draft tool specification:
yaml- 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 tools into logical categories (e.g., "Data Queries", "File Operations", "Analysis", "Configuration").
4.3. Identify dependencies between tools (e.g., "list_datasets" should be called before "query_dataset").
4.4. Determine if any tools need wrappers to:
Got: Complete YAML tool specification with categories, dependencies, wrapper notes.
If fail: Tool specifications ambiguous? Revisit Step 2 to extract more detail from source code. Parameter types cannot be inferred? Flag for manual review.
5.1. Write final specification document with these sections:
5.2. Save as mcp-tool-spec.yml (machine-readable) and optionally mcp-tool-spec.md (human-readable summary).
5.3. Existing MCP server provided? Include gap analysis section:
Got: Complete tool specification document ready for consumption by scaffold-mcp-server.
If fail: Document exceeds reasonable size (>200 tools)? Split into modules with cross-references. Codebase has no suitable candidates? Produce "readiness assessment" document with refactoring recommendations instead.
Grep for file writes, network calls, database mutations.scaffold-mcp-server - use output spec to generate working MCP serverbuild-custom-mcp-server - manual server implementation referenceconfigure-mcp-server - connect resulting server to Claude Code/Desktoptroubleshoot-mcp-connection - debug connectivity after deploying serverreview-software-architecture - architecture review for tool surface designsecurity-audit-codebase - security audit before exposing functions externallyOther measured skills in the registry, with their headline benchmark lift.