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.13.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.13-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dcert-3.0.13.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.13.tar.gz
Algorithm Hash digest
SHA256 38c08da318af70f529e6cb9f5cea0a7db6dc9c136960697bd40b63f62732b994
MD5 2d57cad48d96fc0b62778b1f8712d26c
BLAKE2b-256 3497a14a6f455236fce61f17a176aae6e05792e06affa5ea5e27a67e80ba4ef8

See more details on using hashes here.

Provenance

The following attestation bundles were made for dcert-3.0.13.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.13-py3-none-any.whl.

File metadata

  • Download URL: dcert-3.0.13-py3-none-any.whl
  • Upload date:
  • Size: 10.2 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.13-py3-none-any.whl
Algorithm Hash digest
SHA256 907c273f3a2407c7adadde5b3b484b1cd55e72978afc7d30dea18698239220e9
MD5 5671d59a20ad19b23eafa59e4fadc619
BLAKE2b-256 fb07770b9f7261b947d08d11d21b672c57fbabf65b90df2259338064d56f9078

See more details on using hashes here.

Provenance

The following attestation bundles were made for dcert-3.0.13-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