Skip to main content

Drongo bird with a forked tail

Drongo

One config. Every MCP.

Unify · Verify · Protect

Drongo is a declarative Model Context Protocol (MCP) control plane and runtime security gateway. Define your upstream servers once, sync their proxy entries across supported clients, and enforce the same tool policy when each client calls them. Drongo 1.0 freezes the configuration, lockfile, state ledger, CLI and protocol contracts for the 1.x series. Existing v0.5.0 and v0.6.0 configurations and locks carry forward without a mandatory relock. See the 1.0 contract.

Capability Drongo 1.3 support
Upstreams Local stdio, remote Streamable HTTP and legacy SSE
Integrity RFC 8785 launch and tool hashes, declared supply-chain guarantees, remote TLS evidence, protocol and capability validation
Governance Default-deny tool, resource and prompt policies, lexical parameter assertions, workspace restrictions, approval leases, durable execution history and the UNKNOWN recovery gate
Daemon and discovery Same-user Unix sockets, authenticated loopback HTTP, four pool isolation modes and policy-filtered progressive tool discovery
Remote authentication and recovery OAuth PKCE loopback and manual login, single-flight refresh, upstream SSE resume and bounded downstream replay persisted in SQLite
Process confinement Opt-in Linux bubblewrap and macOS Seatbelt for local stdio, with fail-closed startup and drongo doctor diagnostics. Linux supports optional per-instance task limits and per-process rlimits
Output redaction Mandatory credential masking with optional global and per-server structured field and bounded regex rules for responses, audit and SSE replay
Operations Filtered audit history, decision and latency statistics, and persistent emergency freeze with lease revocation and managed process reclamation
Client adapters Codex, Claude Code, VS Code, OpenCode, Antigravity, ZCode, Qoder and Hermes, with ownership checks and journaled rollback. Pi remains disabled pending a verified extension schema
Runtime support Python 3.12 or later. The release matrix covers Linux and macOS on Python 3.12 and 3.13

Quick start

Install the console command with uv.

uv tool install mcp-drongo

For a one-off invocation, uvx needs the package name and the console command.

uvx --from mcp-drongo drongo --help

Create the user configuration.

drongo init

In the generated drongo.yaml (normally ~/.config/drongo/drongo.yaml), add the client you want to import. Adjust the path if you use a different Codex configuration file.

clients:
  codex:
    enabled: true
    adapter: codex-toml
    config_path:
      darwin: "${HOME}/.codex/config.toml"
      linux: "${HOME}/.codex/config.toml"

Preview the server definitions, then import the ones in this client by merging its draft. Review the imported commands and export any secret environment variables named on stderr before trusting the server.

drongo import --client codex
drongo import --client codex --write

The following examples use an imported server named filesystem. In drongo.yaml, update the default profile with its actual server name and the tools you intend to allow. Retain the defaults generated by init.

profiles:
  default:
    description: Read-only filesystem tools
    servers: [filesystem]
    allow: ["filesystem.read_*", "filesystem.list_*"]
    deny: []

A repository can narrow that policy with a .drongo.yaml file.

schema_version: "0.1"
profile: default
extra_deny: ["filesystem.read_sensitive"]

Review the launch configuration before authorizing it. Repeat the trust command for each imported server that you intend to probe. A plan with proposed changes returns status 2.

drongo trust server filesystem
drongo plan --verbose
drongo lock

Preview the client changes. For an existing entry named filesystem, the plan can report an unmanaged-entry conflict until you opt into adoption. Confirm that the imported upstream command, environment references, and settings are in drongo.yaml before applying.

drongo sync --client codex --dry-run --adopt
drongo sync --client codex --adopt

Without a client selector, drongo sync targets every enabled client. When --adopt clears an entry's old launch environment or connection fields, it reports the removed field names on stderr. Drongo keeps private backups of changed client files.

drongo verify
drongo tokens

Stateful governance

v0.2 turns the static allow-list into a three-state policy. require_approval in a profile grants a tool conditionally: each call needs a one-shot human approval by default, while extra_require_approval in a workspace .drongo.yaml can only tighten what the user already allows. An approval binds the session, the verified tool definition, and the exact arguments; a watchdog denies by default when nobody answers in time.

profiles:
  default:
    description: Read-only, writes need a human
    servers: [filesystem]
    allow: ["filesystem.read_*"]
    deny: []
    require_approval: ["filesystem.write_*"]

