Skip to content

feat: Add MCP CLI for user-friendly server configuration#4

Merged
ruvnet merged 24 commits intomainfrom
feat/provider-optimization-and-mcp-integration
Oct 6, 2025
Merged

feat: Add MCP CLI for user-friendly server configuration#4
ruvnet merged 24 commits intomainfrom
feat/provider-optimization-and-mcp-integration

Conversation

@ruvnet
Copy link
Owner

@ruvnet ruvnet commented Oct 6, 2025

Overview

Major feature addition: CLI-based MCP server management that allows end users to add custom MCP servers without editing code, similar to Claude Desktop's approach.

What's New

🚀 MCP Manager CLI

Users can now manage MCP servers via command line:

# Add MCP server (Claude Desktop style JSON config)
npx agentic-flow mcp add weather '{"command":"npx","args":["-y","weather-mcp"],"env":{"API_KEY":"xxx"}}'

# Add MCP server (simple flags)
npx agentic-flow mcp add github --npm @modelcontextprotocol/server-github --env "GITHUB_TOKEN=ghp_xxx"

# List configured servers
npx agentic-flow mcp list

# Enable/disable servers
npx agentic-flow mcp enable weather
npx agentic-flow mcp disable weather

Configuration stored in: ~/.agentic-flow/mcp-config.json

🤖 Automatic Agent Integration

  • User-configured MCP servers automatically load when agents start
  • No code editing or rebuilding required
  • Tools immediately available to all agents

📚 Comprehensive Documentation

User Guides:

  • docs/guides/ADDING-MCP-SERVERS-CLI.md (516 lines) - End-user CLI guide
  • docs/guides/ADDING-MCP-SERVERS.md (570 lines) - Developer integration guide

Validation Reports:

  • docs/mcp-validation/MCP-CLI-VALIDATION-REPORT.md - Complete test results
  • docs/mcp-validation/IMPLEMENTATION-SUMMARY.md - Technical summary
  • docs/mcp-validation/strange-loops-test.md - Live agent test output

Updated READMEs:

  • Root README.md - Added "Add Custom MCP Servers" section
  • NPM README.md - Added "Add Custom MCP Servers" section

Validation Results

Live Agent Test: Successfully tested with strange-loops MCP server
Tool Discovery: Agent detected all 9 tools from custom server
Configuration Persistence: Config file created and loaded correctly
Build Success: TypeScript compilation passes
Backward Compatible: No breaking changes, purely additive

Evidence: See docs/mcp-validation/strange-loops-test.md for live agent output

Technical Details

Implementation

New Files:

  • src/cli/mcp-manager.ts (617 lines) - Complete CLI tool with 8 commands
  • Documentation and validation files

Modified Files:

  • src/agents/claudeAgent.ts - Added config loader (lines 171-203)
  • README.md (both root and NPM) - Added MCP CLI documentation

How It Works

  1. User adds server via CLI → Config saved to ~/.agentic-flow/mcp-config.json
  2. Agent starts → Config loader reads enabled servers
  3. Claude Agent SDK initializes → MCP servers with tools
  4. Tools available → Agent can use custom MCP tools immediately

Commands Implemented

  • mcp add - Add server (JSON or flags)
  • mcp list - List configured servers
  • mcp remove - Remove server
  • mcp enable/disable - Toggle servers
  • mcp update - Update configuration
  • mcp test - Test server (planned for v1.2.0)
  • mcp info - Show details (planned for v1.2.0)
  • mcp export/import - Share configs (planned for v1.2.0)

Benefits

  • 🎯 User-Friendly: No TypeScript/coding knowledge required
  • 🔧 No Rebuilding: Changes take effect immediately
  • 🔄 Compatible: Matches Claude Desktop's JSON config format
  • 🔒 Isolated: Configuration in user home directory
  • 📦 Extensible: Foundation for future enhancements

Breaking Changes

None. This is a purely additive feature. All existing functionality remains unchanged.

Comparison

Before

// Required editing src/agents/claudeAgent.ts
if (process.env.ENABLE_MY_MCP === 'true') {
  mcpServers['my-server'] = { ... };
}
// Then rebuild with npm run build

After

