feat: Add CCW MCP server and tools integration

- Introduced `ccw-mcp` command for running CCW tools as an MCP server.
- Updated `package.json` to include new MCP dependencies and scripts.
- Enhanced CLI with new options for `codex_lens` tool.
- Implemented MCP server logic to expose CCW tools via Model Context Protocol.
- Added new tools and updated existing ones for better functionality and documentation.
- Created quick start and full documentation for MCP server usage.
- Added tests for MCP server functionality to ensure reliability.
This commit is contained in:
catlog22
2025-12-13 09:14:57 +08:00
parent 15122b9ebb
commit d4e59770d0
20 changed files with 1829 additions and 200 deletions

View File

@@ -577,19 +577,14 @@ async function execute(params) {
*/
export const smartSearchTool = {
name: 'smart_search',
description: `Unified search with intelligent mode selection.
description: `Intelligent code search with multiple modes.
Modes:
- auto: Classify intent and recommend optimal search mode (default)
- exact: Precise literal matching via ripgrep
- fuzzy: Approximate matching with typo tolerance
- semantic: Natural language understanding via LLM/embeddings
- graph: Dependency relationship traversal
Usage:
smart_search(query="function main", path=".") # Auto-select mode
smart_search(query="def init", mode="exact") # Exact match
smart_search(query="authentication logic", mode="semantic") # NL search
Features:
- Multi-backend search coordination
- Result fusion with RRF ranking
- Configurable result limits and context`,
Modes: auto (default), exact, fuzzy, semantic, graph`,
parameters: {
type: 'object',
properties: {