Review and decide the queue from any terminal -- no desktop, no daemon.

drongo approve list
drongo approve allow APPROVAL_ID --reason "verified the target path"
drongo approve deny APPROVAL_ID --reason "not on this machine"
drongo approve watch

Every forwarded call is recorded in a private SQLite ledger before it reaches the upstream. If the proxy dies mid-call, the record becomes UNKNOWN on the next start and the same arguments are refused until you check the external system and resolve the record -- a crash can never turn into a blind retry.

drongo state list
drongo state resolve EXEC_ID --note "branch was never deleted"

Tool responses are also scanned on their way back: values Drongo injected as secrets (and their Base64 or URL-encoding variants) are replaced with [REDACTED:SECRET:KEY_NAME] before the client ever sees them.

Parameter rules and approval leases

A profile can constrain a tool argument with param_rules. This example blocks filesystem writes outside the workspace's docs directory. The tool still needs the approval declared in the profile.

    require_approval: ["filesystem.write_*"]
    param_rules:
      - name: docs_only
        tool: "filesystem.write_*"
        argument: path
        operator: path_under
        value: "${WORKSPACE}/docs"
        on_failure: deny

Workspace extra_param_rules only tighten the effective policy. Missing or invalid arguments fail closed. The v0.4 specification lists all supported assertions.

Grant a lease explicitly when approving a call. A session lease ends with that session. A timed lease applies to the workspace until it expires, up to defaults.max_lease_ttl_ms. The default scope is the verified tool. path_prefix scopes the lease to the approved call's top-level path and its descendants.

drongo approve allow APPROVAL_ID --lease 15m --lease-scope path_prefix
drongo approve leases
drongo approve revoke LEASE_ID

Drongo checks current tool policy, parameter rules, integrity and the UNKNOWN ledger before a leased call. Pending approvals remain bound to their own sessions. Drift and tool-list changes revoke the server's leases.

Resource and prompt policies

resource_rules and prompt_rules explicitly govern resources/read and prompts/get. Match the server and target, then apply ALLOW, REQUIRE_APPROVAL or DENY with optional lexical assertions. Workspace extra_resource_rules and extra_prompt_rules tighten the effective decision. Approval leases bind the operation kind, target and policy contract. Interrupted dispatches use the same UNKNOWN recovery gate as tool calls. Existing locks can be used directly. Configuration and URI semantics

Audit and emergency controls

drongo audit tail --n 20 --decision UNKNOWN --json shows recent matching events. drongo audit stats --window 24h --by server reports request outcomes, approval wait time, sandbox startup time and unresolved executions.

drongo freeze blocks new tool calls and revokes active leases. drongo panic also reclaims the daemon's managed upstreams and marks interrupted dispatches as UNKNOWN. The freeze persists across daemon restarts. Resume under normal policy with drongo unfreeze --reason "incident reviewed". After verifying external side effects, use drongo state resolve EXEC_ID --note "..." for each unresolved execution. See the 1.1 contract.

Client sync adapters

Drongo supports stdio and loopback HTTP endpoint entries for Codex, Claude Code, VS Code, OpenCode, Antigravity, ZCode, Qoder and Hermes. Set the adapter name and the platform's actual configuration path in clients. The client configuration table lists the five new formats. Pi's adapter is disabled pending verification of an installed extension's config format.

Remote upstreams and the local daemon

  • Remote upstreams. Choose streamable_http or legacy sse. Drongo checks the locked launch configuration (L1), TLS channel evidence (L2), and the complete tool definitions (L3). HTTPS is the default and redirects are rejected. You can pin the server’s TLS SPKI and provide a CA bundle whose digest is tracked in the lock. Injected authorization values are redacted at egress. A call that loses its response remains unresolved and becomes UNKNOWN during the next ledger sweep.
  • drongod. Use drongo daemon start, stop, status, and reload to manage the daemon. The Unix socket accepts the current user only. Optional loopback Streamable HTTP is off by default and checks Bearer authorization, Host, and Origin. By default wrap attaches when the daemon is reachable and falls back to a direct connection when the socket is absent or refuses the connection. --standalone forces a direct connection and --require-daemon requires an attachment.
  • Instance pooling. Choose per-session (default), per-workspace, per-profile, or shared. Upstream launch changes and secret rotations use distinct pool keys. Each attached session keeps its own governance state.
  • Progressive discovery. Set discovery_mode: progressive on the Profile and explicitly allow drongo.* or the individual discovery tools. The client sees the permitted search and describe tools. Drongo still verifies all upstream tool definitions and capabilities. drongo tokens compares the eager and progressive definition budgets.
  • HTTP endpoint sync. Enable daemon.http, then pass the loopback origin to drongo sync --endpoint or drongo plan --endpoint. The generated entries carry the daemon address and any required transport type. Configure the Bearer token from ${DRONGO_STATE_DIR}/drongod.token separately in the client. Sync leaves the plaintext token out of client configuration and plan output.

