Skip to main content

Overview

CertForge implements the Model Context Protocol (MCP), an open standard that lets AI assistants call structured tools over HTTP. Once connected, you can manage your certificate environment in plain language — no API client, no scripting.
Every tool call is logged with latency, status, and the key that made the request. The MCP / AI Agents dashboard (Settings → MCP / AI Agents) shows usage analytics and unsolved queries — requests the AI couldn’t fulfill because CertForge hasn’t exposed that capability yet.

Prerequisites

  • A CertForge API key with the mcp scope (Settings → API Keys → Add Key)
  • An MCP-compatible AI client (see Compatible Clients)

Endpoint

Self-hosted: replace app.certgov.app with your own hostname. Transport: Streamable HTTP (MCP 2024-11-05). Single POST endpoint; synchronous JSON responses.

Available Tools

Certificates & Audit

Governance — Query

Diagnostics

Setup Guidance

Action Tools — Create (two-step)

Action tools require explicit confirmation before writing anything. See Two-Step Confirmation below.

Feedback


Example: Diagnosing an ACME Issuance Failure

When a certificate fails to issue, the agent can trace the problem end-to-end:
The agent calls:
  1. check_domain(domain="secure.example.com") — finds the Trust Profile and Issuance Profile
  2. list_dns_accounts() — inspects the Cloudflare DNS account referenced by that profile
The DNS account response flags the issue immediately:
Fix: Settings → DNS Accounts → edit the Cloudflare account → add the Zone ID from your Cloudflare dashboard (domain → right sidebar → Zone ID).

Example: Certificate Security Rating

Every certificate issued by CertForge carries a security grade. The get_certificate tool includes it automatically:
Grades are computed from five factors: key algorithm (35 pts), signature algorithm (20 pts), validity period (20 pts), validity remaining (15 pts), and auto-renew (10 pts). SHA-1 or MD5 forces grade F regardless of other factors. The rating is also shown as a visual scorecard on the certificate detail page in the CertForge UI.

Two-Step Confirmation

All action tools (create_*) use a mandatory two-step flow. Passing dry_run=false alone is not enough — the tool also requires confirmed=true. This is enforced in code, not just instructions.

Step 1 — Preview (default)

Call the tool with any arguments. A preview is always returned first:

Step 2 — Execute

After the user confirms, call again with both dry_run: false and confirmed: true:
If either flag is missing, the preview is returned again — it cannot be bypassed.

Example: End-to-End nginx Setup

The plan_setup tool generates a personalized checklist from your current state:
The AI calls plan_setup(domain="fun.example.com", goal="nginx_auto_issuance") and gets back a step-by-step plan:
  1. Create an Issuance Profile (if none exists) → links to the Issuance Profiles guide
  2. Create a Trust Profile for fun.example.com → links to Trust Profiles
  3. Create an Application record → links to Applications
  4. Install the connector agent on the nginx host → links to Connector Agent
  5. Create an App Connector record → links to App Connector
  6. Verify end-to-end with check_domain and check_dns
Steps already completed are marked done. The AI then walks through each required step using the two-step create flow — previewing each change before creating it.

Setup: Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
Restart Claude Desktop. CertForge tools are available in every conversation.

Setup: Claude Code (CLI)

Claude Code runs on Linux, Mac, and Windows. Add CertForge as a server:
Verify:
Start a new claude session — MCP tools initialize at session start.

Setup: Cursor

Add to ~/.cursor/mcp.json (create if it doesn’t exist):
Restart Cursor. CertForge tools appear in the agent panel.

Setup: Zed

Add to ~/.config/zed/settings.json:

Setup: OpenAI-compatible clients (Grok, GPT-4o, etc.)

Clients that use OpenAI function-calling (xAI Grok, OpenAI Assistants, etc.) don’t support the MCP transport natively. Use mcp-bridge to proxy:
Then configure your client to call http://localhost:8080 for tools.

Compatible Clients


Analytics & Unsolved Queries

Every tool call is recorded in the MCP / AI Agents dashboard (Settings → MCP / AI Agents):
  • Tool Usage — which tools are called, how often, error rates, and average latency
  • Recent Calls — last 50 invocations with status, latency, arguments, and the key that made the call
  • Unsolved Queries — requests the AI logged via report_missing_capability when no tool existed for what the user asked
The Unsolved Queries list is a live product backlog. The most common gaps drive which MCP tools CertForge adds next.

Testing the Connection