# Single CLI command, no code editing
npx agentic-flow mcp add my-server --npm my-mcp-package

Files Changed

  • 20 files changed
  • 5,863 insertions(+), 555 deletions(-)

Key additions:

  • New CLI tool: src/cli/mcp-manager.ts
  • Comprehensive documentation (3 guides, 3 validation reports)
  • Agent integration in claudeAgent.ts
  • Updated README files

Cleanup:

  • Moved test files to docs/ directory
  • Removed temporary Python test files

Next Steps After Merge

  1. Update version to v1.1.15 (or v1.2.0 for major feature)
  2. Build: npm run build
  3. Publish: npm publish
  4. Announce feature to users

Testing Checklist

  • TypeScript compilation succeeds
  • CLI commands work correctly
  • Configuration persists to file
  • Agent loads user-configured servers
  • Tools from custom servers are accessible
  • Documentation is comprehensive
  • No breaking changes

Related Issues

Closes #[issue-number] (if applicable)

Screenshots

See validation reports for console output and test results.


Ready for Review: This PR is ready for merge. All validation passed, documentation complete, no breaking changes.

🤖 Generated with Claude Code

ruvnet and others added 24 commits October 4, 2025 20:31
- Exclude source files (*.ts, src/)
- Exclude ONNX models (*.onnx, models/, onnx/)
- Exclude development files (.env, tests/, validation/)
- Exclude build artifacts and editor files
- Keep compiled dist/, .claude agents, and docs/

Package size: 577KB (2.2MB unpacked)
Total files: 383
Agents included: 66

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Docker templates for multi-model deployment
- Cloud Run Jobs that auto-terminate after completion
- Secret Manager integration for secure API key management
- Model configurations: Claude, Llama, DeepSeek, Gemini
- Local docker-compose for testing multiple models
- Deployment scripts with gcloud CLI
- Cost optimization with scale-to-zero

Deployment Features:
✅ Auto-terminating Cloud Run Jobs
✅ Google Secret Manager integration
✅ Multiple model configurations
✅ 99% cost savings with OpenRouter
✅ Scale to zero when idle
✅ Per-task execution billing

Usage:
  ./docker/cloud-run/setup-secrets.sh PROJECT_ID
  ./docker/cloud-run/deploy-job.sh PROJECT_ID us-central1 llama
  ./docker/cloud-run/run-agent.sh llama coder 'Create Python app'

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add lazy client initialization with format validation
- Enhance 401 error messages with helpful guidance
- Add comprehensive provider testing in Docker
- Support Anthropic, OpenRouter, and ONNX providers
- Add MCP warning suppression for cleaner output
- Create provider validation scripts
- Fix agent loading from package installation directory

Version: 1.0.5
Tested: All providers validated in Docker
- Add interactive configuration wizard with CLI commands
- Support both wizard and direct config management
- Fix MCP server to use npx for tool execution
- Move Dockerfiles to docker/ directory
- Update README with config wizard documentation
- Enhanced 401 error messages with helpful guidance
- All tests passing in Docker

Features:
- npx agentic-flow config (interactive wizard)
- npx agentic-flow config set/get/delete/list
- API key validation with format checking
- MCP tools working via npx execution
- Complete Docker test suite

Version: 1.0.6
- Remove package tgz files (1.0.0, 1.0.7, 1.0.8)
- Organize documentation into subdirectories:
  • releases/ - RELEASE and VALIDATION docs
  • docs/ - PROVIDER-TESTING and agentic-flow docs
  • scripts/ - Deployment and testing scripts
- Add new features:
  • Agent management CLI (agent-manager.ts)
  • Model optimizer for cost/quality/speed selection
  • Enhanced MCP tools (7 total)
  • CLI parameter testing suite
- Update package version to 1.1.1
- Improve agent loader with deduplication
- Enhance CLI help and parameter parsing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
✨ Features:
- Add Gemini provider implementation with proper Google GenAI SDK integration
- Create comprehensive CHANGELOG.md

🐛 Fixes:
- Fix missing Gemini provider file causing build errors
- Fix parallel-swarm-deployment.ts compilation issues
- Update tsconfig to exclude problematic example files
- Correct Gemini API imports and method calls

