dmint-mcp
MCP Proxy Server and Tool Enforcement Gateway for Dmint.
dmint-mcp allows developers to wrap existing Model Context Protocol (MCP) servers with deterministic policy enforcement gates. It intercepts agent tools/call requests over stdio, evaluates Dmint security policy, and routes only authorized calls downstream.
┌─────────────────┐
│ AI Client │
└────────┬────────┘
│ stdio (tools/list, tools/call)
▼
┌─────────────────────────────────┐
│ Dmint MCP Proxy │
│ │
│ ┌───────────────────────────┐ │
│ │ Enforcement Gate │ │
│ └─────────────┬─────────────┘ │
└────────────────┼────────────────┘
│ stdio (authorized call only)
▼
┌─────────────────────────────────┐
│ Downstream MCP Server │
└─────────────────────────────────┘
Why This Exists
When using external MCP servers that you cannot modify, dmint-mcp acts as an out-of-process security proxy between the AI agent and the MCP server.
- Tool Discovery Control: Expose or hide tools dynamically from
tools/listbased on configuration. - Pre-Call Interception: Intercepts
tools/call, maps parameters to a DmintToolRequest, and enforcesALLOW,DENY, orAPPROVAL_REQUIRED. - Zero Downstream Leakage: Unapproved or denied calls never reach the downstream MCP server process.
- Approved Retries: Supports Ed25519-signed retry assertion credentials to execute approved workflows over stdio.
Installation
pip install dmint-mcp
Quickstart
import anyio
from dmint_mcp import DmintMCPProxy, MCPIntegrationConfig, MCPToolBinding, DiscoveryMode
from dmint.policy import Policy
# 1. Define integration configuration
config = MCPIntegrationConfig(
integration_id="sqlite-server",
command="python3",
args=["-m", "sqlite_server"],
tool_bindings=[
MCPToolBinding(tool_name="read_query", capability="db.read", discovery=DiscoveryMode.EXPOSED),
MCPToolBinding(tool_name="delete_query", capability="db.delete", discovery=DiscoveryMode.HIDDEN),
],
)
# 2. Define policy
policy = Policy.from_mapping({
"rules": [
{"effect": "allow", "tool": "db", "action": "read", "resource": "*"},
{"effect": "deny", "tool": "db", "action": "delete", "resource": "*"},
]
})
# 3. Instantiate and run proxy over stdio
proxy = DmintMCPProxy(integration_config=config, policy=policy)
async def main():
await proxy.serve_stdio()
if __name__ == "__main__":
anyio.run(main)
Disclosure Modes
Control error disclosure returned to the AI client on denied or approval-required requests:
DOG(default): Returns structured recovery JSON containingrequest_id,approval_id, andrequest_fingerprint.GOD: Returns minimal opaque error responses (DMT_403: access denied).CAT: Returns structured error codes without revealing internal request fingerprints.
Supported Transports
- Stdio (
stdio): Standard input/output process transport for local MCP servers.
Testing
Run the MCP integration and unit test suite:
pytest -v
License
Licensed under the Apache License, Version 2.0.
See the LICENSE file for the complete license text.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dmint_mcp-0.1.0.tar.gz.
File metadata
- Download URL: dmint_mcp-0.1.0.tar.gz
- Upload date:
- Size: 29.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e478e4d05c8583c631d6b5883213f6603cd78eab8a26f5941e04905682121c4f
|
|
| MD5 |
9f7d19ac5f09e888caaa60dbbe6993ca
|
|
| BLAKE2b-256 |
073806624d13ebf98d736abb2e0ca5fedc08f37c036c599387f3778df0e64944
|
Provenance
The following attestation bundles were made for dmint_mcp-0.1.0.tar.gz:
Publisher:
publish.yml on dmint-app/dmint-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dmint_mcp-0.1.0.tar.gz -
Subject digest:
e478e4d05c8583c631d6b5883213f6603cd78eab8a26f5941e04905682121c4f - Sigstore transparency entry: 2798913576
- Sigstore integration time:
-
Permalink:
dmint-app/dmint-mcp@9eef7bbbc642df203e35564a33aa52865e378c22 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dmint-app
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9eef7bbbc642df203e35564a33aa52865e378c22 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file dmint_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dmint_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d2a01a0885bf8b67c6d2160d0c485cfaab01fced62155d761fef9f428c783f5
|
|
| MD5 |
b77586dcab7f55162578744bc2609acf
|
|
| BLAKE2b-256 |
13c6533b736164387ed0105d1f239ab6eec6dd7117941559bc4f4b2ed76d1f75
|
Provenance
The following attestation bundles were made for dmint_mcp-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on dmint-app/dmint-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dmint_mcp-0.1.0-py3-none-any.whl -
Subject digest:
1d2a01a0885bf8b67c6d2160d0c485cfaab01fced62155d761fef9f428c783f5 - Sigstore transparency entry: 2798913601
- Sigstore integration time:
-
Permalink:
dmint-app/dmint-mcp@9eef7bbbc642df203e35564a33aa52865e378c22 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dmint-app
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9eef7bbbc642df203e35564a33aa52865e378c22 -
Trigger Event:
workflow_dispatch
-
Statement type: