Skip to content

feat: Production-ready MCP client plugin#1

Merged
emadomedher merged 1 commit intomainfrom
feat/mcp-client-production
Feb 10, 2026
Merged

feat: Production-ready MCP client plugin#1
emadomedher merged 1 commit intomainfrom
feat/mcp-client-production

Conversation

@emadomedher
Copy link
Copy Markdown
Owner

Production-ready MCP client - 14/14 features complete

Major Features:
- Multi-server support with error isolation
- Auto ext_ prefix prevents native tool collisions
- Pre-flight command validation (no uncaught exceptions)
- Health monitoring with auto-recovery (60s intervals)
- Rate limiting (concurrent + per-minute)
- Metrics & observability (/mcp-metrics command)
- Protocol completeness (resources, prompts)
- Hot reload capability (/mcp-reload command)
- Comprehensive test suite (13 test cases)

P0 Features (Critical):
✅ Auto ext_ prefix for collision prevention
✅ MCP-to-MCP collision detection
✅ Pre-flight command check
✅ Error isolation (one bad server != crash)
✅ Tool discovery (/mcp command)
✅ Graceful degradation

P1 Features (Should Have):
✅ Expanded config validation
✅ Health monitoring & auto-restart
✅ Resource cleanup (no zombie processes)
✅ Basic test coverage

P2 Features (Nice to Have):
✅ Rate limiting (maxConcurrent, maxPerMinute)
✅ Metrics endpoint (/mcp-metrics)
✅ Resources & Prompts support
✅ Hot reload (/mcp-reload)

Testing:
- Crash-tested with invalid configurations
- Verified error isolation (3/4 servers working)
- Confirmed zombie process cleanup
- Production deployment verified (51 tools loaded)

Documentation:
- Comprehensive README (666 lines)
- Implementation summary with lessons learned
- Troubleshooting guide
- Configuration examples

Files:
- index.ts (995 lines)
- index.test.ts (219 lines, 13 tests)
- README.md (updated)
- IMPLEMENTATION-SUMMARY.md (new)

Status: Production Ready ✅
@emadomedher emadomedher merged commit bb32a01 into main Feb 10, 2026
13 of 25 checks passed
emadomedher pushed a commit that referenced this pull request Mar 3, 2026
… and docs (openclaw#16761)

Add inline file attachment support for sessions_spawn (subagent runtime only):

- Schema: attachments[] (name, content, encoding, mimeType) and attachAs.mountPath hint
- Materialization: files written to .openclaw/attachments/<uuid>/ with manifest.json
- Validation: strict base64 decode, filename checks, size limits, duplicate detection
- Transcript redaction: sanitizeToolCallInputs redacts attachment content from persisted transcripts
- Lifecycle cleanup: safeRemoveAttachmentsDir with symlink-safe path containment check
- Config: tools.sessions_spawn.attachments (enabled, maxFiles, maxFileBytes, maxTotalBytes, retainOnSessionKeep)
- Registry: attachmentsDir/attachmentsRootDir/retainAttachmentsOnKeep on SubagentRunRecord
- ACP rejection: attachments rejected for runtime=acp with clear error message
- Docs: updated tools/index.md, concepts/session-tool.md, configuration-reference.md
- Tests: 85 new/updated tests across 5 test files

Fixes:
- Guard fs.rm in materialization catch block with try/catch (review concern #1)
- Remove unreachable fallback in safeRemoveAttachmentsDir (review concern openclaw#7)
- Move attachment cleanup out of retry path to avoid timing issues with announce loop

Co-authored-by: Tyler Yust <[email protected]>
Co-authored-by: napetrov <[email protected]>
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