Skip to content

feat(mcp): add complete MCP support with remote registry integration#544

Merged
echobt merged 4 commits intomasterfrom
feat/mcp-support-1769991973
Feb 2, 2026
Merged

feat(mcp): add complete MCP support with remote registry integration#544
echobt merged 4 commits intomasterfrom
feat/mcp-support-1769991973

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Feb 2, 2026

Summary

Add comprehensive Model Context Protocol (MCP) support with remote registry integration at registry.cortex.foundation/mcp.

Changes

MCP Notification System

  • Add notification types for MCP server lifecycle events (connected, disconnected, tools changed)
  • Integrate notifications with prompt harness for LLM awareness of MCP state changes
  • Enable next-message injection for MCP status updates

Remote Registry Client

  • Implement McpRegistryClient for fetching MCP servers from registry
  • In-memory cache with configurable TTL (default 1 hour)
  • Persistent disk cache for offline resilience
  • Search by name, description, tags, or category
  • Fallback servers when registry is unavailable

TUI MCP Manager Updates

  • Add RegistryEntry and RegistrySource types for unified entry handling
  • Update modal to display category and required env indicators
  • Async loading support with RegistryLoadState enum

Testing

  • cargo check passes for all modified crates
  • Manual verification of MCP notification flow

Files Changed

  • src/cortex-engine/src/mcp/ - Registry client and manager updates
  • src/cortex-prompt-harness/src/notifications.rs - LLM notification system
  • src/cortex-tui/src/modal/mcp_manager/ - TUI modal updates

Implement McpRegistryClient for fetching MCP servers from
registry.cortex.foundation/mcp with local TTL-based caching.

Features:
- In-memory cache with configurable TTL (default 1 hour)
- Persistent disk cache for offline resilience
- Search by name, description, tags, or category
- Fallback servers when registry is unavailable
- Configurable registry URL and cache directory
- Add RegistryEntry and RegistrySource types in registry.rs
- Add From<RegistryServer> impl to convert remote entries
- Add get_local_registry_entries() and get_remote_server_config()
- Add RegistryLoadState enum in types.rs
- Update SelectFromRegistry mode to include entries and load_state
- Update handlers to work with new RegistryEntry structure
- Update rendering to display category and required env indicators
- Re-export remote registry types for future async loading
@echobt echobt merged commit 6577e50 into master Feb 2, 2026
2 of 4 checks passed
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