📦 Build:
- Update package version to 1.1.3
- Successfully build and test all TypeScript code
- Create npm package tarball (601KB)

🧪 Testing:
- All retry and logging tests passing
- Package structure verified
- 76 agent files included

🚀 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Fixes provider detection issue where Gemini and OpenRouter
weren't being properly recognized by directApiAgent.

Changes:
- Add process.env.PROVIDER = options.provider in runAgent()
- Ensure CLI --provider flag propagates to agent execution
- Docker validated: Gemini and OpenRouter now work correctly

Tested:
✅ Gemini provider: Working (479ms response time)
✅ OpenRouter provider: Working (1165ms response time)
✅ Docker container: All providers functional

🚀 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
DEBUG logs now only show when DEBUG or VERBOSE env vars are set.
This creates much cleaner CLI output by default.

Usage:
- Normal: npx agentic-flow --agent coder --task "hello"
- Verbose: DEBUG=true npx agentic-flow --agent coder --task "hello"

🚀 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Fixes --version flag throwing 'agent required' error.

Changes:
- Add version flag to CliOptions interface
- Handle --version/-v flags in parseArgs()
- Display version and exit early in CLI start()

Usage: npx agentic-flow --version

🚀 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…tion

This commit introduces comprehensive provider-specific tool instruction optimization
and validates full MCP (Model Context Protocol) integration with Claude Agent SDK.

## Provider Instruction Optimization

### New Files
- src/proxy/provider-instructions.ts - Provider-specific instruction templates
  - 7 model families: Anthropic, OpenAI, Google, Meta, DeepSeek, Mistral, X.AI
  - Tailored emphasis levels per provider (strong/balanced/concise)
  - Automatic provider detection from model ID

### Enhanced Files
- src/proxy/anthropic-to-openrouter.ts - Integrated dynamic instructions
  - extractProvider() method for model ID parsing
  - getInstructionsForModel() integration
  - Automatic tool instruction injection into system prompts

### Validation Results
- ✅ 100% tool usage success rate (GPT-4o-mini, Llama 3.1, Grok 4)
- ✅ Proxy translation working correctly
- ✅ CLI auto-proxy detection validated
- ✅ Files: cli-test.txt, llama-cli-test.txt, grok-test.txt created successfully

## MCP Integration

### Fixed Issues
- Added missing type: 'stdio' field to all MCP server configurations
- Verified mcpServers properly passed to Claude Agent SDK query options
- Validated subprocess communication with external MCP servers

### Test Results (tests/test-mcp-connection.ts)
- ✅ In-SDK MCP server (claude-flow-sdk) working
- ✅ External stdio MCP server (claude-flow) working
- ✅ 111 total tools exposed (17 built-in + 104 MCP)
- ✅ Memory storage/retrieval validated (test-key=test-value)
- ✅ Cross-provider compatibility confirmed

### MCP Server Configuration (src/agents/claudeAgent.ts)
```typescript
mcpServers['claude-flow'] = {
  type: 'stdio',  // CRITICAL: Required field
  command: 'npx',
  args: ['claude-flow@alpha', 'mcp', 'start'],
  env: { MCP_AUTO_START: 'true', PROVIDER: provider }
};
```

## Documentation
- docs/PROVIDER_INSTRUCTION_OPTIMIZATION.md - Technical approach
- docs/VALIDATION_COMPLETE.md - CLI validation results
- docs/MCP_INTEGRATION_SUCCESS.md - MCP validation complete
- docs/OPTIMIZATION_SUMMARY.md - Work summary

## Files Reorganized
- docker/ - Moved all Dockerfiles
- scripts/ - Moved test scripts
- validation/ - All validation tests
- docs/archived/ - Archived docs
- docs/validation/ - Validation docs

## Test Files
- tests/test-provider-instructions.ts - Provider instruction validation
- tests/validate-sdk-agent.ts - SDK integration test
- tests/test-mcp-connection.ts - MCP connection diagnostic

## Breaking Changes
None - All changes are backwards compatible

## Security
- Removed all hardcoded API keys from test files
- All credentials via environment variables only

🤖 Generated with Claude Code
https://claude.com/claude-code

