mcp-regru-mtls
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-regru-mtls
MCP server for managing DNS records via the Reg.ru API 2.0, with client TLS certificate (mTLS) support.
A fork of konser80/mcp-regru. The upstream server authenticates with a username and password only. Some Reg.ru accounts additionally require a client certificate ("SSL для API"), and such accounts answer every password-only request with:
{ "result": "error", "error_code": "NO_CERTIFICATE", "error_text": "..." }This fork keeps everything upstream does and adds certificate authentication, so the same MCP server works for both kinds of accounts.
Works with Claude Code, Cursor, OpenCode and any other MCP-compatible client.
Requirements
Node.js >= 18
A Reg.ru account with API 2.0 access enabled
Related MCP server: OrgSuite GoDaddy MCP
Installation
git clone https://github.com/FerrumLogic/mcp-regru-mtls.git
cd mcp-regru-mtls
npm install
npm run buildThe server entry point is dist/index.js (absolute path needed in client configs).
Configuration
All settings come from environment variables:
Variable | Required | Description |
| Yes | Reg.ru account username |
| Yes | Reg.ru account password |
| No | Path to the client certificate (PEM), e.g. |
| No | Path to the certificate private key (PEM), e.g. |
| No | The same certificate, base64-encoded, in a single variable |
| No | The same private key, base64-encoded, in a single variable |
| No | HTTP proxy URL (e.g. |
Certificate settings are resolved in this order:
Files —
REGRU_CERT_PATH+REGRU_KEY_PATHBase64 —
REGRU_CERT_BASE64+REGRU_KEY_BASE64(fallback, convenient for Docker, CI and remote agents)Nothing set — password-only authentication, exactly like upstream
Only one of the two pairs is used: if the path pair is complete, the base64 pair is ignored. A half-specified pair (cert without key, or the reverse) is a startup error — the server prints the problem to stderr and exits with code 1 instead of silently dropping mTLS and failing later with a confusing NO_CERTIFICATE.
At startup the server logs which mode it picked (to stderr, so it never pollutes the stdio MCP channel):
Using client certificate: files /home/me/.creds/regru.crt / /home/me/.creds/regru.key
Using client certificate: base64 environment variables
No client certificate configured, using password-only authenticationmTLS: client certificates
Why it is needed
Reg.ru can protect API 2.0 with a client certificate. When that option is on, the API validates the TLS client certificate in addition to username and password. Without a certificate the connection is rejected with NO_CERTIFICATE, no matter how correct the password is. This is mutual TLS (mTLS): both sides present a certificate.
The upstream server only sends username/password in the POST body, so it cannot work with such an account. This fork loads the certificate and private key into the TLS layer via undici's Agent, so the handshake itself carries the certificate.
How to get a certificate in the Reg.ru panel
Generate a self-signed key pair (Reg.ru accepts a self-signed certificate; the public part is uploaded to the panel):
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ -keyout regru.key -out regru.crt \ -subj "/CN=regru-api-client" chmod 600 regru.keyIn the Reg.ru personal account open Настройки безопасности → https://www.reg.ru/user/prefs/security and click «Управление сертификатами». Follow the instructions there and upload the contents of
regru.crt.Keep
regru.keyprivate: it is the secret half of the pair. Store both files outside the repository, for example in~/.creds/regru/, and never commit them.Make sure the machine's public IP is allowed in the API settings as well — Reg.ru checks the IP allowlist independently of the certificate (see Troubleshooting).
Mode 1 — certificate files (recommended for a workstation)
{
"REGRU_USERNAME": "your_username",
"REGRU_PASSWORD": "your_password",
"REGRU_CERT_PATH": "/home/you/.creds/regru/regru.crt",
"REGRU_KEY_PATH": "/home/you/.creds/regru/regru.key"
}Paths are read once at startup. The key may be an unencrypted PEM (BEGIN PRIVATE KEY or BEGIN RSA PRIVATE KEY); encrypted keys are not supported by Node's TLS stack without a passphrase, so generate the pair with -nodes.
Mode 2 — base64 in environment variables (Docker, CI, remote agents)
Useful when there is no filesystem to mount, or when secrets are injected as environment values by a secret manager:
# one-line base64, no wrapping
base64 -w0 regru.crt # Linux
base64 regru.crt | tr -d '\n' # macOSThen set:
{
"REGRU_USERNAME": "your_username",
"REGRU_PASSWORD": "your_password",
"REGRU_CERT_BASE64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t...",
"REGRU_KEY_BASE64": "LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0t..."
}Whitespace inside the value is ignored, and literal \n sequences are tolerated, so a PEM pasted with escaped newlines still decodes.
Base64 is an encoding, not encryption. Anyone who can read the environment of the process can read the key — protect the config file with
chmod 600and prefer a secret manager where available.
Mode 3 — password only (upstream behaviour)
If the account does not require a certificate, set neither pair and the server behaves exactly like upstream:
{
"REGRU_USERNAME": "your_username",
"REGRU_PASSWORD": "your_password"
}Certificates and proxy together
If both REGRU_PROXY and a certificate pair are set, the certificate is attached to the proxy tunnel's TLS handshake (requestTls of undici's ProxyAgent), so mTLS keeps working through an HTTP proxy instead of being silently dropped.
Client configuration
Claude Code
Project-level .mcp.json in the repository root, or ~/.claude/settings.json for all projects:
{
"mcpServers": {
"regru": {
"command": "node",
"args": ["/absolute/path/to/mcp-regru-mtls/dist/index.js"],
"env": {
"REGRU_USERNAME": "your_username",
"REGRU_PASSWORD": "your_password",
"REGRU_CERT_PATH": "/home/you/.creds/regru/regru.crt",
"REGRU_KEY_PATH": "/home/you/.creds/regru/regru.key"
}
}
}
}Same with base64 instead of paths — swap the two *_PATH keys for REGRU_CERT_BASE64 / REGRU_KEY_BASE64.
Cursor
.cursor/mcp.json in the project or ~/.cursor/mcp.json globally:
{
"mcpServers": {
"regru": {
"command": "node",
"args": ["/absolute/path/to/mcp-regru-mtls/dist/index.js"],
"env": {
"REGRU_USERNAME": "your_username",
"REGRU_PASSWORD": "your_password",
"REGRU_CERT_PATH": "/home/you/.creds/regru/regru.crt",
"REGRU_KEY_PATH": "/home/you/.creds/regru/regru.key"
}
}
}
}OpenCode
opencode.json (project) or ~/.config/opencode/opencode.json (global). Note that OpenCode uses command as an array and environment instead of env:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"regru": {
"type": "local",
"command": ["node", "/absolute/path/to/mcp-regru-mtls/dist/index.js"],
"environment": {
"REGRU_USERNAME": "your_username",
"REGRU_PASSWORD": "your_password",
"REGRU_CERT_PATH": "/home/you/.creds/regru/regru.crt",
"REGRU_KEY_PATH": "/home/you/.creds/regru/regru.key"
}
}
}
}For base64 in OpenCode, keep the values on a single line inside environment:
"environment": {
"REGRU_USERNAME": "your_username",
"REGRU_PASSWORD": "your_password",
"REGRU_CERT_BASE64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t...",
"REGRU_KEY_BASE64": "LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0t..."
}Other MCP clients
Use the stdio transport your client supports: command node, argument /absolute/path/to/mcp-regru-mtls/dist/index.js, and the environment variables listed above.
Tools
Tool | Description |
| Check if one or more domains are available for registration |
| Get all DNS records for a domain |
| Add an A record (IPv4) |
| Add an AAAA record (IPv6) |
| Add a CNAME record (alias) |
| Add an MX record (mail exchange) |
| Add a TXT record (SPF, DKIM, verification) |
| Add an NS record (nameserver delegation) |
| Add an SRV record (service discovery) |
| Add a CAA record (certificate authority) |
| Remove a specific DNS record |
| Bulk add/remove DNS records |
| Update SOA record TTL settings |
| Replace the domain's authoritative nameservers (with optional glue records) |
| Get the domain's current authoritative nameservers |
| Remove all DNS records (destructive) |
Usage examples
Once configured, manage DNS through natural language:
"Is example.com available?"
"Check example.com, example.ru and example.net"
"Show DNS records for example.com"
"Point www.example.com to 1.2.3.4"
"Add an MX record for Google Workspace"
"Add an SPF record for example.com"
"Remove the old A record for api.example.com"
Troubleshooting
Symptom | Cause and fix |
| The account requires a client certificate and none was sent. Set |
| Only half of the pair is configured. Set both variables or neither. |
| Wrong path, or the client runs as a different user. Use an absolute path and check |
| The key is not readable by the user running the MCP client. |
| Reg.ru rejects the request because the machine's public IP is not in the API allowlist. Add the IP in the personal account; the certificate does not replace the allowlist. |
TLS handshake errors mentioning the key | The key does not match the certificate, or it is passphrase-protected. Regenerate the pair with |
Server starts but tools fail with auth errors | Check |
Server diagnostics go to stderr and appear in the MCP client's log for this server.
Security notes
Never commit
*.crt,*.key,*.pem,.envfiles or base64-encoded keys..gitignorein this repository already covers the common certificate extensions.Keep the private key outside the repository (
~/.creds/...) and readable only by your user (chmod 600).Base64 variables are convenient but not secret storage: config files holding them need
chmod 600.Rotate the pair if the key may have leaked: upload the new certificate in the Reg.ru panel and replace both files/variables.
Development
npm run dev # Watch mode with tsx
npm run build # Compile TypeScript
npm start # Run compiled serverARCHITECTURE.md describes the code layout and how to add a new tool.
License
MIT — see LICENSE.
Original project: konser80/mcp-regru, © konser80. mTLS support and base64 configuration: © FerrumLogic.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage Kubana Cloud DNS zones and A, AAAA, CNAME, MX, TXT and NS records; check delegation.
Check domains, read domains and DNS zones, and update DNS zone records in Realtime Register.
Domain search and prices; authenticated registration, nameserver and renewal workflows.
MCP server for DNSimple — domains, DNS zone records, availability, pricing and contacts.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables DNS record CRUD operations (list, get, create, update, delete) through MCP tools, provider-agnostic and secure.MIT
- FlicenseNot gradedqualityBmaintenanceEnables authenticated management of GoDaddy domains and DNS records through JSON-RPC tools, with domain allowlisting, dry-run planning, and support for Microsoft 365 and SSL DNS configurations.-
- AlicenseBqualityBmaintenanceEnables managing REG.RU domain names, DNS zones and records, services, billing, DNSSEC, and account folders through REG.API 2.0 over the Model Context Protocol. Provides tools, resources, and prompts for domain availability checks, DNS record edits, renewals, balance and invoice lookups, plus workflows like expiring-service audits and VPS domain configuration.18MIT
- AlicenseAqualityCmaintenanceEnables checking domain availability through authoritative registry queries and resolving live DNS records such as A, NS, MX, and TXT for any domain.2MIT