AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Mastermind

mcp-xcrft-mastermind · by xcrft

Local Rust codegraph and verifiable workflow for AI coding agents — project maps, change and test impact, MCP queries, and diff-backed implementation audits.

— No reviews yet
0 installs
37 views
0.0% view→install

Install

$ agentstack add mcp-xcrft-mastermind

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • ✓ Prompt-injection patterns
  • ✓ Secret / credential exfiltration
  • ✓ Dangerous shell & filesystem operations
  • ✓ Untrusted network calls
  • ✓ Known-malicious package signatures

What it can access

  • ✓ Network access No
  • ✓ Filesystem access No
  • ✓ Shell / process execution No
  • ✓ Environment & secrets No
  • ✓ Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-xcrft-mastermind)

Reliability & compatibility

✓ Security review passed
0 installs to date
— no reviews yet
● 2mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Mastermind? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Mastermind

A local codegraph and verifiable workflow for AI coding agents.

Mastermind gives Claude Code, Codex, Cursor, and Continue a structural view of your code: what exists, who calls it, what a change can affect, and which tests are relevant. Its optional workflow checks an agent's plan and implementation against the real repository instead of trusting the agent's memory.

What you get

| When you need to… | Mastermind gives you… | |---|---| | Understand an unfamiliar repository | Components, entry points, dependencies, hotspots, and cycles | | Change code safely | Changed symbols, affected callers, API crossings, and blast radius | | Choose focused tests | Direct, transitive, and heuristic test candidates with evidence | | Verify agent work | Pre-execution spec checks, post-execution diff audits, and signed evidence |

The codegraph and deterministic style miner stay on your machine in local SQLite databases. Agent-assisted modes are explicit: init without --no-claude may send repository content through the configured Claude CLI, while miner profile --deep sends bounded samples for synthesis.

Try it in two minutes

Requires Node.js 24+. Prebuilt binaries are included; Rust is not required.

1. Install once

npm install -g @xcraftmind/mastermind

Connect the client you use:

mastermind install --client all                # Claude + Codex workflow adapters and MCP
mastermind setup cursor --scope user --write   # Cursor MCP
mastermind setup continue --scope user --write # Continue MCP

Use mastermind install for Claude only or mastermind install --client codex for Codex only. mastermind doctor --workflow --client all verifies that the ownership manifests, artifact lists, and SHA-256 content match the current package.

Global installation and MCP registration do not require a project or mastermind init. Setup is dry-run-first when --write is omitted.

2. Use it in a repository

cd your-project
mastermind index .
mastermind map .
mastermind impact --since main

index is enough for codegraph, map, and impact features. Run mastermind init only when you want the complete spec-driven project workflow:

mastermind init
mastermind doctor

See [Getting started](docs/getting-started.md) for global vs per-repository state, project-local installation, and client-specific setup.

Core workflows

Map a project

mastermind map .                     # readable architecture briefing
mastermind map src --format mermaid  # scoped diagram
mastermind map . --format json       # stable schema for automation
mastermind map . --production-only   # hide tests, fixtures, examples, generated/vendor code

The map highlights languages, components, entry points, dependency boundaries, hotspots, and cycles without asking an agent to grep the entire repository.

Understand change and test impact

mastermind impact --since main
mastermind impact --since HEAD~1 --format json

Impact analysis compares a Git baseline with committed, staged, unstaged, and untracked work. It reports symbol-level changes, affected callers, component crossings, and candidate tests. Focused candidates are evidence for prioritization, not a replacement for the repository's required test suite.

Review architecture invariants

Use /mastermind-architecture-review for changes that cross service, queue, state, retry, migration, or public-contract boundaries. It reconstructs the real runtime path and tests source-of-truth ownership, idempotency, and backward compatibility against concrete failure sequences.

Ask why the project works this way

mastermind history "webhook dedupe"
mastermind why "why is webhook dedupe durable?"

History searches active and archived CONTEXT files, canonical task specs, executor reports, audits, .mastermind/releases/, and reviewed lessons. A candidate lesson is only an audit signal until semantic review. The index is only a retrieval layer: Markdown remains authoritative, and the answer separates observed records from inference and missing proof.

