mcpField
M
MCP-OS · Model Context Protocol Orchestration System

MCP-OS · Model Context Protocol Orchestration System

Local
github.com/giao-123-sunProductivity3Updated 77w ago

About MCP-OS · Model Context Protocol Orchestration System

MCP-OS is an orchestration system that retrieves MCP servers relevant to a task, aimed at developers seeking to limit tool context for LLMs. Its current retriever selects services through vector search and injects only matching descriptions; on-demand starting and stopping remain on the roadmap.

Key features

  1. 01Retrieve MCP servers by task using vectors
  2. 02Inject descriptions only for matching servers
  3. 03Support pluggable vector back ends
  4. 04Serve retrieval over HTTP and SSE

Use cases

  1. 01Select relevant MCP servers for a task
  2. 02Reduce tool descriptions in prompts
  3. 03Replace or customize the vector store back end

MCP support

The project provides an MCP Retriever that can be configured as an MCP server or queried through a REST endpoint to find MCP servers matching a task. Runtime start/stop and policy sandbox features are planned.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

MCP-OS · Model Context Protocol Orchestration System

Let your large language model focus on solving tasks—not wading through a sea of MCPs.

👉 查看中文版 README


✨ Project Vision

As the Model Context Protocol (MCP) ecosystem explodes, hundreds of MCP servers create three familiar headaches:

Pain PointDescription
Prompt BloatLengthy MCP descriptions crowd the context window; the model spends more tokens picking tools than planning / analysis.
Connection HygieneWe must constantly track which MCPs are alive and whether they satisfy the current task.
Resource & SecurityAlways-on MCP servers consume memory and expose interfaces, increasing attack surface.

MCP-OS aims to:

“Manage MCPs the way an operating system manages processes—load on demand, unload when idle.”


🌟 Current Phase: MCP-Retriever (Completed ✅)

  1. Vector Retrieval — Embed task descriptions and retrieve Top-k MCPs from a vector index.
  2. Slim Prompt Template — Inject only the Top-k MCP descriptions, saving ~70 % prompt tokens on average.
  3. Pluggable Back-ends — Default openai/embeddings; swap in FAISS, Qdrant, Milvus, etc.

📖 Details in /packages/retriever.


🛣️ Roadmap

MilestoneFeatureStatus
v0.1MCP-Retriever – vector search✅ Released
v0.2MCP-Retriever - light version⏳ In progress
v0.3Health-Check Daemon – auto heartbeat & pruning⏳ In progress
v0.4Runtime Manager – on-demand MCP start/stop🗓 Planned
v1.0Policy Sandbox – fine-grained auth, rate, cost🗓 Planned

⚙️ Quick Start

1. Clone & Install
git clone https://github.com/your-org/mcp-os.git
cd mcp-os
npm install      # or npm / yarn
2. Build the Vector Index
# Scan local / remote MCP metadata and create an index
npm run build:index --src ./mcp_list.json --out ./index
3. Start the Retriever Server
npm run start:retriever
# Default listens on 127.0.0.1:5500 (HTTP + SSE)
4. Wire It into Your LLM / Agent
// Example: Claude Desktop
{
  "mcpServers": {
    "mcp-os": {
      "command": "/absolute/path/to/mcp-os/bin/retriever.js"
    }
  }
}

Or call the REST endpoint:

curl -X POST http://localhost:5500/match \
  -H "Content-Type: application/json" \
  -d '{"task": "Scrape a web page and extract its title"}'

Sample response:

{
  "matches": [
    {
      "id": "web-scraper",
      "score": 0.89,
      "functions": ["fetchHtml", "querySelector"]
    }
  ]
}

📂 Repository Layout

mcp-os/
├─ packages/
│  ├─ retriever/        # Phase 1: vector retrieval
│  ├─ health-check/     # Phase 2: heartbeat daemon (WIP)
│  └─ runtime-manager/  # Phase 3: load/unload (planned)
├─ scripts/             # CLI helpers
├─ examples/            # Usage demos
└─ docs/                # Architecture & deep dives

🧩 MCP List Format

mcp_list.json describes MCP metadata:

{
  "web-scraper": {
    "name": "Web Scraper MCP",
    "description": "Fetches HTML and parses DOM.",
    "functions": ["fetchHtml", "querySelector"]
  },
  "calc": { ... }
}

❓ FAQ

Retrieval quality is poor—how do I tune it?
  • Increase topK for higher recall.
  • Switch to a stronger embedding model.
  • Refine task-text normalization rules.
How do I plug in my own vector store?

Implement the VectorStore interface: src/store/yourStore.ts.


🤝 Contributing

  1. Fork the repo
  2. Create a branch feature/awesome-stuff
  3. Open a PR and link related issues
  4. Wait for CI + review 🎉

📜 License

Apache License v2


🙏 Acknowledgements

  • The Model Context Protocol community for the open specification
  • MCP Inspector for debugging
  • Everyone who files issues or PRs—thank you! ❤️

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.