SMCP
MCP connects agents to tools. It has no security.
A proof of concept for Secure MCP: authentication, encryption and audit, fully backward compatible.
Kevin Keller · kevinkeller.org
Why it matters
Most MCP deployments trust the transport and nothing else
- No authentication and no authorisation at the protocol level.
- No message-level encryption.
- No audit trail of which tools an agent used or what data it retrieved.
Acceptable for personal use. Not for enterprise production.
The gap
SMCP adds what standard MCP leaves to the developer
| Capability | Standard MCP | SMCP |
|---|---|---|
| Authentication | None | API keys, JWT, OAuth2/SAML |
| Authorisation | None | Role-based, per tool |
| Encryption | None | ECDH + AES-256-GCM |
| Audit trail | None | Full operation logging |
| Multi-agent | Not supported | Discovery and orchestration |
The idea
Choose the security tier that matches your threat model
Security is progressive: start simple in development, add encryption and audit as the stakes rise.
Four tiers
From a local API key to regulated-industry audit
- Simple (development): API key, no encryption.
- Basic (staging): JWT over HTTPS with token refresh.
- Encrypted (production): ECDH key exchange, AES-256-GCM, HMAC.
- Enterprise (regulated): OAuth2/SAML with full audit trails and compliance reporting.
Encrypted mode
Messages stay protected even if TLS is compromised
- Client and server exchange ECDH public keys once per session.
- Both derive a shared AES-256-GCM key.
- Every request and response is encrypted and HMAC-authenticated.
Encryption is independent of the transport layer.
Beyond security
Agents can find each other and share the work
- Agents register with a discovery service and advertise capabilities.
- An orchestrator splits requests into parallel subtasks.
- Built-in load balancing spreads work across instances.
- DuckDB and filesystem connectors inherit the requesting agent's security context.
Performance
Security adds overhead, but very little
| Operation | Overhead |
|---|---|
| ECDH key exchange | < 100ms, once per session |
| Agent discovery | < 50ms |
| AES-256-GCM encryption | < 10ms per message |
| JWT validation | < 5ms |
The risks it addresses
Unsecured agent tooling opens four doors
- Data exfiltration: tools read anything the host can
- Prompt injection: manipulated responses leave no trail
- Lateral movement: agents impersonate other agents
- Compliance: regulated industries need an audit trail for every AI action
The takeaway
Security can be layered onto MCP without breaking compatibility.
Kevin Keller · Proof of concept, not a production framework