Metadata-Version: 2.5
Name: mcp-drongo
Version: 0.1.0
Summary: Declarative MCP control plane and runtime security gateway for AI agents.
Project-URL: Homepage, https://github.com/1an-y/Drongo
Project-URL: Repository, https://github.com/1an-y/Drongo
Project-URL: Issues, https://github.com/1an-y/Drongo/issues
Project-URL: Documentation, https://github.com/1an-y/Drongo#documentation
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: ai-agents,mcp,model-context-protocol,policy,security
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security
Requires-Python: >=3.12
Requires-Dist: pyyaml
Requires-Dist: rfc8785
Requires-Dist: tomlkit
Description-Content-Type: text/markdown

<p align="center">
  <img src="https://raw.githubusercontent.com/1an-y/Drongo/main/docs/assets/drongo-logo.svg" width="112" height="112" alt="Drongo bird with a forked tail">
</p>

# 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 to Codex, Claude Code, and VS Code, and enforce the same tool policy when each client calls them. v0.1 supports stdio servers on Linux and macOS and requires Python 3.12 or later.

## Quick start

Install the console command with [uv](https://docs.astral.sh/uv/).

```sh
uv tool install mcp-drongo
```

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

```sh
uvx --from mcp-drongo drongo --help
```

Create the user configuration.

```sh
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.

```yaml
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.

```sh
drongo import --client codex
```

```sh
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`.

```yaml
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.

```yaml
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.

```sh
drongo trust server filesystem
```

```sh
drongo plan --verbose
```

```sh
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.

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

```sh
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.

```sh
drongo verify
```

```sh
drongo tokens
```

## Architecture and boundaries

- **Unify.** The control plane manages user configuration, workspace trust, lockfiles, and client sync. Client entries launch `drongo wrap <server>`. 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 stdio session has its own runtime proxy. 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.

### Explicit Non-Guarantees

- v0.1 does **not** provide an OS process sandbox. An upstream server runs as your user and can access files and the network with your account's permissions.
- `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.

## Documentation

- [Technical specification](docs/SPEC-v0.1.md)
- [Architecture](docs/ARCHITECTURE.md) and [threat model](docs/THREAT_MODEL.md)
- [Acceptance tests](docs/ACCEPTANCE_TESTS.md)
- [Changelog](CHANGELOG.md)

Released under the [Apache License 2.0](LICENSE).
