An enhanced version of the Model Context Protocol (MCP) designed specifically for industrial applications, focusing on security, performance, and reliability.
IMCP is based on the MCP architecture, optimized for industrial production scenarios with strict requirements for real-time performance, reliability, and security.
-
π Enhanced Security
- Dual-key authentication (both client and server have public/private key pairs)
- NaCl-based public/private key generation for all nodes
- Digital signatures for all exchanged data
- Secure key exchange using Curve25519
- Message authentication using Poly1305
-
β‘ Performance Optimization
- Binary protocol replacing JSON for better efficiency
- Connection pooling for resource optimization
- Asynchronous I/O for high throughput
- Message compression support
-
ποΈ Industrial Features
- Millisecond-level deterministic response
- Full lifecycle security compliance
- Support for industrial protocol stacks
- π Dual-Key Authentication: Both client and server maintain their own public/private key pairs
- π Secure Communication: Uses NaCl cryptography for end-to-end encryption
- π¦ Binary Protocol: Efficient binary message format using MessagePack
- β‘ Asynchronous I/O: Built on asyncio for high-performance networking
- π Connection Pooling: Efficient connection management
- π Digital Signatures: Message authentication using Ed25519
- π WebSocket Support: Real-time bidirectional communication
- π Industrial-Grade Security: Compliance with industrial security standards
- π High Performance: Optimized for industrial real-time requirements
IMCP implements a comprehensive security framework using NaCl cryptography:
- Node Authentication: Each node (client/server) has its own public/private key pair
- Public Key as Node Identifier: Node's public key serves as its unique identifier
- Key Exchange: Curve25519 (Elliptic Curve Diffie-Hellman) for secure session key establishment
- Symmetric Encryption: XSalsa20 stream cipher for message encryption
- Message Authentication: Poly1305 MAC for message integrity
- Digital Signatures: Ed25519 (based on EdDSA) for message signing
- Mutual Authentication: Both parties verify each other's identity
- End-to-End Encryption: All messages are encrypted using session keys
- Message Signing: All messages are digitally signed by the sender
- Session Key Management: Secure session key generation and exchange
These algorithms are proven to resist:
- Side-channel attacks
- Timing attacks
- Other common security threats
IMCP supports two operating modes:
-
π» STDIO Mode (Local Operation)
- Used when client and server are on the same host
- Optimized for local communication
- Lower latency and higher throughput
- Still maintains full security with key pairs
-
π SSE Mode (Remote Service)
- Used for remote client-server communication
- Implements additional security measures
- Optimized for network transmission
- Full dual-key authentication
- Clone the repository
git clone https://github.com/arkCyber/IMCP.git
cd IMCP
- Install dependencies:
pip install -r requirements.txt
- IMCP/
- imcp-py/.................# Python implementation
- imcp-ts/..................# TypeScript implementation
- imcp-rs/..................# Rust implementation
- imcp-analyzer/........# Protocol analyzer tool
- docs/.......................# Documentation
- examples/...............# Example applications
- assets/....................# Static assets
from imcp.server import IMCPServer
async def main():
# Server generates its own key pair if not provided
server = IMCPServer(host="0.0.0.0", port=8765)
await server.start()
asyncio.run(main())
from imcp.client import IMCPClient
async def main():
# Client generates its own key pair if not provided
async with IMCPClient("ws://localhost:8765") as client:
message = {
"type": "request",
"data": "Hello, IMCP Server!"
}
await client.send(message)
response = await client.receive()
print(response)
asyncio.run(main())
- Dual-Key System: Both client and server maintain their own key pairs
- Key Exchange: Curve25519 for secure key exchange
- Encryption: XSalsa20 for symmetric encryption
- Authentication: Ed25519 for digital signatures
- Message Integrity: Poly1305 for message authentication
- Secure Session Management: Connection pooling with session keys
- End-to-End Encryption: All messages are encrypted in transit
- Mutual Authentication: Both parties verify each other's identity
- Binary protocol using MessagePack
- Connection pooling
- Asynchronous I/O with asyncio
- Efficient message serialization
- Message compression support
- Optimized network transmission
IMCP is designed for various industrial scenarios:
- π Manufacturing: Real-time control and monitoring
- β‘ Energy: Power grid management and monitoring
- π¦ Transportation: Traffic control and management
- π₯ Healthcare: Medical device communication
- ποΈ Smart Cities: Infrastructure management
IMCP is designed to comply with:
- GDPR
- HIPAA
- IEC 62443
- Other relevant industrial security standards
We welcome contributions of all kinds! Whether you want to fix bugs, improve documentation, or propose new features.
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this project helpful and would like to support its development, consider buying me a coffee! Your support helps maintain and improve this project.
Found a bug or have a feature request? Please help us by:
- Checking the existing issues to avoid duplicates
- Creating a new issue with:
- A clear title and description
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Environment details (OS, version, etc.)
For security-related issues, please email [email protected] instead of creating a public issue.
Thanks to all contributors and the open source community. Special thanks to:
- MCP for the base protocol
- NaCl for cryptography
- WebSocket for real-time communication
- MessagePack for binary serialization
- MCP SDK for MCP clinet/server development
- Model Context Protocol - Base protocol architecture
- WebSocket Protocol - Real-time communication
- MessagePack - Efficient binary serialization
- NaCl (libsodium) - Cryptographic operations
- asyncio - Asynchronous I/O