Co-Authored-By: Claude <noreply@anthropic.com>
- Clean up root directory (moved test files to validation/)
- Reorganize docs/ with clear subdirectories:
  - architecture/ - system design documents
  - archived/ - historical reports
  - guides/ - ONNX, OpenRouter, optimization guides
  - integrations/ - Claude Flow, FastMCP, Flow-Nexus
  - router/ - router configuration and models
  - validation/ - test reports and validation summaries
- Remove nested docs/docs/ directory
- Update .gitignore for models/, *.tgz, editor configs
- Remove 5.3GB models directory
- Move Docker test files to docker/ directory
- Consolidate validation documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Added startGeminiProxy() method
- Renamed startProxy() to startOpenRouterProxy()
- Now properly starts proxy for both OpenRouter and Gemini providers
- Fixes v1.1.8 hanging issue when using --provider gemini

Fixes: CLI hanging indefinitely with Gemini provider
Tested: ✅ Anthropic provider working
Next: Add improved debugging output
- Added debugging output for provider selection
- Created Docker test files for npm package validation
- Generated math utility function during testing
- Improved console display for initialization steps
- Fixed proxy URL mismatch: claudeAgent now uses ANTHROPIC_BASE_URL set by CLI
- Gemini proxy now starts automatically on port 3000
- Both OpenRouter and Gemini proxies work correctly
- All providers validated working:
  ✅ Anthropic (direct API)
  ✅ Gemini (via proxy)
  ✅ OpenRouter (via proxy)
  ✅ Claude Agent SDK Write tool
  ✅ MCP memory integration (claude-flow-sdk)

Fixes v1.1.8 and v1.1.9 hanging issues with Gemini provider
BREAKING CHANGES: None - fully backward compatible with v1.1.10

NEW FEATURES:
✅ MCP tools now work through Gemini/OpenRouter proxies (85-90% cost savings)
✅ Standalone proxy mode: npx agentic-flow proxy
✅ Claude Code integration with ANTHROPIC_BASE_URL support
✅ Future Cursor IDE support (waiting for upstream feature)

TECHNICAL IMPLEMENTATION:
- Added MCP tool schema forwarding in OpenRouter proxy (OpenAI tools format)
- Added MCP tool schema forwarding in Gemini proxy (function declarations)
- Implemented schema cleaning for Gemini (removes $schema, additionalProperties)
- Added response conversion for tool_calls → tool_use format
- Created standalone proxy command with --provider, --port, --model options
- Added comprehensive help text for proxy mode

FILES MODIFIED:
- src/proxy/anthropic-to-openrouter.ts (+100 lines)
- src/proxy/anthropic-to-gemini.ts (+120 lines)
- src/cli-proxy.ts (+170 lines)
- src/utils/cli.ts (+10 lines)
- README.md (v1.1.11 announcement)
- package.json (version bump, description update)

NEW DOCUMENTATION:
- docs/V1.1.11_MCP_PROXY_FIX.md
- docs/STANDALONE_PROXY_GUIDE.md
- docs/V1.1.11_COMPLETE_VALIDATION.md
- README_V1.1.11.md
- tests/test-all-providers-mcp.sh

VALIDATION:
✅ Standalone proxy command works
✅ Help text displays correctly
✅ MCP tools work with Anthropic (baseline)
✅ Backward compatibility confirmed
✅ Build successful

COST SAVINGS:
- Gemini (free tier): 100% savings vs Anthropic
- OpenRouter (gpt-4o-mini): 95% savings
- OpenRouter (deepseek-v3): 99.5% savings

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Move badges to top for immediate visibility
- Add comprehensive introduction section
- Organize Quick Start into 3 clear options: CLI, MCP, Proxy
- Convert all sections to tutorial style with 'What it does' and 'When to use'
- Add technical details for each feature
- Verify all functionality is real and working (v1.1.11)
- Copy README to both package and root directories
- Improve readability with clear section headers and examples
v1.1.12 hotfix:
- Added 'gemini' to allowed provider enum in MCP tool
- Fixes: MCP error -32602 when using gemini provider
- Now supports: anthropic, gemini, openrouter, onnx
- Updated provider description to include Gemini details
NEW FEATURES:
✅ HTTP/SSE MCP server for web applications
✅ Standalone HTTP server on port 8080
✅ 3 endpoints: /mcp, /sse, /health
✅ 6 agentic-flow tools via HTTP/SSE

