| Crates.io | mcp-common |
| lib.rs | mcp-common |
| version | 0.1.14 |
| created_at | 2025-12-30 12:55:37.73745+00 |
| updated_at | 2026-01-11 18:33:33.683166+00 |
| description | Common types and utilities shared across MCP proxy components |
| homepage | |
| repository | https://github.com/nuwax-ai/mcp-proxy |
| max_upload_size | |
| id | 2012598 |
| size | 64,939 |
Shared types and utilities for MCP proxy components.
mcp-common provides common functionality shared across mcp-sse-proxy and mcp-streamable-proxy to avoid code duplication.
McpServiceConfig, McpClientConfig for unified configuration managementToolFilter for filtering MCP tools by name or patterntelemetry: Basic OpenTelemetry supportotlp: OTLP exporter support (for Jaeger, etc.)Add to Cargo.toml:
[dependencies]
mcp-common = { version = "0.1.5", path = "../mcp-common" }
use mcp_common::{McpServiceConfig, McpClientConfig, ToolFilter};
// Create client configuration
let client_config = McpClientConfig::new("http://localhost:8080/mcp")
.with_headers(vec![("Authorization".to_string(), "Bearer token".to_string())]);
// Create service configuration
let service_config = McpServiceConfig::new("my-service".to_string())
.with_persistent_type();
// Use tool filter
let filter = ToolFilter::new(vec!["tool1".to_string(), "tool2".to_string()]);
# Build
cargo build -p mcp-common
# Test
cargo test -p mcp-common
# With features
cargo build -p mcp-common --features telemetry,otlp
MIT OR Apache-2.0