Universal Agent Middleware
Universal Agent Middleware (UAM) v0.5.1rc1
Public Preview RC1 — read-only MCP observation for local codebases
UAM is a vendor-neutral, local-first middleware that lets any reasoning client (ChatGPT, Claude, Cursor, future agents) observe your local project workspaces in real time through a secure read-only interface — with project-level reality coverage, lifecycle tracking, and observation-based diagnostics.
What it does
Reasoning client (new session, no history needed)
│
▼
UAM MCP App (19 read-only tools)
│
▼
Optional secure MCP tunnel (outbound-only)
│
▼
Your local machine
│
▼
Registered workspaces + project reality
(my-app, api-service, etc.)A new conversation can read live repository state — HEAD, branch, files, diffs, search, project reality coverage — without copy-paste and without granting write access.
Quick start
1. Install from PyPI
python -m venv .venv && source .venv/bin/activate
pip install universal-agent-middleware==0.5.1rc1Or download the exact wheel/sdist from GitHub Release v0.5.1rc1 (byte-identical to PyPI).
2. Register workspaces
cp config/workspaces.example.json config/workspaces.json
# Edit workspace roots to match your machine
# Optional: root scope registry for autonomous discovery
cp examples/root_scopes.example.json config/root_scopes.json3. Connect your MCP client
UAM exposes 19 read-only tools over MCP stdio (session-read profile). Point your client at:
uam mcp-sdk-stdio --profile session-read \
--registry /path/to/workspaces.json \
--state-dir ~/.local/share/uamCursor — add to .cursor/mcp.json (or global MCP settings):
{
"mcpServers": {
"uam": {
"command": "uam",
"args": [
"mcp-sdk-stdio",
"--profile", "session-read",
"--registry", "/path/to/workspaces.json",
"--state-dir", "/Users/you/.local/share/uam"
]
}
}
}Claude Desktop — add to claude_desktop_config.json:
{
"mcpServers": {
"uam": {
"command": "uam",
"args": [
"mcp-sdk-stdio",
"--profile", "session-read",
"--registry", "/path/to/workspaces.json",
"--state-dir", "/Users/you/.local/share/uam"
]
}
}
}ChatGPT — requires an outbound MCP tunnel (Developer Mode). Configure tunnel credentials via environment only; see docs/adapters/MCP.md and docs/day1a/TUNNEL_RUNBOOK.md.
4. Smoke test (optional)
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2026-07-28","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | \
uam mcp-sdk-stdio --profile session-read \
--registry config/workspaces.json \
--state-dir ~/.local/share/uamDeveloper install
Contributors may use pip install -e ".[mcp]" from a git checkout instead of the PyPI release above.
Available MCP tools
Tool | Description |
| List registered workspaces, capabilities, and project grouping |
| HEAD, branch, head_state, dirty count |
| Full reasoning context in one call (project-aware, v2 schema) |
| Directory listing |
| Read text files (relative paths only) |
| Search across workspace files |
| Git HEAD, branch, working tree changes |
| Git diff (optionally scoped) |
| Recent commit history |
| Hash-chain audit log integrity |
| Multi-instance project reality snapshot with coverage diagnostics |
| List workspace instances and discovered worktrees for a project |
| List authorized RootScopes (standing trust zones) |
| Autonomously discover all projects within a scope |
| Cached project inventory for a scope |
| Cross-project text search across entire scope |
| Per-project coverage gap analysis |
| Aggregate missing reality across active projects |
| Intent-driven exploration with ranking, graph, and retrieval plan |
All session-read tools expose readOnlyHint=true, destructiveHint=false. No write, exec, merge, deploy, or credential tools are part of the Public Preview contract.
Security model
Read-only remote surface — no mutation tools exposed in session-read profile
Path containment —
.env,.git/**,../traversal all deniedPrompt injection defense — security is middleware-enforced, not model-dependent
No credentials in repo — tunnel credentials via environment only
Outbound-only tunnel — no public inbound listener required (optional adapter)
Secret firewall — credential-like files denied even under broad scope authority
Architecture
Reasoning clients / humans
ChatGPT · Claude · Gemini · Cursor · Copilot · future agents
│
northbound adapters
HTTP/OpenAPI · MCP (official SDK) · Agent Plugins
│
▼
┌────────────────────────────────────────────────┐
│ Universal Agent Middleware Core │
│ workspace registry → policy → observation │
│ project registry → coverage diagnostics │
│ audit → execution contract → result review │
└──────────────────┬─────────────────────────────┘
│ │
READ ONLY .state/
│ contracts/results/audit
▼
registered project workspaces
my-app · api-service · othersCore invariants
Vendor-neutral core: no OpenAI/Anthropic/Cursor/GitHub dependency
Project sovereignty: target project SSOT remains authoritative
Read-only boundary: session-read profile grants no write, shell, commit, push, merge, or deploy
Observation ≠ Authority: UAM reports reality; project governance decides actions
Separate state: UAM state is physically disjoint from target workspaces
Evidence-bound execution: (v0.2+ contracts; legacy LocalExecutor is experimental)
Project reality model (v0.3.1+)
UAM tracks multi-instance projects with orthogonal dimensions:
role — structural function:
canonical-main,candidate,review-carrierlifecycle — temporal state:
active,landed,stale,supersededcoverage — observation completeness per truth surface
Coverage states: observed, externally_verified, not_applicable, not_observed, not_registered
Project-specific observation profiles in config/project-observation-profiles/ (local-only, gitignored) define per-project requirements without embedding project semantics into UAM core.
Documentation
docs/REALITY_PREAMBLE.md— Reality Preamble protocoldocs/BACKLOG.md— Roadmap and hardening prioritiesdocs/adapters/MCP.md— MCP adapter setupdocs/oss/public-profile-contract.md— Public Preview supported surfaceCHANGELOG.md— Version historySECURITY.md— Vulnerability reportingCONTRIBUTING.md— Contribution guidelines
Status
v0.5.1rc1 — Public Preview RC1
Gate | Status |
Source implementation | PASS (19 read-only MCP tools) |
RootScope foundation | PASS |
Git repository discovery | PASS |
Project grouping | PASS |
CoverageGap MVP | PASS |
Audit v2 integrity | PASS |
Scope search enforcement | PASS (OSS-SEC-001 pre-read boundary) |
Portable test suite | PASS (199 tests, 1 skipped; synthetic fixtures) |
Python/OS matrix (3.11–3.14) | PASS — 8/8 public CI (run |
Public release gates (O0–O9) | PASS — live public repo; see |
GitHub Release | PASS — wheel + sdist attached |
PyPI distribution | PASS — 0.5.1rc1 live; |
Public Preview supports SDK stdio session-read profile only. Legacy HTTP adapter and LocalExecutor are experimental and not part of the Preview contract. See docs/oss/public-profile-contract.md.
Deferred: forge/runtime observation, write-capable remote tools, autonomous execution, production OAuth.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/openjay/universal-agent-middleware'
If you have feedback or need assistance with the MCP directory API, please join our Discord server