OAuth authorization and SSE recovery

Add an oauth block to a remote streamable_http or sse server. Use the issuer's HTTPS identifier, an env: reference for the registered client ID, and the scopes required by that MCP server. Public clients use PKCE S256. Confidential clients can also set client_secret to an env: reference. OAuth owns the upstream Authorization header.

oauth:
  enabled: true
  issuer: https://auth.example.org
  client_id: env:MCP_CLIENT_ID
  scopes: [mcp]
  token_store: default
  refresh_margin_sec: 60

Provide DRONGO_OAUTH_STORE_KEY as a 32-byte random key encoded as hex through your credential manager. The CLI and daemon need the same key. Drongo seals OAuth tokens in 0600 files using the host OpenSSL command. Configure the OAuth client to permit an ephemeral 127.0.0.1 callback, then start an explicit login. Use --manual over SSH to paste the authorization code or complete callback URL. Run auth status to inspect local authorization and auth logout <server> to clear it.

drongo auth login remote-example

Streamable HTTP reconnects to a resumable upstream SSE stream with Last-Event-ID. Downstream loopback HTTP retains redacted events in state.db for up to five minutes, subject to the configured release limits of 1024 events and 16 MiB of payloads. After a daemon restart, use the current Bearer token to recover historical events from the original session and initialize a new session for new calls. See the v0.6.0 specification.

OS process sandbox

Enable sandbox on a local stdio server to confine the probe and live process, including daemon-pooled launches. Linux uses the system bubblewrap with PID, mount and network namespaces. macOS uses /usr/bin/sandbox-exec with a default-deny Seatbelt profile. An enabled sandbox fails closed when the backend is unavailable or the policy cannot be applied. Set defaults.require_sandbox: true to require an explicit sandbox on every local stdio server.

servers:
  filesystem:
    command: /usr/local/bin/mcp-filesystem
    args: ["${WORKSPACE}"]
    isolation: per-workspace
    integrity:
      guarantee: dev_unpinned
    sandbox:
      enabled: true
      network: none
      rw_paths: ["${WORKSPACE}/output"]

Create the output directory before starting the server. The workspace is available read-only outside explicit writable paths. Drongo protects its own config and state directories and the user's .ssh, .gnupg and .aws trees. Use network: outbound for servers that need outbound connections. The normalized sandbox declaration is part of L1, so review the change before reauthorizing and relocking the server. See the v0.5 specification for supported paths, isolation levels and environment settings.

drongo doctor

doctor reports platform support, the backend capability check and each enabled server's network and isolation settings without starting any configured upstream. It exits with status 3 if a required backend is unavailable.

Architecture and boundaries

  • Unify. The control plane manages user configuration, workspace trust, lockfiles, and client sync. Client entries launch drongo wrap <server> by default. HTTP endpoint mode points them at drongod. Each workspace policy is bounded by the user's configured permissions.
  • Verify. The integrity engine records launch configuration, reports the level of execution provenance it can establish, and fingerprints the complete tool and capability snapshots.
  • Protect. Each downstream session has its own policy, approvals, and execution ledger. The proxy checks protocol methods in both directions, validates tools before making them available, and applies default-deny policy to calls. Upstream drift can block the session.

Linux resource limits and custom redaction

Set sandbox.resources on an enabled local stdio sandbox. max_pids limits tasks per instance through a delegated cgroup v2 pids controller. Start Drongo in the delegated unit's drongo-control subgroup. max_memory_mb, max_cpu_seconds, max_file_size_mb, and max_open_files apply kernel rlimits. Run drongo doctor to check host capability before authorizing and locking a changed launch policy. Workspace overlays can tighten limits on workspace-bound instances. Linux quota settings require Linux bubblewrap. Existing configurations without quotas keep their launch hashes.

