MCP Common
MCP Common
Shared types and utilities for MCP proxy components.
Overview
mcp-common provides common functionality shared across mcp-sse-proxy and mcp-streamable-proxy to avoid code duplication.
Features
- Configuration Types:
McpServiceConfig,McpClientConfigfor unified configuration management - Tool Filtering:
ToolFilterfor filtering MCP tools by name or pattern - OpenTelemetry Support: Optional telemetry features for distributed tracing
Feature Flags
telemetry: Basic OpenTelemetry supportotlp: OTLP exporter support (for Jaeger, etc.)
Installation
Add to Cargo.toml:
[]
= { = "0.1.5", = "../mcp-common" }
Usage
use ;
// Create client configuration
let client_config = new
.with_headers;
// Create service configuration
let service_config = new
.with_persistent_type;
// Use tool filter
let filter = new;
Development
# Build
# Test
# With features
License
MIT OR Apache-2.0