analyze-codebase-for-mcplisted
Install: claude install-skill pjt222/agent-almanac
# Analyze Codebase for MCP
Scan a codebase to discover functions, REST endpoints, CLI commands, and data access patterns that are good candidates for MCP tool exposure, then produce a structured tool specification document.
## When to Use
- Planning an MCP server for an existing project and need to know what to expose
- 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
- Generating a tool specification document to hand off to `scaffold-mcp-server`
- Evaluating whether a third-party library is worth wrapping as MCP tools
## Inputs
- **Required**: Path to the codebase root directory
- **Required**: Target language(s) of the codebase (e.g., TypeScript, Python, R, Go)
- **Optional**: Existing MCP server code to compare against (gap analysis)
- **Optional**: Domain focus (e.g., "data analysis", "file operations", "API integration")
- **Optional**: Maximum number of tools to recommend (default: 20)
## Procedure
### Step 1: Scan Codebase Structure
1.1. Use `Glob` to map the 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 metadata
1.2. Categorize files by role:
- **Entry points**: main files, route handlers, CLI commands