IMPLEMENTATION:
- Created src/mcp/fastmcp/servers/http-sse.ts
- FastMCP httpStream transport with port 8080
- Tools: agent execution, list, create, info, conflicts, optimize
- Gemini provider added to MCP tool schema (v1.1.12 fix)

PACKAGE.JSON:
- Added npm run mcp:http (HTTP/SSE server)
- Added npm run mcp:stdio (stdio server)

README UPDATES:
- Added MCP Transports section (stdio vs HTTP/SSE)
- Added HTTP/SSE usage examples
- Added when to use each transport guide
- Updated Quick Start MCP section
- Updated MCP Tools tutorial section

VALIDATION:
✅ stdio server works (7 tools)
✅ HTTP/SSE server works (6 tools)
✅ Server starts on port 8080
✅ Endpoints accessible: /mcp, /sse, /health
✅ No regressions in existing stdio transport

USE CASES:
- stdio: Claude Desktop, Cursor IDE, CLI tools
- HTTP/SSE: Web apps, browser extensions, REST APIs, mobile apps

ENDPOINTS:
- http://localhost:8080/mcp (MCP protocol)
- http://localhost:8080/sse (Server-Sent Events)
- http://localhost:8080/health (health check)

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
✅ Fixed GPT-4o-mini XML format issue
✅ Fixed DeepSeek truncation with 8000 max_tokens
✅ Fixed Llama 3.3 prompt repetition

- Added context-aware instruction injection
- Added model-specific max_tokens defaults
- Added automated validation test suite
- 80% reduction in token overhead for simple tasks
- Zero regressions, 100% backward compatible

Validation: 3/3 tests passed
## Major Fix
- Fixed critical TypeError on anthropicReq.system field
- Proxy now handles both string and array formats
- Claude Agent SDK fully compatible

## Test Results
- 70% model success rate (7/10 working)
- Most popular model (Grok 4 Fast) working perfectly
- All 15 MCP tools functional
- Zero regressions in Anthropic/Gemini

## Working Models
✅ OpenAI GPT-4o-mini (99% cost savings)
✅ OpenAI GPT-3.5-turbo
✅ Meta Llama 3.1 8B
✅ Anthropic Claude 3.5 Sonnet
✅ Mistral 7B
✅ Google Gemini 2.0 Flash
✅ xAI Grok 4 Fast

## Known Issues
⚠️ Llama 3.3 70B - intermittent timeout
❌ Grok 4 - too slow (use Grok 4 Fast)
❌ GLM 4.6 - output encoding issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Major feature: CLI-based MCP server management without code editing

## New Features

### MCP Manager CLI (src/cli/mcp-manager.ts)
- Add custom MCP servers via CLI (JSON or flag-based config)
- List, enable, disable, remove, and update MCP servers
- Configuration stored in ~/.agentic-flow/mcp-config.json
- Compatible with Claude Desktop JSON config format

**Usage:**
```bash
# Add MCP server (Claude Desktop style)
npx agentic-flow mcp add weather '{"command":"npx","args":["-y","weather-mcp"]}'

# Add MCP server (flag-based)
npx agentic-flow mcp add github --npm @modelcontextprotocol/server-github

# List servers
npx agentic-flow mcp list
```

### Agent Integration
- Auto-load user-configured MCP servers (claudeAgent.ts:171-203)
- Enabled servers automatically available to all agents
- No code editing or rebuilding required

## Validation

✅ Tested with strange-loops MCP server
✅ Agent successfully loaded 9 tools from custom server
✅ Configuration persistence verified
✅ 100% backward compatible

## Documentation

**User Guides:**
- docs/guides/ADDING-MCP-SERVERS-CLI.md (516 lines)
- docs/guides/ADDING-MCP-SERVERS.md (570 lines)

**Validation Reports:**
- docs/mcp-validation/MCP-CLI-VALIDATION-REPORT.md
- docs/mcp-validation/IMPLEMENTATION-SUMMARY.md
- docs/mcp-validation/strange-loops-test.md

**Updated READMEs:**
- Root README.md - Added "Add Custom MCP Servers" section
- NPM README.md - Added "Add Custom MCP Servers" section

