Skip to content

feat(serve): started upstream initialization in background#5

Open
mittalsuraj18 wants to merge 4 commits into
assimelha:masterfrom
mittalsuraj18:master
Open

feat(serve): started upstream initialization in background#5
mittalsuraj18 wants to merge 4 commits into
assimelha:masterfrom
mittalsuraj18:master

Conversation

@mittalsuraj18

@mittalsuraj18 mittalsuraj18 commented Apr 26, 2026

Copy link
Copy Markdown

Feat: Adds a feature that lets cmcp server start immediately while the mcp tools are loading in the background.

  • Created initializing, ready, and failed engine states for background catalog loading.
  • Returned initializing or failed errors from search and execute until the catalog is ready.
  • Guarded background loads and reloads with generation checks to prevent stale state updates.
  • Documented fast startup behavior in README.md and CLAUDE.md.

Suraj Mittal added 4 commits April 26, 2026 13:54
- Created initializing, ready, and failed engine states for background catalog loading.
- Returned initializing or failed errors from search and execute until the catalog is ready.
- Guarded background loads and reloads with generation checks to prevent stale state updates.
- Documented fast startup behavior in README.md and CLAUDE.md.
- Added a reusable skill that directs agents to discover with search and invoke tools through execute.
- Documented client-specific installation paths and routing guidance in the README.
… as any server is ready

Servers now connect concurrently (one tokio::spawn per server) instead of
sequentially. search() and execute() return results immediately with whatever
servers are connected so far, appending a status note about pending servers.
The old EngineState enum (Initializing/Ready/Failed) is replaced with an
always-ready ProxyState that grows incrementally as servers connect.

Key changes:
- ClientPool: add new(), add_server(), RwLock<HashMap> for interior mutability
- Sandbox: catalog behind Arc<RwLock<Catalog>>, read-locked per call
- ProxyEngine: per-server concurrent spawning, pending/failed tracking
- search/execute: always succeed (no more 'still initializing' errors)
- Trim SKILL.md from 180 to ~30 lines: keep only essential rules,
  naming gotcha, and initialization retry note
- Add frontmatter description triggers and compatibility field
- Replace per-client install table in README with Agent Skills
  standard discovery paths
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