Add structured field masks and bounded regex patterns under global redaction.rules or servers.<name>.redaction.rules. Configured masks run after mandatory credential redaction. Drongo applies them before delivering governed replies and writing diagnostic audit fields or SSE events. Stored SSE events are filtered again when replayed. See the v1.3.0 specification for accepted patterns, configuration and compatibility details.

Explicit Non-Guarantees

Emergency termination owns daemon-managed process trees and connections. An already running standalone process or remote service can continue an operation after the local transport closes. Operator reconciliation remains necessary for an UNKNOWN outcome. The process confinement limits below also apply to panic.

  • Linux rlimits bound a process or file as documented. They provide no aggregate memory, CPU or disk allocation guarantee. max_pids bounds simultaneous tasks in the delegated instance, including threads. A requested quota requires the corresponding host capability.

  • Redaction covers known credentials and configured fields or text patterns. Data split across values or encoded in an unknown form may escape those matches. Existing audit and ledger files follow their established retention policy.

  • path_under is a lexical check with no filesystem I/O. Symlinks, hard links, mounts and upstream path resolution can change the actual target. Runtime confinement depends on the enabled OS sandbox, filesystem permissions and the resources explicitly granted to the process.

  • On macOS, the Seatbelt supervisor reclaims the upstream process group. Descendants that deliberately create a new group or call setsid can escape group cleanup. A SIGKILL between the creation of the temporary .sb file and supervisor startup can leave the 0600 profile behind. It contains policy rules and no secret values.

  • version_pinned covers the declared package version. It does not pin transitive dependencies or certify the package's code.

  • Online probes by plan, lock, and verify execute upstream code. Drongo requires trust for probing. Review the command before authorizing it with drongo trust server.

  • Client sync uses atomic replacement per file and a recovery journal across files. Other applications can still edit those files independently.

  • An approval is not a semantic review: it confirms the tool, the verified definition, and the exact arguments once. It does not judge whether the call is a good idea, and an approved call that has been sent cannot be recalled.

  • Crash recovery is conservative, not exactly-once: a call that died between the ledger write and the upstream write is blocked as UNKNOWN even if it never executed, and resolving it cannot undo a side effect that did happen.

  • The SPKI pin is checked during a separate TLS preflight handshake. HTTP connections independently validate the CA and hostname. Pin coverage ends at the preflight handshake.

  • A remote upstream can silently change its code while keeping the same TLS identity and tool schema. The integrity lock verifies the channel evidence and tool definitions it can observe.

  • SSE replay covers retained events within the original authenticated stream. An expired or unavailable cursor requires recovery at the client. Reconnection does not resend a tool call or clear an unresolved UNKNOWN record. Local OAuth logout clears Drongo credentials. Provider-side revocation follows the issuer’s own controls.

  • Egress redaction matches the injected secret values and common encodings exactly. It does not catch split values, custom encodings, or credentials Drongo never held, and it does not constrain what an upstream sends directly to the network.

Documentation

Released under the Apache License 2.0.

Metadata

Release files for mcp-drongo 1.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 mcp-drongo 1.3.0
File Size Uploaded Provenance Actions
mcp_drongo-1.3.0.tar.gz 389.4 kB With provenance Details for mcp_drongo-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-drongo 1.3.0
File Interpreter ABI Platform Actions
mcp_drongo-1.3.0-py3-none-any.whl Python 3 none any Details for mcp_drongo-1.3.0-py3-none-any.whl

Total release size: 679.1 kB

Release files / mcp_drongo-1.3.0.tar.gz

Download URL mcp_drongo-1.3.0.tar.gz
Size 389.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6cbcfccdfb676df7fcd6737a4afb2c6e2db1b93a5f458d00d6c18852a3aced24
BLAKE2b-256 checksum
How to use checksums
8c9aea269948b981d7b32e79892db0a5c0cbcab1250305a4be6271ca8d9d271f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / mcp_drongo-1.3.0-py3-none-any.whl

Download URL mcp_drongo-1.3.0-py3-none-any.whl
Size 289.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d573b9ebf14942ef51523abede6cc40d1dfff4ed34fa24a370388f585f19b0fb
BLAKE2b-256 checksum
How to use checksums
5f99d30107623fce26adac25c6385d365af6960cad2a6ef508110355d4d9f8b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for mcp-drongo 1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mcp_drongo-1.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

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.

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