| Crates.io | remote-mcp-kernel |
| lib.rs | remote-mcp-kernel |
| version | 0.1.0-alpha.7 |
| created_at | 2025-07-09 17:29:39.160531+00 |
| updated_at | 2025-07-12 01:18:27.263898+00 |
| description | A microkernel-based MCP (Model Context Protocol) server with OAuth authentication and multiple transport protocols |
| homepage | https://github.com/akihito/oauth-mcp-server |
| repository | https://github.com/akihito/oauth-mcp-server |
| max_upload_size | |
| id | 1745231 |
| size | 216,722 |
A microkernel-based MCP (Model Context Protocol) server with OAuth authentication and multiple transport protocols.
Add this to your Cargo.toml:
[dependencies]
remote-mcp-kernel = "0.1.0-alpha.1"
use remote_mcp_kernel::microkernel::MicrokernelServer;
use remote_mcp_kernel::handlers::{SseHandler, StreamableHttpHandler};
use oauth_provider_rs::providers::McpOAuthProvider;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create OAuth provider
let oauth_provider = McpOAuthProvider::new(/* ... */);
// Create handlers
let sse_handler = SseHandler::new(oauth_provider.clone());
let streamable_handler = StreamableHttpHandler::new(oauth_provider.clone());
// Build microkernel server
let server = MicrokernelServer::new()
.with_oauth_provider(oauth_provider)
.with_sse_handler(sse_handler, Default::default())
.with_streamable_handler(streamable_handler);
// Start server
server.start("127.0.0.1:8080".parse()?).await?;
Ok(())
}
use remote_mcp_kernel::microkernel::MicrokernelServer;
use oauth_provider_rs::providers::McpOAuthProvider;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let oauth_provider = McpOAuthProvider::new(/* ... */);
let server = MicrokernelServer::new()
.with_oauth_provider(oauth_provider);
server.start("127.0.0.1:8080".parse()?).await?;
Ok(())
}
The Remote MCP Kernel follows a microkernel architecture where:
The server can be configured through environment variables or programmatically:
use remote_mcp_kernel::config::Config;
let config = Config::from_env()?;
The crate includes several examples:
oauth_standard_mcp_server - Standard MCP server with OAuthoauth_cognito_mcp_server - AWS Cognito integrationoauth_cognito_dynamodb_mcp_server - Full AWS integrationRun examples with:
cargo run --example oauth_standard_mcp_server
Supports multiple OAuth providers:
Real-time, unidirectional communication from server to client:
let sse_handler = SseHandler::new(oauth_provider);
Bidirectional HTTP-based communication:
let streamable_handler = StreamableHttpHandler::new(oauth_provider);
The kernel provides comprehensive error handling:
use remote_mcp_kernel::error::{KernelError, KernelResult};
fn handle_request() -> KernelResult<()> {
// Your implementation
Ok(())
}
# Run tests
cargo test
# Run with specific features
cargo run --features aws-integration
# Build documentation
cargo doc --open
This project is licensed under the MIT License - see the LICENSE file for details.
oauth-provider-rs - OAuth 2.0 provider implementationrmcp - Model Context Protocol implementation