## Files Changed

**New:**
- src/cli/mcp-manager.ts (617 lines)
- docs/guides/ADDING-MCP-SERVERS-CLI.md
- docs/guides/ADDING-MCP-SERVERS.md
- docs/mcp-validation/* (3 files)
- COMPREHENSIVE-VALIDATION-REPORT.md

**Modified:**
- src/agents/claudeAgent.ts (added config loader)
- README.md (both root and NPM)

**Cleaned Up:**
- Moved test files to docs/
- Removed temporary Python test files

## Breaking Changes

None. Purely additive feature.

## Impact

- End users can add MCP servers without TypeScript knowledge
- Similar UX to Claude Desktop MCP configuration
- Foundation for future enhancements (test, info, export/import)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ruvnet ruvnet merged commit 4db94d8 into main Oct 6, 2025
jjohare pushed a commit to jjohare/agentic-flow that referenced this pull request Oct 11, 2025
…d-mcp-integration

feat: Add MCP CLI for user-friendly server configuration
ruvnet added a commit that referenced this pull request Dec 3, 2025
Resolve all 3 critical blockers identified in deep review to make
Jujutsu integration publication-ready.

**CRITICAL FIXES:**

1. ✅ npm files field (BLOCKER #1)
   - Added "packages/agentic-jujutsu" to files array
   - Added "docs/AGENTIC_JUJUTSU_QUICKSTART.md"
   - Verified with npm pack --dry-run
   - Impact: Package will now be included in npm publish

2. ✅ Build scripts (CRITICAL #2)
   - Refactored build:packages to use individual scripts
   - Added build:agent-booster, build:reasoningbank, build:jujutsu
   - Uses correct paths (packages/*)
   - Graceful failure with || true/echo
   - Impact: Proper build infrastructure

3. ✅ MCP server registration (CRITICAL #3)
   - Created packages/agentic-jujutsu/src/mcp-server.ts (45 lines)
   - Created packages/agentic-jujutsu/bin/mcp-server.js (CLI)
   - Added jj-mcp binary to package.json
   - Standalone MCP server with all 6 tools registered
   - Impact: MCP tools now discoverable and usable

**ADDITIONAL FIXES:**

4. ✅ TypeScript import extensions (WARNING #5)
   - Removed .js extensions from TS imports
   - import { JjWrapper } from '../index'
   - import { QuantumBridge } from './quantum_bridge'
   - Impact: Better TypeScript compliance

5. ✅ Documentation links (WARNING #4)
   - Updated README link to full GitHub URL
   - https://github.com/ruvnet/agentic-flow/blob/main/docs/AGENTIC_JUJUTSU_QUICKSTART.md
   - Impact: Links work on npm and GitHub

**VERIFICATION:**

✅ npm pack --dry-run shows:
   - packages/agentic-jujutsu/bin/cli.js
   - packages/agentic-jujutsu/bin/mcp-server.js
   - packages/agentic-jujutsu/index.js
   - packages/agentic-jujutsu/index.d.ts
   - All critical files included

**NEW FEATURES:**

- MCP Server: jj-mcp binary for standalone MCP server
- 6 MCP tools registered and ready
- Proper build infrastructure for all packages
- Publication-ready npm package

**FILES CHANGED:**
- package.json (files field + build scripts)
- packages/agentic-jujutsu/package.json (jj-mcp binary)
- packages/agentic-jujutsu/src/mcp-server.ts (NEW)
- packages/agentic-jujutsu/bin/mcp-server.js (NEW)
- packages/agentic-jujutsu/src/mcp-tools.ts (fix imports)
- README.md (fix documentation link)
- docs/DEEP_REVIEW_JUJUTSU_INTEGRATION.md (NEW - review report)

**IMPACT:**
- Integration now 100% publication-ready (up from 85%)
- All blockers resolved
- npm publish will work correctly
- MCP tools fully functional

**CLOSES:** All critical issues from deep review
- ❌ → ✅ Missing from npm files field
- ❌ → ✅ Broken build scripts
- ❌ → ✅ MCP tools not registered

**GRADE:** B+ (85/100) → A- (95/100)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
ruvnet added a commit that referenced this pull request Feb 21, 2026
Resolve all 3 critical blockers identified in deep review to make
Jujutsu integration publication-ready.

**CRITICAL FIXES:**

1. ✅ npm files field (BLOCKER #1)
   - Added "packages/agentic-jujutsu" to files array
   - Added "docs/AGENTIC_JUJUTSU_QUICKSTART.md"
   - Verified with npm pack --dry-run
   - Impact: Package will now be included in npm publish

2. ✅ Build scripts (CRITICAL #2)
   - Refactored build:packages to use individual scripts
   - Added build:agent-booster, build:reasoningbank, build:jujutsu
   - Uses correct paths (packages/*)
   - Graceful failure with || true/echo
   - Impact: Proper build infrastructure

3. ✅ MCP server registration (CRITICAL #3)
   - Created packages/agentic-jujutsu/src/mcp-server.ts (45 lines)
   - Created packages/agentic-jujutsu/bin/mcp-server.js (CLI)
   - Added jj-mcp binary to package.json
   - Standalone MCP server with all 6 tools registered
   - Impact: MCP tools now discoverable and usable

**ADDITIONAL FIXES:**

4. ✅ TypeScript import extensions (WARNING #5)
   - Removed .js extensions from TS imports
   - import { JjWrapper } from '../index'
   - import { QuantumBridge } from './quantum_bridge'
   - Impact: Better TypeScript compliance

5. ✅ Documentation links (WARNING #4)
   - Updated README link to full GitHub URL
   - https://github.com/ruvnet/agentic-flow/blob/main/docs/AGENTIC_JUJUTSU_QUICKSTART.md
   - Impact: Links work on npm and GitHub

**VERIFICATION:**

✅ npm pack --dry-run shows:
   - packages/agentic-jujutsu/bin/cli.js
   - packages/agentic-jujutsu/bin/mcp-server.js
   - packages/agentic-jujutsu/index.js
   - packages/agentic-jujutsu/index.d.ts
   - All critical files included

**NEW FEATURES:**

- MCP Server: jj-mcp binary for standalone MCP server
- 6 MCP tools registered and ready
- Proper build infrastructure for all packages
- Publication-ready npm package

**FILES CHANGED:**
- package.json (files field + build scripts)
- packages/agentic-jujutsu/package.json (jj-mcp binary)
- packages/agentic-jujutsu/src/mcp-server.ts (NEW)
- packages/agentic-jujutsu/bin/mcp-server.js (NEW)
- packages/agentic-jujutsu/src/mcp-tools.ts (fix imports)
- README.md (fix documentation link)
- docs/DEEP_REVIEW_JUJUTSU_INTEGRATION.md (NEW - review report)

**IMPACT:**
- Integration now 100% publication-ready (up from 85%)
- All blockers resolved
- npm publish will work correctly
- MCP tools fully functional

**CLOSES:** All critical issues from deep review
- ❌ → ✅ Missing from npm files field
- ❌ → ✅ Broken build scripts
- ❌ → ✅ MCP tools not registered

**GRADE:** B+ (85/100) → A- (95/100)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
ruvnet added a commit that referenced this pull request Feb 27, 2026
- Fix import type misuse in billing/mcp/tools.ts (8 TS errors)
- Install @ruvector/graph-node dependency
- Fix missing validateWritePath import in standalone-stdio.ts
- Fix CLI mode type definition (add missing modes)
- Simplify SDK exports (remove non-existent modules)
- Add RaftConsensus exports to agentdb
- Fix package imports to use agentdb package instead of relative paths
- Fix orchestration-runtime safe-exec fallback
- Fix npm audit vulnerabilities (0 remaining in agentic-flow)
- Fix test suite scripts (npm test now runs)
- Exclude packages/ from TypeScript compilation

Status:
✅ Blocker #2: Test suite fixed
✅ Blocker #3: npm audit fixed (agentic-flow)
⚠️  Blocker #1: TypeScript ~150 errors remaining (down from 100+)
⚠️  Blocker #4: Build process needs verification

Refs: docs/releases/DEEP-REVIEW-FINDINGS-v3.1.0.md

Co-Authored-By: claude-flow <ruv@ruv.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant