Back to MCP Servers

Perseus

Compile-before-context MCP server with 13 tools. Pre-resolves workspace state (git, services, file ops, memory federation, multi-agent coordination) into markdown briefings. Single-file Python, MIT. Published as io.github.tcconnally/perseus.

developer-toolspythongithubagent
By tcconnally
172Updated 1 day agoPythonMIT

Installation

npx -y perseus

Configuration

{
  "mcpServers": {
    "perseus": {
      "command": "npx",
      "args": ["-y", "perseus"]
    }
  }
}

How to use

  1. Run the installation command above (if needed)
  2. Open your Claude Code settings file (~/.claude/settings.json)
  3. Add the configuration to the mcpServers section
  4. Restart Claude Code to apply changes

Perseusβ„’ πŸͺž β€” One command. Zero orientation.

smithery badge pip install perseus-ctx && cd your-project && perseus quickstart

Perseus demo β€” before/after cold-start

CI PyPI MCP Registry License: MIT Status: Patent Pending perseus.observer β†’

<!-- mcp-name: io.github.tcconnally/perseus -->

πŸ›‘οΈ Product Family

Perseus is the live context engine. Six specialized products extend it:

ProductDescriptionPage
Mimir23 MCP tools β€” persistent memory with FTS5, entities, layers, confidence decay/mimir/
MCTS120 security analyzers for MCP servers β€” tool poisoning, prompt injection, credential leaks/mcts/
PR Pilot5-agent autonomous PR review pipeline β€” graduated autonomy L1β†’L3/pr-pilot/
Blast RadiusGitLab-native dependency impact analysis β€” 1 mention, instant risk report/blast-radius/
Rapid AgentDual-backend memory agent (Elastic ↔ Engram-rs) β€” Google Cloud Hackathon/rapid-agent/
Qwen MemoryAgent that gets smarter every session β€” Qwen Cloud Hackathon/qwen-memory/
Anna Recall435-line Anna AI plugin β€” persistent memory powered by Mimir/anna-recall/

Mimir β€” Persistent Memory (MCP)

Mimir is the persistent memory backend for Perseus β€” a lightweight Rust MCP server with SQLite + FTS5. Zero network calls, no API keys, no embeddings model required. v0.5.0 provides 23 MCP tools across structured entities, layers, confidence decay, journal events, and state management: mimir_recall, mimir_store, mimir_entity_*, mimir_layer_*, mimir_decay_config, mimir_stats, mimir_health, and more.

πŸ“„ Product page β†’ | ⭐ GitHub β†’

Install:

curl -sSL https://raw.githubusercontent.com/tcconnally/mimir/main/scripts/bootstrap.sh | bash

Hermes Agent β€” add to ~/.hermes/config.yaml:

mcp_servers:
  mimir:
    command: "mimir"
    args: ["--db", "~/.mimir/data/mimir.db"]

Claude Desktop / Cursor β€” add to your MCP settings:

{
  "mcpServers": {
    "mimir": {
      "command": "mimir",
      "args": ["--db", "/home/YOU/.mimir/data/mimir.db"]
    }
  }
}

Perseus integration β€” add to .perseus/config.yaml:

mimir:
  enabled: true
  command: ["mimir", "--db", "~/.mimir/data/mimir.db"]

Then add @memory mode=search query="your terms" to .perseus/context.md and Perseus resolves live recall at render time.

Works with any MCP-compatible assistant.

πŸ† Hackathons β€” 3 Entries Submitted

Google Cloud Rapid Agent (Elastic Partner Track)

Status: Submitted | Deadline: June 11, 2026 | Devpost: perseus-cmzeu9 πŸ“„ Product page β†’

Perseus is entered in the Google Cloud Rapid Agent Hackathon (Elastic Partner Track). The submission demonstrates persistent agent memory across three consecutive sessions, with live backend swap from Elastic Cloud to Engram-rs (self-hosted).

Qwen Cloud Hackathon (MemoryAgent Track)

Status: Submitted | πŸ“„ Product page β†’

Agent that gets smarter every session. Persistent memory, confidence decay, cross-session compounding. Track requirements checklist with contradiction demo beat.

GitLab Transcend Hackathon (Showcase Track)

Status: Submitted | πŸ“„ Product page β†’

Blast Radius β€” GitLab-native dependency impact analysis via Orbit knowledge graph. One @mention, instant risk report.

Build with Gemini XPRIZE

Status: Submitted | πŸ“„ Product page β†’

PR Pilot β€” 5-agent autonomous PR review pipeline. Gemini API, Google Cloud Run, Stripe integration.

Wire Perseus to Your Assistant (MCP)

Perseus implements the Model Context Protocol (MCP), exposing tools over stdio or SSE transport. Every tool resolves live workspace state at invocation time β€” no stale cache, no pre-computed snapshots.

⚠️ Security Gate: Shell-executing directives (@query, @agent, @services command:) require export PERSEUS_ALLOW_DANGEROUS=1. Without it, shell directives are silently skipped.

Quick Start (MCP Server)

pip install perseus-ctx
perseus mcp serve                          # stdio (Claude Desktop, Claude Code, Cursor, Codex)
perseus mcp serve --transport sse --port 8420  # SSE (remote agents, multi-machine)

Assistant-Specific Wiring

Pick your assistant and add the config block shown:

Hermes Agent (~/.hermes/config.yaml):

mcp_servers:
  perseus:
    command: perseus
    args: ["mcp", "serve", "--workspace", "/path/to/workspace"]

