Dney Guardrails MCP Server
Supports optional Auth0 OAuth authentication for keyless MCP access, verifying bearer tokens and resolving the user's Dney organization via verified email.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
dney-mcp
Dney Guardrails MCP server. Exposes Dney's guardrail engine as MCP tools for Claude Desktop, Claude.ai, and Claude Code — check content for policy violations, PII, toxicity, and more.
Tools
check_content(text, direction)— check a message against active guardrails.check_input_output(input_text, output_text)— check a full exchange.list_guardrails()— list configured guardrails.guardrail_stats()— activity summary.recent_activity(limit)— recent guardrail decisions (metadata only).report_decision(audit_id, verdict)— report that a decision was wrong (false_blockormiss). Carries no text: only the decision's id and the verdict.
Related MCP server: Nura MCP Policy Interceptor
Auth
The server resolves the caller's Dney org in one of three ways. Prefer the first two — they keep the secret out of URLs and logs:
Header key (recommended) —
x-dney-key(or legacyx-api-key), or theDNEY_API_KEYenv var for single-user/local use.Auth0 OAuth (recommended, optional) — a keyless
/mcprequest withAuthorization: Bearer <Auth0 access token>. The server verifies the token (RS256, issuer, audience, expiry), requiresemail_verified: true, extracts the user's email from the namespacedAUTH0_EMAIL_CLAIM, and resolves the org by email via the backend's internal service endpoint usingMCP_SERVICE_TOKEN. If no Dney account is linked to that email, the tool returns a clear "link your Dney account" error.Path key (deprecated) —
https://mcp.dney.dev/<your-asg-key>/mcp. ThePathKeyASGIAppwrapper strips the leading key segment, injects it asx-dney-key, and rewrites the path to/mcp. This exists only for connector UIs that accept a URL and no custom headers.⚠️ Security risk — avoid when possible. A key in the URL path is written to ALB/CloudFront/proxy access logs, APM traces, and browser history, i.e. the key leaks into logs. Use OAuth or a header key wherever the client allows it. Treat path keys as low-privilege, rotate them readily, and never paste the URL into referrer-leaking contexts.
OAuth is enforced only when both AUTH0_ISSUER and MCP_AUDIENCE are set.
When either is unset the server runs in legacy path-key-only mode. When OAuth is
enabled, a keyless /mcp request without a valid Bearer token receives a 401
with a WWW-Authenticate: Bearer resource_metadata="…" challenge pointing at
GET /.well-known/oauth-protected-resource (RFC 9728 protected-resource
metadata).
Any client-supplied x-dney-email header is always stripped at the ASGI
boundary; only an email verified from a Bearer JWT is ever trusted.
Environment variables
Var | Default | Purpose |
|
| Dney backend base URL |
| — | Single-user/local API key |
|
| Bind address |
| — | Auth0 issuer (trailing slash), e.g. |
| — | Expected token audience, e.g. |
|
| Namespaced claim holding the verified user email (bare |
|
| Namespaced claim asserting the email is verified; must be |
|
| When |
|
| ⚠️ If |
|
| Public base URL advertised in the 401 challenge |
| — | Shared secret for the backend |
The OAuth email is trusted only when the token asserts email_verified: true;
tokens with a missing/false email_verified are rejected.
AUTH0_ISSUER + MCP_AUDIENCE together enable OAuth; MCP_SERVICE_TOKEN must
match the backend's MCP_SERVICE_SECRET.
Development
pip install -e ".[dev]"
pytestRun
# ASGI app (FastMCP + path/header/OAuth auth + /health)
python -m asgard_mcp.server
# or via uvicorn: uvicorn asgard_mcp.server:appContributing and security
See CONTRIBUTING.md. Report vulnerabilities privately as described in SECURITY.md, never in a public issue.
License
Apache License 2.0. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Authenticated MCP server for ClearPolicy policy and compliance workflows.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
MCP policy creation, quality checks and guarded data handoffs before automated writes.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for AI agent security guardrails. Provides input validation, prompt injection detection, PII redaction, output filtering, policy enforcement, rate limiting, and comprehensive audit logging.72 npm1MIT
- AlicenseBqualityDmaintenanceA governance and policy enforcement gateway for MCP servers that provides hard guardrails, dynamic parameter bounds, human-in-the-loop approvals, and audit telemetry.27 npmMIT
- AlicenseAqualityCmaintenanceEnables policy-governed MCP interactions with deterministic authorization, tenant isolation, minimized PII exposure, and human approval gates for sensitive mutations, while producing structured audit events.3MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and MCP clients to safely access upstream MCP servers through centralized policy enforcement, including allow/deny/approval decisions, schema pinning, circuit breakers, and audit logging.MIT