Carry personal style across repositories

mastermind miner profile .

The deterministic miner writes a user-global ~/.mastermind/style.md and style.db; it works without mastermind init. Planner and executor treat the profile as advisory. Repository code, formatter/linter policy, the approved contract, product behavior, and security always win. Corpus-level code-shape observations are diagnostic rather than coding instructions; /mastermind-style-deep adds a qualitative, evidence-backed portrait that normal re-mining preserves.

Query the graph from an agent

The MCP server exposes 24 bounded tools for symbol search, callers/callees, imports, architecture maps, change impact, test impact, cycles, API surface, and project history. The same engine is available through the CLI.

"Does parseConfig exist?"
"Who calls createSession?"
"What could this branch affect?"
"Which tests are connected to these changes?"

See the [mmcg reference](docs/reference/mmcg.md) for the complete tool and protocol contract.

Use only the workflow depth you need

Small changes stay direct: query the graph, implement, and run the repository checks. Normal delegated work uses a compact verified contract. Auth, migrations, public APIs, data-loss, and supply-chain changes use strict review.

flowchart LR
  U["Request"] --> M{"Risk"}
  M -->|small| D["Direct: impact + tests"]
  M -->|normal| P["Verified spec"]
  M -->|high| S["Strict spec + review"]
  P --> V["Verify"]
  S --> V
  V --> E["Implement"]
  E --> A["Audit the real diff"]
  D --> R["Report evidence"]
  A --> R

Direct mode needs only mastermind index .; no init or task spec is required. Verified and strict tasks keep planner, executor, and controller ownership separate, and post-flight requires a canonical executor report. Read [How the workflow works](docs/workflow.md) for the exact modes and task lifecycle.

Produce verifiable audit evidence

Mastermind can seal audit results with SHA-256 integrity and detached Ed25519 signatures. The included GitHub Action verifies repository, baseline, head, worktree, signature, and policy inputs before evidence is published.

See [Verifiable audits and GitHub Action](docs/github-action.md).

What is global and what is per project?

| State | Scope | Created by | |---|---|---| | mastermind CLI | Global or project-local npm install | npm install | | Claude workflow agents and skills | Global | mastermind install | | Codex workflow skills | Global | mastermind install --client codex | | MCP client registration | User or project, depending on client | mastermind setup … | | Personal style profile | User-global, optional | mastermind miner profile or mastermind init | | .mastermind/mmcg.db codegraph | Per repository | mastermind index . or mastermind init | | Task specs and project context | Per repository, optional | mastermind init |

Support

  • Clients: Claude Code, Codex, Cursor, Continue, and generic MCP stdio clients
  • Languages: Python, TypeScript/TSX, JavaScript/JSX, Rust, C#, Go, Java, PHP, and C/C++
  • Platforms: macOS arm64/x64, Linux glibc and musl arm64/x64, Windows x64
  • Privacy: deterministic parsing and storage are local; explicit agent-assisted modes disclose when repository samples are sent to the configured AI client

The graph is syntactic rather than compiler-semantic. Dynamic dispatch, reflection, re-exports, overload resolution, and cross-language calls can reduce precision. Mastermind reports bounded results and precision notes instead of presenting incomplete analysis as certain.

Documentation

  • [Getting started](docs/getting-started.md)
  • [Claude Code](docs/integrations/claude-code.md) · [Codex](docs/integrations/codex.md) · [Cursor](docs/integrations/cursor.md) · [Continue](docs/integrations/continue.md) · [Generic MCP](docs/integrations/generic-mcp.md)
  • [Workflow](docs/workflow.md)
  • [mmcg technical reference](docs/reference/mmcg.md)
  • [GitHub Action and audit security model](docs/github-action.md)
  • [Changelog](CHANGELOG.md)

Build from source

Rust 1.96+ is required for source builds:

cargo install mmcg
# or from a clone
cargo install --path mcp/servers/mmcg

The cargo-installed command is mmcg; the npm package exposes the same binary as both mastermind and mmcg.

Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for the project layout, checks, evals, and pull-request conventions.

License

MIT — see [LICENSE](LICENSE).

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.