Then verify with hermes mcp test perseus. Tools appear as mcp_perseus_* in your session.

Use an absolute path for --workspace. Perseus's non-interactive shell context has a limited PATH β€” a bare perseus command works in the Hermes MCP config because Hermes resolves it from the user's environment, but the workspace path must be absolute.

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "perseus": {
      "command": "perseus",
      "args": ["mcp", "serve", "--workspace", "/path/to/workspace"]
    }
  }
}

Claude Code (.mcp.json in your project root):

{
  "mcpServers": {
    "perseus": {
      "command": "perseus",
      "args": ["mcp", "serve"]
    }
  }
}

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "perseus": {
      "command": "perseus",
      "args": ["mcp", "serve"]
    }
  }
}

Codex (~/.codex/config.toml or per-project .mcp.json):

{
  "mcpServers": {
    "perseus": {
      "command": "perseus",
      "args": ["mcp", "serve"]
    }
  }
}

Rovo Dev (.mcp.json in repo root):

{
  "mcpServers": {
    "perseus": {
      "command": "perseus",
      "args": ["mcp", "serve"]
    }
  }
}

Rovo Dev also reads AGENTS.md at session start β€” pair MCP tools with rendered context for a complete setup.

Docker

docker build -t perseus .
docker run --rm -v /path/to/workspace:/workspace perseus mcp serve

See Container Runtime for full Docker and compose deployment.

MCP Registry

Published as io.github.tcconnally/perseus on the official MCP Registry (search "perseus"). Includes server.json for zero-config discovery.


MCP Tools

<!-- test-count: 1032 -->

24 MCP tools resolve live state at invocation time. Two sensitive tools (perseus_query and perseus_agent) require explicit mcp.tool_allowlist opt-in because they execute commands in the user's local shell β€” not sandboxed, full user permissions apply:

ToolDescription
perseus_servicesHealth-check running services
perseus_queryRun a shell command and return stdout
perseus_readRead file contents
perseus_listList directory or structured data
perseus_treeTree view of directory
perseus_envRead environment variables
perseus_dateCurrent date/time
perseus_waypointLatest checkpoint summary
perseus_sessionRecent session digests
perseus_healthContext maintenance report
perseus_driftOracle drift report
perseus_memoryMnΔ“mΔ“ narrative memory (+ Mimir persistent store)
perseus_mimirRecall persistent memories via Mimir BM25
perseus_skillsList available skills with staleness flags
perseus_includeInclude and render another file
perseus_agentExecute local agent subprocess
perseus_agoraTask board from tasks/*.md
perseus_inboxAgent message inbox
perseus_promptSystem prompt block
perseus_validateValidate rendered block against schema
perseus_toolRun allowlisted external tool
perseus_perseusFetch context from remote Perseus instance
perseus_get_contextFull rendered workspace context
perseus_get_healthDaedalus context-maintenance heuristics

The Problem

Every AI assistant session starts cold. Before useful work begins, the assistant burns turns on orientation β€” checking which services are running, reading stale config files, rediscovering where you left off. Static markdown files (.cursorrules, CLAUDE.md) rot immediately. The port you wrote down has changed. The container that was "always running" hasn't been started since Tuesday.

Stale context isn't neutral. It's drag.


The Fix: Resolve Before Context

Perseus is a pre-processor. You write directives in a source document β€” @query, @services, @waypoint β€” and Perseus resolves them at render time, then outputs plain markdown. The assistant reads verified facts, not instructions to go find facts.

Without Perseus                     With Perseus
────────────────────────────────    ──────────────────────────────────
"Port is 3001 (check .env)"    β†’   Port: 3001
"47 tests (may be stale)"      β†’   Tests: all passing (run 8s ago)
"Check docker ps first"        β†’   mongo-dev: Up 4h 12m
"Where did we leave off?"      β†’   Checkpoint: webhook handler written,
                                              pending test run

Perseus replaces your assistant's context file β€” CLAUDE.md, .cursorrules, AGENTS.md, .hermes.md β€” with rendered live context. If you already have a hand-written context file, migrate its static content into .perseus/context.md first. Perseus overwrites the output file on every render. Add @perseus to line 1 of your source and it becomes live. The assistant never sees directive syntax. It sees a document that was already true.


Quick Start (30 Seconds to Live Context)

perseus quickstart          # auto-detects project, scaffolds context, renders

Smart init detects your stack and tailors the setup:

  • Python β†’ @memory queries for test patterns, type annotations
  • Rust β†’ trait bounds, lifetime annotations, cargo config
  • Node.js/TS β†’ npm scripts, ESLint config, component patterns
  • Go, Java, C/C++, Docker β€” all detected automatically
  • Falls back to a sensible generic query when unknown

The output file name is the only assistant-specific detail:

AssistantOutput file
Claude CodeCLAUDE.md
Hermes Agent.hermes.md (top priority) or AGENTS.md
Cursor.cursorrules or .cursor/context.md
CodexAGENTS.md
Rovo DevAGENTS.md
Any otherWhatever your assistant reads at session start

Hermes priority order: .hermes.md β†’ AGENTS.md β†’ CLAUDE.md. Render to .hermes.md for highest priority.

Keep it fresh with cron, launchd, systemd, or perseus watch:

# Linux systemd (auto-refresh every 5 minutes)
perseus systemd .perseus/context.md --output AGENTS.md --interval 5m --install --enable

# macOS launchd
perseus launchd .perseus/context.md --o

…
View source on GitHub