Skip to main content

spm-mcp: MCP server for Secure Proxy Manager

A Model Context Protocol server that exposes part of the Secure Proxy Manager management API as tools, so an assistant or agent can query traffic and analytics, read the WAF categories and the domain blacklist, and, when you allow it, change them. It talks to the backend API with HTTP Basic authentication over the stdio transport.

Tools

Tool API call Registered
spm_status GET /api/status always
spm_dashboard GET /api/dashboard/summary always
spm_top_domains GET /api/analytics/top-domains always
spm_shadow_it GET /api/analytics/shadow-it always
spm_user_agents GET /api/analytics/user-agents always
spm_recent_logs GET /api/logs?limit=<n> (default 50) always
spm_waf_categories GET /api/waf/categories always
spm_list_domain_blocklist GET /api/domain-blacklist always
spm_block_domain POST /api/domain-blacklist only with SPM_MCP_READONLY=false
spm_unblock_domain DELETE /api/domain-blacklist/{id} only with SPM_MCP_READONLY=false
spm_toggle_waf_category POST /api/waf/categories/toggle only with SPM_MCP_READONLY=false
spm_allow_egress POST /api/egress-allowlist only with SPM_MCP_READONLY=false
spm_reload_config POST /api/maintenance/reload-config only with SPM_MCP_READONLY=false

The server is read-only by default. The read tools return traffic data that anyone whose requests cross the proxy can shape (URLs, domains, user agents), so text in a log row can try to instruct the model; with the mutating tools available, an auto-approved call could disable a WAF category or open egress. The output of spm_dashboard, spm_top_domains, spm_shadow_it, spm_user_agents and spm_recent_logs is wrapped in {"untrusted_data_notice": ..., "data": ...}, and every tool carries MCP annotations (readOnlyHint, destructiveHint) for the client's approval prompt. If you enable the mutating tools, do not auto-approve them.

Configure

Env Default Meaning
SPM_URL http://localhost:5001 SPM backend API base URL
SPM_USERNAME admin SPM admin user (Basic auth)
SPM_PASSWORD empty SPM admin password
SPM_VERIFY true false to skip TLS verification for a self-signed HTTPS URL
SPM_MCP_READONLY true false, 0 or no to also register the mutating tools

http://localhost:5001 is the backend's host-only port, so the default works on the machine that runs the stack. From elsewhere, use https://<host>:8443 with SPM_VERIFY=false (or a trusted certificate).

Run

With uv, from PyPI:

SPM_URL=http://localhost:5001 SPM_USERNAME=admin SPM_PASSWORD=... uvx spm-mcp

From this directory of a clone:

SPM_URL=http://localhost:5001 SPM_USERNAME=admin SPM_PASSWORD=... \
  uvx --from . spm-mcp

In an MCP client configuration (for example Claude Desktop):

{
  "mcpServers": {
    "secure-proxy-manager": {
      "command": "uvx",
      "args": ["spm-mcp"],
      "env": {
        "SPM_URL": "http://localhost:5001",
        "SPM_USERNAME": "admin",
        "SPM_PASSWORD": "your-password"
      }
    }
  }
}

The Dockerfile here builds an image that runs the server over stdio as a non-root user; the shipped compose files do not include it.

Requires Python 3.11 or later. MIT-licensed, part of Secure Proxy Manager.

Metadata

Release files for spm-mcp 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spm-mcp 0.3.0
File Size Uploaded Provenance Actions
spm_mcp-0.3.0.tar.gz 5.3 kB With provenance Details for spm_mcp-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spm-mcp 0.3.0
File Interpreter ABI Platform Actions
spm_mcp-0.3.0-py3-none-any.whl Python 3 none any Details for spm_mcp-0.3.0-py3-none-any.whl

Total release size: 11.2 kB

Release files / spm_mcp-0.3.0.tar.gz

Download URL spm_mcp-0.3.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
141b3b04e87f43adb0fc41bcc20d2fab88c685384b4bafe6efd85af8860d22a3
BLAKE2b-256 checksum
How to use checksums
75c327cee033b12f7bf87bd2d9be20dd81d4b4e5df4be764b1c551c4fa48e3f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / spm_mcp-0.3.0-py3-none-any.whl

Download URL spm_mcp-0.3.0-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17b53c5bc8dbe3b3b85ce62012b4bad0554787e2ca76cc97bdb53be707680bb4
BLAKE2b-256 checksum
How to use checksums
1676edd755684f0e108228ab87fbe596b6882f67ad223b2e6693d51afa93434a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for spm-mcp 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for spm_mcp-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page