hejdar-mcp
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
MCP server for Hejdar — runtime policy enforcement for AI agents.
This server exposes hejdar_evaluate as an MCP tool. Any MCP-compatible agent (Claude, ChatGPT, Cursor, custom) can call it to check whether an action is permitted by organizational policy **before** executing it.
The MCP server is a thin wrapper around the Hejdar API (POST /v1/evaluate). It contains no policy logic — all decisions come from your Hejdar organization's configured policies.
Quick Start
1. Install
Or run directly with uvx:
2. Get your API key
Sign up at app.hejdar.com and create an API key in **Settings → API Keys**.
3. Configure your MCP client
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
Claude Code
Add to your Claude Code MCP settings:
Direct (stdio)
Getting Started
1. Install: pip install hejdar-mcp or uvx hejdar-mcp
2. Get an API key — contact us at hello@hejdar.com or visit hejdar.com
3. Configure your MCP client (see configuration example above)
Tool: hejdar_evaluate
Evaluate an agent action against your organization's security policies.
**Input:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| action_type | string | Yes | READ, WRITE, DELETE, TRANSFER, or EXECUTE (UPDATE is accepted as an alias for WRITE, matching the Hejdar API) |
| resource | string | Yes | Target resource, e.g. customer_database |
| agent_name | string | No | Name of the calling agent, e.g. hr-assistant |
| context | object | No | Free-form metadata (department, user_id, reason, etc.) |
**Output:**
decision is one of: ALLOW, DENY, WOULD_DENY.
System Prompt Pattern
For best results, add this to your agent's system prompt:
Environment Variables
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| HEJDAR_API_KEY | Yes | — | Your Hejdar API key |
| HEJDAR_API_URL | No | https://api.hejdar.com | API base URL (for self-hosted) |