Skip to main content

MCP server for TLS certificate analysis via the Model Context Protocol

Project description

dcert (Python)

CI/CD Pipeline PyPI version License: MIT

A Python MCP wrapper for the dcert Rust server.

Uses FastMCP to create a transparent proxy around the dcert-mcp Rust binary, exposing all TLS certificate tools via the Model Context Protocol. New tools added to the Rust binary are automatically available without any Python code changes.

Requirements

  • Python 3.14+
  • The dcert-mcp Rust binary is automatically downloaded on first use (with SHA256 checksum verification)

Installation

pip install dcert

Quick Start

As a server

from dcert import create_server

server = create_server()
server.run()  # stdio mode (default)

As a client

import asyncio
from dcert import create_client

async def main():
    async with create_client() as client:
        tools = await client.list_tools()
        print(f"Available tools: {len(tools)}")

        result = await client.call_tool(
            "analyze_certificate", {"target": "example.com"}
        )
        print(result)

asyncio.run(main())

CLI

# stdio mode (default, for MCP clients like Claude Code)
dcert-python

# HTTP mode
dcert-python --transport http --host 0.0.0.0 --port 8080

# Pre-download binary
dcert-python --setup

# Explicit binary path
dcert-python --binary /usr/local/bin/dcert-mcp

Binary Discovery

The package locates the dcert-mcp Rust binary in this order:

  1. DCERT_MCP_BINARY environment variable
  2. Bundled binary in the package bin/ directory
  3. Auto-download from GitHub Releases (with SHA256 checksum verification)
  4. dcert-mcp on PATH

Environment Variables

The proxy forwards these environment variables to the Rust binary:

Category Variables
Proxy HTTP_PROXY, HTTPS_PROXY, NO_PROXY (and lowercase variants)
TLS SSL_CERT_FILE, SSL_CERT_DIR
dcert DCERT_PATH, DCERT_MCP_TIMEOUT, DCERT_MCP_CONNECTION_TIMEOUT, DCERT_MCP_READ_TIMEOUT

Scalability

This package uses the MCP proxy pattern: the Python layer never needs to know about individual dcert tools. All tool discovery, input schemas, and invocations are forwarded to the Rust binary via the MCP protocol at runtime. When new capabilities are added to the Rust server, they are immediately available through the Python wrapper.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dcert-3.0.14.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dcert-3.0.14-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file dcert-3.0.14.tar.gz.

File metadata

  • Download URL: dcert-3.0.14.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dcert-3.0.14.tar.gz
Algorithm Hash digest
SHA256 60d6da6841939fe1ac1bcb48552e028066fae24bae2e9f9439091d93be21dcf5
MD5 57481483ed829a11dec014ddd5d255fa
BLAKE2b-256 e1f205121b6e2722bd17404ed7b299f4a18e93297bf9f996690886ecfb63a50e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dcert-3.0.14.tar.gz:

Publisher: ci.yml on SCGIS-Wales/dcert

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dcert-3.0.14-py3-none-any.whl.

File metadata

  • Download URL: dcert-3.0.14-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dcert-3.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 c58aef8e93a5b388a9828f0dc372cc61aa0d7ccbdde437cbe25e696d1ba7db0a
MD5 25a13ed9754e09d99a315ee284b2460d
BLAKE2b-256 6173682f1046b525f1cb3a95a9cac5c0322f9c54a4944f4bd7f8f85ebd15478e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dcert-3.0.14-py3-none-any.whl:

Publisher: ci.yml on SCGIS-Wales/dcert

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page