About Smcp Security
Smcp Security is an MCP server in the Security category: secure Model Context Protocol (SMCP) v1 - Production-ready security framework for MCP implementations. It has been installed 0 times through Conduid.
Install
claude mcp add smcp-security -- npx -y smcp-securitynpx -y smcp-securityThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Smcp Security
Powered by Claude · Grounded in docs
Security checks
- ·README presentNot checked yet.
- ·License declaredNot checked yet.
- ·Tests presentNot checked yet.
- ·Dependencies pinnedNot checked yet.
- ·No dynamic code executionNot checked yet.
- ·Scoped permissionsNot checked yet.
README
SMCPv1 - Secure Model Context Protocol
A comprehensive, production-ready security framework for Model Context Protocol (MCP) implementations. SMCPv1 provides multi-layered security, AI-immune threat detection, and seamless integration across multiple programming languages.
Quick Start
Choose Your Language
Python
pip install smcp-security
from smcp_security import SMCPSecurityFramework
security = SMCPSecurityFramework()
validated_request = security.validate_request(mcp_request)
Node.js/TypeScript
npm install smcp-security
import { SMCPSecurityFramework } from 'smcp-security';
const security = new SMCPSecurityFramework();
const validatedRequest = await security.validateRequest(mcpRequest);
Go
go get github.com/wizardscurtain/SMCPv1/libraries/go@v1.0.0
import "github.com/wizardscurtain/SMCPv1/libraries/go/smcp"
security, _ := smcp.NewSecurityFramework(nil)
validatedRequest, _ := security.ValidateRequest(ctx, request)
Rust
cargo add smcp-security
use smcp_security::SecurityFramework;
let security = SecurityFramework::new(Default::default()).await?;
let validated_request = security.validate_request(&request).await?;
Java
<dependency>
<groupId>com.smcp</groupId>
<artifactId>smcp-security</artifactId>
<version>1.0.0</version>
</dependency>
SMCPSecurityFramework security = new SMCPSecurityFramework();
MCPRequest validatedRequest = security.validateRequest(request);
C#
dotnet add package SMCP.Security
var security = new SMCPSecurityFramework();
var validatedRequest = await security.ValidateRequestAsync(request);
VS Code Extension
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "SMCP Security"
- Click Install
- Right-click project folder → "Initialize SMCP Security"
Security Features
Multi-Layered Defense
- Input Validation: Command injection, XSS, path traversal prevention
- Authentication: JWT with MFA support
- Authorization: Role-based access control (RBAC)
- Rate Limiting: Adaptive DoS protection
- Encryption: End-to-end data protection
- AI-Immune System: ML-based threat detection
- Audit Logging: Comprehensive security monitoring
AI-Powered Threat Detection
- Real-time anomaly detection
- Behavioral analysis
- Attack pattern recognition
- Adaptive defense mechanisms
- Zero-day threat protection
Production-Ready Performance
- Minimal Overhead: < 1ms latency impact
- High Throughput: 10,000+ requests/second
- Memory Efficient: < 50MB footprint
- Horizontally Scalable: Cloud-native architecture
- Framework Agnostic: Works with any MCP implementation
Libraries & Integration
Core Libraries
| Language | Package | Installation | Documentation |
|---|---|---|---|
| Python | smcp-security |
pip install smcp-security |
📖 Docs |
| Node.js | smcp-security |
npm install smcp-security |
📖 Docs |
| Go | github.com/wizardscurtain/SMCPv1/libraries/go |
go get github.com/wizardscurtain/SMCPv1/libraries/go@v1.0.0 |
📖 Docs |
| Rust | smcp-security |
cargo add smcp-security |
📖 Docs |
| Java | com.smcp:smcp-security |
Maven/Gradle dependency | 📖 Docs |
| C# | SMCP.Security |
dotnet add package SMCP.Security |
📖 Docs |
Developer Tools
| Tool | Platform | Installation | Features |
|---|---|---|---|
| VS Code Extension | Visual Studio Marketplace | Search "SMCP Security" | Code snippets, config UI, testing tools, audit viewer |
Framework Support
Python
- ✅ FastAPI
- ✅ Flask
- ✅ Django
- ✅ Starlette
Node.js/TypeScript
- ✅ Express
- ✅ Fastify
- ✅ Koa
- ✅ NestJS
Go
- ✅ Gorilla Mux
- ✅ Gin
- ✅ Echo
- ✅ Fiber
Rust
- ✅ Axum
- ✅ Warp
- ✅ Actix-web
- ✅ Rocket
Java
- ✅ Spring Boot
- ✅ Quarkus
- ✅ Micronaut
- ✅ Helidon
C#
- ✅ ASP.NET Core
- ✅ Minimal APIs
- ✅ Blazor
- ✅ gRPC
Architecture
graph TB
A[MCP Request] --> B[Input Validation]
B --> C[AI Threat Detection]
C --> D[Rate Limiting]
D --> E[Authentication]
E --> F[Authorization]
F --> G[Request Processing]
G --> H[Audit Logging]
H --> I[MCP Response]
J[Security Policies] --> B
J --> C
J --> D
J --> E
J --> F
K[ML Models] --> C
L[User Database] --> E
M[Role Database] --> F
N[Audit Database] --> H
Security Layers
-
Input Validation Layer
- Schema validation
- Content sanitization
- Injection attack prevention
- Path traversal protection
-
AI Threat Detection Layer
- Anomaly detection
- Behavioral analysis
- Pattern recognition
- Risk scoring
-
Rate Limiting Layer
- Per-user limits
- Per-IP limits
- Adaptive thresholds
- DoS protection
-
Authentication Layer
- JWT token validation
- Multi-factor authentication
- Session management
- Token refresh
-
Authorization Layer
- Role-based access control
- Permission validation
- Resource-level security
- Dynamic policies
-
Audit Layer
- Security event logging
- Compliance reporting
- Real-time monitoring
- Forensic analysis
Configuration
Basic Configuration
{
"security": {
"enableInputValidation": true,
"validationStrictness": "maximum",
"enableMFA": true,
"enableRBAC": true,
"enableRateLimiting": true,
"defaultRateLimit": 100,
"enableAIImmune": true,
"anomalyThreshold": 0.8,
"enableAuditLogging": true
}
}
Advanced Configuration
{
"security": {
"inputValidation": {
"strictness": "maximum",
"maxRequestSize": "1MB",
"allowedMethods": ["tools/list", "tools/call"],
"blockedPatterns": ["../", "<script>", "DROP TABLE"]
},
"authentication": {
"jwtSecret": "${JWT_SECRET}",
"expirySeconds": 3600,
"mfa": {
"enabled": true,
"issuer": "SMCP Security",
"algorithm": "SHA1"
}
},
"authorization": {
"rbac": {
"enabled": true,
"defaultRole": "user",
"roles": {
"admin": ["*"],
"user": ["tools:list", "tools:call"],
"readonly": ["tools:list"]
}
}
},
"rateLimiting": {
"global": 1000,
"perUser": 100,
"perIP": 200,
"windowMs": 60000,
"adaptive": true
},
"aiImmune": {
"enabled": true,
"anomalyThreshold": 0.8,
"learningMode": false,
"models": ["anomaly_detection", "threat_classification"]
},
"audit": {
"enabled": true,
"logLevel": "INFO",
"destinations": ["file", "database", "siem"],
"retention": "90d"
}
}
}
Monitoring & Analytics
Security Metrics
metrics = security.get_security_metrics()
print(f"Total requests: {metrics.total_requests}")
print(f"Blocked requests: {metrics.blocked_requests}")
print(f"Threats detected: {metrics.threats_detected}")
print(f"Average response time: {metrics.average_response_time}ms")
Real-time Monitoring
- Security Dashboard: Real-time threat visualization
- Alert System: Immediate notification of security events
- Compliance Reports: Automated compliance reporting
- Performance Metrics: Security overhead monitoring
Integration with Monitoring Systems
- Prometheus: Metrics export
- Grafana: Dashboard visualization
- ELK Stack: Log aggregation and analysis
- Splunk: SIEM integration
- DataDog: APM integration
Testing & Validation
Security Testing
# Run security test suite
python -m pytest tests/security/ -v
# Run penetration tests
python -m smcp_security.testing.pentest
# Run compliance tests
python -m smcp_security.testing.compliance
Performance Testing
# Benchmark security overhead
python -m smcp_security.testing.benchmark
# Load testing
python -m smcp_security.testing.load_test --requests 10000 --concurrent 100
Vulnerability Scanning
# Scan for known vulnerabilities
python -m smcp_security.testing.vuln_scan
# Check dependencies
python -m smcp_security.testing.dep_check
Deployment
Docker
FROM python:3.11-slim
RUN pip install smcp-security
COPY app.py .
COPY smcp-config.json .
EXPOSE 8000
CMD ["python", "app.py"]
Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
name: smcp-secure-app
spec:
replicas: 3
selector:
matchLabels:
app: smcp-secure-app
template:
metadata:
labels:
app: smcp-secure-app
spec:
containers:
- name: app
image: your-app:latest
env:
- name: SMCP_CONFIG
valueFrom:
configMapKeyRef:
name: smcp-config
key: config.json
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: smcp-secrets
key: jwt-secret
Cloud Platforms
- AWS: Lambda, ECS, EKS support
- Google Cloud: Cloud Run, GKE support
- Azure: Container Instances, AKS support
- Render: Native deployment support
Documentation
Getting Started
Security Guides
API Documentation
Examples
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
# Clone the repository
git clone https://github.com/wizardscurtain/SMCPv1.git
cd SMCPv1
# Install development dependencies
./scripts/setup-dev.sh
# Run tests
./scripts/test-all.sh
# Build all libraries
./scripts/build-all.sh
Publishing Libraries
# Publish all libraries
./scripts/publish-all.sh
# Publish specific library
./scripts/publish-python.sh
./scripts/publish-nodejs.sh
./scripts/publish-go.sh
./scripts/publish-rust.sh
./scripts/publish-java.sh
./scripts/publish-csharp.sh
./scripts/publish-vscode.sh
Security
Reporting Security Issues
For security issues, please email security@smcp.dev instead of using the issue tracker.
Security Advisories
Compliance
- SOC 2 Type II: Compliant
- ISO 27001: Aligned
- GDPR: Privacy by design
- HIPAA: Healthcare ready
- PCI DSS: Payment card industry compliant
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Model Context Protocol team for the foundational protocol
- Security researchers and contributors
- Open source community for libraries and tools
Support
Email: support@smcp.dev Discussions: GitHub Discussions Issues: GitHub Issues Documentation: docs.smcp.dev Website: smcp.dev
Made with ❤️ by the Aevom Labs Team
README mirrored from the source repository 4 months ago. The original is authoritative.