Prompt Defend MCP Server (Python)
A Model Context Protocol (MCP) server that exposes Prompt Defend's 16-layer guardrail system as tools for AI agents.
Installation
pip install promptdefend-mcp
Or install from source:
cd framework/promptdefend-mcp/python
pip install -e .
Quick Start
As a Standalone Server
promptdefend-mcp --api-key your-api-key
With Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"promptdefend": {
"command": "promptdefend-mcp",
"args": ["--api-key", "your-api-key"]
}
}
}
Available Tools
scan_prompt
Scan a prompt for security threats using 16-layer guardrails.
Input:
{
"prompt": "string - The prompt to scan"
}
Output:
{
"safe": true,
"reason": "No threats detected",
"details": {...}
}
check_blocklist
Check if a prompt contains known attack keywords.
Input:
{
"prompt": "string - The prompt to check"
}
check_allowlist
Check if a prompt matches safe/educational phrases.
Input:
{
"prompt": "string - The prompt to check"
}
Environment Variables
| Variable | Description |
|---|---|
PROMPTDEFEND_API_KEY |
Your Prompt Defend API key |
PROMPTDEFEND_BASE_URL |
Custom API endpoint (optional) |
License
Proprietary - See LICENSE for details.
© 2026 Prompt Defend. All Rights Reserved.
Metadata
Release files for promptdefend-mcp 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| promptdefend_mcp-1.0.0.tar.gz | 3.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| promptdefend_mcp-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.9 kB
Release files / promptdefend_mcp-1.0.0.tar.gz
| Download URL | promptdefend_mcp-1.0.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
040c90851963d6319ad6da2cae73657a4495fca40169800a21a77f364b055bb9
|
|
BLAKE2b-256 checksum How to use checksums |
c839fe3c40f64a458af0bbd070443564f45bff216f65cebd70c583e64a7eb820
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Release files / promptdefend_mcp-1.0.0-py3-none-any.whl
| Download URL | promptdefend_mcp-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1175dea1a64cde822104bfad77576c34db102290c9819d24ad1ad99e3a9bb777
|
|
BLAKE2b-256 checksum How to use checksums |
2e5e23c87b882ff9890dad194ee40ca353e61ed041a016566fcab151546cbe06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Security for promptdefend-mcp 1.0.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.