Skip to content

v0.1.2 — MCP Server

Latest

Choose a tag to compare

@Rohithmatham12 Rohithmatham12 released this 30 Jun 21:27
· 6 commits to master since this release

What's New

MCP Server (contextos serve)

ContextOS now runs as a Model Context Protocol server — AI agents can call it directly as a tool instead of running CLI commands.

pip install "rm-contextos[mcp]"
contextos serve --stdio /path/to/project

6 tools exposed:

  • scan_repo — index a repo (incremental cache, only re-scans changed files)
  • pack_context — get task-relevant context pack with token savings report
  • list_files — rank all files by relevance to a task
  • get_file — read a file with automatic secret redaction
  • get_summary — static analysis summary (imports, exports, symbols)
  • churn_report — most-modified files from git history

Claude Desktop integration:

{
  "mcpServers": {
    "contextos": {
      "command": "contextos",
      "args": ["serve", "--stdio", "/path/to/project"]
    }
  }
}

Git Churn Scoring

Files modified frequently in recent git history now get a scoring boost. Shown in list_files output as churn:Ncommits.

Incremental Scan Cache

Re-scanning an unchanged repo is now near-instant — files with matching content hashes are skipped.

Token Savings Report

contextos pack now shows:

  Token savings vs no ContextOS
    Without ContextOS : ~284,000 tokens  (entire repo, 126 files)
    With ContextOS    : ~8,000 tokens  (15 files)
    Saved             : ~276,000 tokens (97% reduction)

Install:

pip install rm-contextos          # base
pip install "rm-contextos[mcp]"   # + MCP server
pip install "rm-contextos[all]"   # everything