Skip to main content

OpenAgentMCP

Repo-aware directive generator with optional MCP server.

Reads your repository's actual state — file tree, current phase, test floor — and generates structured directives for AI coding agents. Built on a two-stage pipeline: cheap model assesses the repo, capable model writes the directive.

Install

pip install openagent-directive          # CLI only
pip install openagent-directive[mcp]     # CLI + MCP server

Usage

# Generate a directive
openagent analyze /path/to/repo --intent "add pagination to the API"

# Start MCP server for Claude Desktop
openagent serve

# Start persistent SSE service (for NSSM)
openagent serve --transport sse --port 8008

How it works

  1. Scanner reads the file tree and supporting docs (pure stdlib, no side effects)
  2. Assessor calls a cheap model to assess repo state → AssessmentResult
  3. Writer calls a capable model to generate the directive
  4. StateWriter writes docs/state/current.md atomically

Model routing

By default routes to OpenRouter. Point at your own router via env var:

OPENAGENT_BASE_URL=http://localhost:8005/v1  # RFD_Model_Router or compatible
OPENROUTER_API_KEY=your_key                  # not needed for local routing

MCP tools

When running as MCP server, two tools are available:

  • analyze_repo(repo_path, intent) — full pipeline, writes state
  • assess_repo(repo_path) — scan + assess only, read-only

Claude Desktop config

{
  "mcpServers": {
    "openagent": {
      "command": "uv",
      "args": ["run", "--with", "openagent-directive[mcp]", "openagent", "serve"],
      "cwd": "/path/to/OpenAgentMCP"
    }
  }
}

Architecture

Scanner (stdlib) → Assessor (cheap model) → Writer (capable model)
                                          → ScopeGuard (pure logic)
                                          → StateWriter (stdlib)

Two-stage routing: cheap model for repo assessment, capable model for directive generation. Both configurable via OPENAGENT_CHEAP_MODEL and OPENAGENT_CAPABLE_MODEL.

License

MIT

Metadata

Release files for openagent-directive 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openagent-directive 0.3.0
File Size Uploaded Provenance Actions
openagent_directive-0.3.0.tar.gz 106.1 kB Without provenance Details for openagent_directive-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openagent-directive 0.3.0
File Interpreter ABI Platform Actions
openagent_directive-0.3.0-py3-none-any.whl Python 3 none any Details for openagent_directive-0.3.0-py3-none-any.whl

Total release size: 120.3 kB

Release files / openagent_directive-0.3.0.tar.gz

Download URL openagent_directive-0.3.0.tar.gz
Size 106.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5d3b32359ef7bc3fe6bb5b0d09a7601f016b6aac1c718a84204906e3ec6ac64c
BLAKE2b-256 checksum
How to use checksums
fb790e1299dfbe4e78ac49d59dad3948eb49fed3e586d2940ce1650e54855486
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / openagent_directive-0.3.0-py3-none-any.whl

Download URL openagent_directive-0.3.0-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cfa6e3841618edb8a71d9056f778b7c693e2318bada9f7cd275b53451d3d690e
BLAKE2b-256 checksum
How to use checksums
c3a20e607212a7ef3306476120845a2690b93c5ac5fd0e7c64c778c380f969b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for openagent-directive 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page