MCP Biscuit Security Proof of Concept
A demonstration of enhanced cryptographic authorization using Biscuit tokens with mTLS client certificates, Model Context Protocol (MCP) servers, and PostgreSQL Row-Level Security.
Power your agent
पब्लिशर का इंस्टॉल। PlugMCP एंडपॉइंट नहीं।
Host a copy with our keys and logs.
रजिस्ट्री में अभी कोई पैकेज्ड रिलीज़ नहीं है। रिपॉज़िटरी का README देखें.
रिमोट URL या आपकी मशीन पर कमांड? दोनों इंस्टॉल में क्या अंतर है
PlugMCP पर चलाएँ
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
लॉन्चपब्लिशर से
A demonstration of enhanced cryptographic authorization using Biscuit tokens with mTLS client certificates, Model Context Protocol (MCP) servers, and PostgreSQL Row-Level Security.
A PoC to show how biscuits can be used to demonstrate the right way to do MCP security. Uses Postgres and a modified version of Stuart Pennant's excellent pg-mcp-server.
This proof of concept shows how Biscuit tokens combined with mTLS client certificates can provide enterprise-grade, cryptographically secure authorization for database access through MCP servers. Unlike traditional bearer tokens, this enhanced security model provides 4 layers of defense with transport security, token cryptography, database privileges, and row-level filtering.
Client + mTLS Certificate + Enhanced Biscuit Token
↓
mTLS Transport Security
↓
Custom mTLS HTTP Server
↓
Client Certificate + Token Verification
↓
MCP Server Integration
↓
PostgreSQL Database (RLS Policies)
↓
Filtered Results Based on Token Facts
This PoC implements data taint tracking to prevent data exfiltration via internet-accessible tools:
sensitive_data=1 fact in a new blockData Taint Workflow:
1. Clean Token → Database Query → Success
2. Database returns data + Attenuated Token with sensitive_data=1
3. Attenuated Token → Internet Tool → REJECTED (🔒 Data exfiltration prevented!)
4. Clean Token → Internet Tool → Allowed (normal operation)
This creates an information flow control mechanism where tokens carry evidence of having accessed sensitive data, preventing accidental or malicious data exfiltration.
Follow the setup instructions in [SCRIPT.md]
MCP-biscuit-PoC/
├── 📄 README.md # Project overview (this file)
├── 📄 SCRIPT.md # Step-by-step setup guide
├── 📄 SECURITY.md # Technical security deep dive
├── 📄 MTLS_IMPLEMENTATION.md # mTLS technical documentation
├── 🎭 demo_magic_security.sh # Main demo script for presentations
├── 🔧 pyproject.toml # Python dependencies
├── 🔐 biscuit_parser_module.py # Core biscuit token operations
├── 🛠️ utilities/ # Token generation and parsing tools
├── 🖥️ server/ # MCP server, mTLS proxy and implementation
├── 🔒 certs/ # Certificate Authority and mTLS certificates
├── 👥 example-clients/ # Demo client applications
└── 💾 database/ # Database setup scripts
demo_magic_security.sh: Main interactive demo script for presentationsbiscuit_parser_module.py: Core Biscuit token parsing and validationutilities/biscuit_generator.py: Token generation with custom facts and rulesserver/app.py: Main MCP server with PostgreSQL integrationserver/mtls_proxy.py: mTLS proxy server for secure transportserver/tools/query.py: Database query execution with Biscuit token authenticationexample-clients/claude_cli_tls.py: TLS-enabled MCP client with Claude APIEnhanced Token = {
Original Facts: [patient_name("Erin oRTEga")],
mTLS Attestation: [
mtls_client("claude-client"),
mtls_audience("mcp-server"),
attestation_time(1234567890)
],
Rules: [allow($user, $resource, $operation) <- ...],
Checks: [
check if user("alice"),
check if mtls_client("claude-client"),
check if mtls_audience("mcp-server")
],
Signature: cryptographic_signature
}
# Start the comprehensive interactive security demo
./demo_magic_security.sh
# Test authorized access with Biscuit tokens
uv run python example-clients/claude_cli.py "Show me all medical records for patient Erin oRTEga"
# Test with TLS-enabled client
uv run python example-clients/claude_cli_tls.py "Show me all medical records for patient Erin oRTEga"
# Inspect Biscuit tokens and their facts
uv run python utilities/biscuit_parser_cli.py TOKEN --public-key KEY --analyze
# Start the MCP server
PYTHONPATH=. uv run python server/app.py
# Start the mTLS proxy server
PYTHONPATH=. uv run python server/mtls_proxy.py
# Test server endpoints with curl (requires client certificate)
curl -k --cert certs/claude-client-cert.pem --key certs/claude-client-key.pem \
https://localhost:8443/sse
This PoC demonstrates several important concepts:
# Add new authorized client certificates
./certs/create-client-cert.sh new-client-name
# Update server/tls_config.py authorized_clients list
facts = ['patient_name("Erin oRTEga")', f'expiry({int(expiry.timestamp())})']
checks = ['check if time($time), expiry($exp), $time <= $exp']
facts = ['user("alice")', 'role("nurse")', 'department("cardiology")',
'mtls_client("nurse-workstation")', 'mtls_audience("mcp-server")']
rules = ['allow($u, $r, "read") <- user($u), role("nurse"), resource($r)']
# Different client identities for testing
workstation_token = generator.add_mtls_attestation_block(token, "workstation-1", "mcp-server")
mobile_token = generator.add_mtls_attestation_block(token, "mobile-client", "mcp-server")
This project demonstrates concepts for educational purposes. Feel free to:
See LICENSE file for details.
Built with: Python 3.13, FastMCP, PostgreSQL, Biscuit-python, Anthropic Claude API
Demonstrates: Enhanced mTLS + Biscuit security, Row-level security, Defense-in-depth architecture, Certificate-based identity, AI-powered secure database access
A PoC to show how biscuits can be used to demonstrate the right way to do MCP security. Uses Postgres and a modified version of Stuart Pennant's excellent pg-mcp-server.
टूल
अभी टूल सूची नहीं है। रिमोट सर्वर को पहले हेल्थ चेक के बाद सूची मिलती है।
FAQ
इस पेज पर Cursor, Claude Desktop, Claude Code या VS Code के लिए stdio कॉन्फ़िग कॉपी करें। यह पब्लिशर का इंस्टॉल इस्तेमाल करता है, PlugMCP प्रॉक्सी नहीं।
इस रिकॉर्ड में कोई ज़रूरी एनवायरनमेंट वेरिएबल दर्ज नहीं है।
MCP Biscuit PoC stdio पर लोकल चलता है।
पिछली जाँच 2026-10-28 को हुई। A PoC to show how biscuits can be used to demonstrate the right way to do MCP security. Uses Postgres and a modified version of Stuart Pennant's excellent pg-mcp-server.