OpenCDR MCP
opencdr-mcp exposes the OpenCDR management API as tools for MCP-compatible
clients. It is an optional client integration: OpenCDR Core detects and responds
to events without this package.
The server uses stdio transport and connects to an already deployed OpenCDR Core API. It does not require an OpenCDR source checkout.
Install
pip install opencdr-mcp
For isolated command-line installation, pipx is also supported:
pipx install opencdr-mcp
Configure
Set the deployed API endpoint and a scoped API key:
export OPENCDR_API_URL="https://example.execute-api.us-east-2.amazonaws.com/dev"
export OPENCDR_API_KEY="..."
export OPENCDR_MCP_PROFILE="observer"
Environment variables take precedence over the optional JSON configuration
file at ~/.config/opencdr/mcp.json:
{
"url": "https://example.execute-api.us-east-2.amazonaws.com/dev",
"key": "..."
}
Set OPENCDR_CONFIG_FILE to use another file. Protect configuration files that
contain API keys with owner-only permissions.
OpenCDR deployments store a dedicated MCP key in SSM at
/opencdr-<stage>/api-key-mcp and the endpoint at
/opencdr-<stage>/api-url. Consult the OpenCDR Core deployment documentation
for retrieval and key-rotation instructions.
Register
Claude Code example:
claude mcp add opencdr \
--env OPENCDR_API_URL="$OPENCDR_API_URL" \
--env OPENCDR_API_KEY="$OPENCDR_API_KEY" \
--env OPENCDR_MCP_PROFILE=observer \
-- opencdr-mcp
The command can also be started directly:
opencdr-mcp
Capability profiles
| Profile | Exposed operations |
|---|---|
observer |
Read status, rules, lists, signals, logs, settings, integrations, IR roles and IR actions |
operator |
Observer operations plus rule/list, integration and settings changes |
responder |
Operator operations plus IR-role changes and IR-action rollback |
observer is the default. Profiles only reduce which tools an MCP client can
discover; they are not the authorization boundary. The OpenCDR API enforces the
key scopes. Pair each profile with a key carrying only the corresponding scopes.
Tool groups
- Deployment status
- Detection and correlation rules
- Reusable lists
- Signals and operational logs
- Ingestion integrations
- Notification settings
- Incident-response roles and action rollback
Mutating operations include MCP safety annotations and use OpenCDR's optimistic concurrency controls where the API supports them.
Development
python -m venv .venv
. .venv/bin/activate
python -m pip install -e '.[dev]'
ruff check .
pytest
python -m build
python -m twine check dist/*
Releases
GitHub releases publish to PyPI through trusted publishing. The release tag must
exactly match v<project.version>, for example v0.1.0. The pypi GitHub
environment and the PyPI trusted publisher must be configured before publishing
the first release; no long-lived PyPI token is stored in GitHub.
License
Mozilla Public License 2.0. See LICENSE.
Metadata
Release files for opencdr-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| opencdr_mcp-0.1.0.tar.gz | 26.7 kB | With provenance | Details for opencdr_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opencdr_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for opencdr_mcp-0.1.0-py3-none-any.whl |
Total release size: 46.5 kB
Release files / opencdr_mcp-0.1.0.tar.gz
| Download URL | opencdr_mcp-0.1.0.tar.gz |
|---|---|
| Size | 26.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96e49456be56a776549b052ad3b4c2ac624a1c9c9ceb520f4508dc782eafda29
|
|
BLAKE2b-256 checksum How to use checksums |
2e95ba5f45a19ed4f947628ac14fed4d51a308d62f366cb413b157a52187ce00
|
| 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 Oct 29, 2026.
Transparency logRelease files / opencdr_mcp-0.1.0-py3-none-any.whl
| Download URL | opencdr_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a02597c3d04e2e7d7c783c10817fffe4c7134a26712c3bc1dfbd63e545b24881
|
|
BLAKE2b-256 checksum How to use checksums |
1589752c3fff8652cc2fe8435ec8379ed2c7061b45eca71427fda96104f43fcd
|
| 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 Oct 29, 2026.
Transparency logSecurity for opencdr-mcp 0.1.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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for opencdr_mcp-0.1.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 Oct 29, 2026.
Transparency logA 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.