Haldir
About
The guardian layer for AI agents. Scoped sessions with spend limits (Gate), AES-encrypted secrets (Vault), immutable audit trail with anomaly detection (Watch), and proxy mode that intercepts every MCP tool call for policy enforcement. Human-in-the-loop approvals, webhooks, 10 MC
Details
- Author
- ExposureGuard
- Downloads
- 318
- Categories
- Developer Tools, Security, AI, Other
Jump to
—
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
HaldirCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install with pip install haldir. Docs are at haldir.xyz/docs and API at haldir.xyz/v1. Rated 98/100 on Smithery.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"haldir": {
"haldir": {
"command": "haldir-mcp",
"env": {
"HALDIR_API_KEY": "your-api-key-here"
}
}
}
}
}
McpServers
{
"haldir": {
"command": "haldir-mcp",
"env": {
"HALDIR_API_KEY": "your-api-key-here"
}
}
}
Haldir — The Guardian Layer for AI Agents
The open-source governance layer for AI agents.Identity, secrets, audit, and policy enforcement — MIT licensed, self-host or use our cloud.
Haldir enforces governance on every AI agent tool call: scoped sessions with spend caps, encrypted secrets the model never sees, hash-chained tamper-evident audit trail, human-in-the-loop approvals, and a proxy that intercepts every MCP call before it reaches your tools. Native SDKs for LangChain, CrewAI, AutoGen, and Vercel AI SDK.
$ haldir overview Haldir tenant overview acct_xyz123 · tier pro · 2026-04-19T18:42:11+00:00 Status ● ok Actions 4,217 / 50,000 ████░░░░░░░░░░░░░░░░ 8.4% Spend $ 47.30 this month Sessions 12 active · 3/10 agents Vault 8 secrets · 62 accesses this month Audit 1,847 entries · 0 flagged (7d) · chain ✓ Webhooks 2 registered · 541 deliveries (24h) · 99.82% success Approvals 1 pending
Install once, drive the whole platform from the terminal:
pip install haldir haldir login # one-time; stashes API key haldir overview --watch # top-style live dashboard haldir status # green/yellow/red component pills haldir ready # exits 0/1, perfect for CI haldir audit tail --agent my-bot # the last N entries haldir audit export --format=jsonl --out audit-2026-04.jsonl haldir audit verify # hash chain integrity check haldir webhooks deliveries # last 20 retry attempts haldir migrate up # apply pending schema migrations
Every command takes--jsonfor scripts.haldir --helpfor the full surface.
git clone https://github.com/ExposureGuard/haldir.git cd haldir cp .env.example .env python3 -c 'import base64, os; print(base64.urlsafe_b64encode(os.urandom(32)).decode())' # paste the output into .env as HALDIR_ENCRYPTION_KEY, then: docker compose up -d curl http://localhost:8000/health
Full self-hosting guide:SELF_HOSTING.md
That's it — point athttps://haldir.xyz, no signup, live API.
Live now:haldir.xyz·API Docs·OpenAPI Spec·Smithery
🧪Now accepting 5 design partners.30 days free, full access, direct line to the founder. If you're shipping AI agents to production, emailsterling@haldir.xyz.
Haldir is fast enough to sit in the hot path of every agent tool call without becoming the bottleneck.
Single-box HTTP throughput(gunicorn 4 workers, 32 concurrent clients, tuned SQLite backend, every request goes through the full middleware stack — auth, validation, idempotency, metrics, structured logging):
Hardware: 12th-gen Intel Core i3-1215U (8 cores, 8 GB RAM). SQLite is configured with WAL + synchronous=NORMAL + 256 MiB mmap + in-memory temp store — the session-lookup p99 dropped by 52 % versus the untuned path. Postgres deployments (configurable pool viaHALDIR_PG_POOL_MIN/MAX) flatten the p99 further still; enable viaDATABASE_URL=postgresql://....
Agents typically wait 500-3000 ms for an LLM completion and 100-1000 ms for an upstream API call, so Haldir's overhead sits inside the noise. Reproduce locally:
# Concurrent HTTP throughput (launches a local gunicorn, ~60s total) python bench/bench_http.py --duration 10 --concurrency 32 --workers 4 # Primitive cost only (no API key needed) python bench/bench_primitives.py --local # End-to-end against the hosted service export HALDIR_API_KEY=hld_... python bench/bench_primitives.py
One endpoint produces an auditor-ready proof-of-control pack covering eight sections, each anchored to a SOC2 trust services criterion:
haldir compliance evidence --since 2026-01-01 --out evidence-q1-2026.md
The pack signs itself: a SHA-256 over the canonical JSON of sections 1-7. An auditor receiving an archived pack can re-call/v1/compliance/evidence/manifestand confirm the digest matches — proof the document was not modified after issuance.
JSON for evidence-locker upload, Markdown for the "show this to the auditor" moment, both from the same/v1/compliance/evidenceendpoint.
AI agents are calling APIs, spending money, and accessing credentials with zero oversight. Haldir is the missing layer:
from sdk.client import HaldirClient h = HaldirClient(api_key="hld_xxx", base_url="https://haldir.xyz") # Create a governed agent session session = h.create_session("my-agent", scopes=["read", "spend:50"]) # Store secrets agents never see directly h.store_secret("stripe_key", "sk_live_xxx") # Retrieve with scope enforcement key = h.get_secret("stripe_key", session_id=session["session_id"]) # Authorize payments against budget h.authorize_payment(session["session_id"], 29.99) # Every action is logged h.log_action(session["session_id"], tool="stripe", action="charge", cost_usd=29.99) # Revoke when done h.revoke_session(session["session_id"])
Scoped sessions with permissions, spend limits, and TTL. No session = no access.
curl -X POST https://haldir.xyz/v1/sessions \ -H "Authorization: Bearer hld_xxx" \ -H "Content-Type: application/json" \ -d '{"agent_id": "my-bot", "scopes": ["read", "browse", "spend:50"], "ttl": 3600}'
Vault — Encrypted Secrets & Payments
AES-encrypted storage. Agents request access; Vault checks session scope. Payment authorization with per-session budgets.
curl -X POST https://haldir.xyz/v1/secrets \ -H "Authorization: Bearer hld_xxx" \ -H "Content-Type: application/json" \ -d '{"name": "api_key", "value": "sk_live_xxx", "scope_required": "read"}'
Immutable log for every action. Anomaly detection. Cost tracking. Compliance exports.
curl https://haldir.xyz/v1/audit?agent_id=my-bot \ -H "Authorization: Bearer hld_xxx"
Sits between agents and MCP servers. Every tool call is intercepted, authorized, and logged. Supports policy enforcement: allow lists, deny lists, spend limits, rate limits, time windows.
# Register an upstream MCP server curl -X POST https://haldir.xyz/v1/proxy/upstreams \ -H "Authorization: Bearer hld_xxx" \ -H "Content-Type: application/json" \ -d '{"name": "myserver", "url": "https://my-mcp-server.com/mcp"}' # Call through the proxy — governance enforced curl -X POST https://haldir.xyz/v1/proxy/call \ -H "Authorization: Bearer hld_xxx" \ -H "Content-Type: application/json" \ -d '{"tool": "scan_domain", "arguments": {"domain": "example.com"}, "session_id": "ses_xxx"}'
Pause agent execution for human review. Webhook notifications. Approve or deny from dashboard or API.
# Require approval for spend over $100 curl -X POST https://haldir.xyz/v1/approvals/rules \ -H "Authorization: Bearer hld_xxx" \ -H "Content-Type: application/json" \ -d '{"type": "spend_over", "threshold": 100}'
Haldir is available as an MCP server with 10 tools for Claude, Cursor, Windsurf, and any MCP-compatible AI:
{ "mcpServers": { "haldir": { "command": "haldir-mcp", "env": { "HALDIR_API_KEY": "hld_xxx" } } } }
MCP Tools:createSession,getSession,revokeSession,checkPermission,storeSecret,getSecret,authorizePayment,logAction,getAuditTrail,getSpend
MCP HTTP Endpoint:POST https://haldir.xyz/mcp
Agent (Claude, GPT, Cursor, etc.) │ ▼ ┌─────────────────────────────┐ │ Haldir Proxy │ ← Intercepts every tool call │ Policy enforcement layer │ └──────┬──────────┬───────────┘ │ │ ┌────▼────┐ ┌───▼────┐ │ Gate │ │ Watch │ │identity │ │ audit │ │sessions │ │ costs │ └────┬────┘ └────────┘ │ ┌────▼────┐ │ Vault │ │secrets │ │payments │ └────┬────┘ │ ▼ Upstream MCP Servers (your actual tools)
Haldir is discoverable through every major protocol:
- Website:haldir.xyz
- API Docs:haldir.xyz/docs
- Smithery:View on Smithery
- PyPI:haldir
- OpenAPI:haldir.xyz/openapi.json
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Agent identity and trust framework — DID verification, capability attestation, agent-to-agent authentication by MEOK AI Labs
Cryptographic identity, scoped delegation, values governance, and deliberative consensus for AI agents. 11 tools, Ed25519 signatures, zero blockchain.
Trust intelligence platform for AI agents — identity certification, trust scoring, forensic audit trails, and x402 micropayments. 14 MCP tools.
A secure MCP server for AI agents to interact with the Authenticator App for 2FA codes and passwords.
Agent identity and key custody — provider keys held in a local encrypted vault and leased to agents under owner approvals, with env-var injection so secrets never enter model context and a one-command kill switch; plus a registry with Ed25519 agent identity, reputation, and messaging.
ALTER - identity infrastructure for the AI economy
Auth0, but for agents. Identity and authentication service for AI agents.
AgentTrust is a pure MCP-only reputation and trust scoring server for AI agents.
It connects Agents to data wallet with DID and verifiable credentials
MCP server for AI-native Identity Verification & Anti-Fraud
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




