MCP Tools Overview
dev-agent provides five tools through the Model Context Protocol (MCP). These tools give AI assistants deep understanding of your codebase.
Available Tools
| Tool | Purpose |
|---|---|
dev_search | Semantic code search with snippets |
dev_refs | Query code relationships (callers/callees) |
dev_map | Codebase structure overview with change frequency |
dev_patterns | File pattern analysis (finds similar code, compares 5 pattern categories) |
dev_status | Repository indexing status and health checks |
New in v0.8.5
dev_patternsβ Refactored for comprehensive pattern analysis (5 categories)- Performance β 5-10x faster pattern analysis via batch scanning (500-1000ms)
- Accuracy β Semantic similarity using document embeddings, extension filtering
- Simplified API β Streamlined interface (no action parameter needed)
v0.5.0
- Enhanced indexing β Arrow functions, React hooks, and exported constants now extracted
dev_searchβ Better coverage of modern JavaScript patterns (hooks, utilities, configs)
v0.4.0
dev_mapβ Change frequency indicators (π₯ hot, βοΈ active, π recent)
v0.3.0
dev_refsβ Query what calls what and what is called by whatdev_mapβ Get codebase overview with hot paths and smart depth
How Tools Are Exposed
Tools are exposed via the Model Context Protocol (MCP), a standard for AI tool integration:
AI Assistant (Cursor/Claude)
β
β MCP Protocol (stdio)
βΌ
dev-agent MCP Server
β
βββ SearchAdapter β dev_search
βββ RefsAdapter β dev_refs
βββ MapAdapter β dev_map
βββ InspectAdapter β dev_patterns
βββ StatusAdapter β dev_status (includes health checks)Tool Response Format
All tools return structured responses with metadata:
{
"success": true,
"data": {
"query": "authentication",
"content": "1. [89%] class: AuthMiddleware..."
},
"metadata": {
"tokens": 245,
"duration_ms": 123,
"results_total": 15,
"results_returned": 10
}
}The metadata field helps AI assistants understand:
- Token cost of the response
- Performance metrics
- Result completeness (truncated or full)
Output Formats
Most tools support two output formats:
compact(default) β Token-efficient, markdown outputverboseβ Full JSON with all details
Next Steps
- dev_search β β Semantic code search
- dev_refs β β Relationship queries
- dev_map β β Codebase overview
Last updated on