Expand description
§MCP Tools - Unified MCP Tools Crate
A comprehensive collection of MCP (Model Context Protocol) servers and clients built on top of the powerful CoderLib library. This crate provides standalone MCP servers that can be used with any MCP-compatible client (Claude Desktop, etc.) and clients for testing and development.
§Features
§MCP Servers
- File Operations Server - File system operations with security
- Git Tools Server - Git repository management and analysis
- Code Analysis Server - Language-aware code analysis and refactoring
- Web Tools Server - Web scraping and HTTP operations
- System Tools Server - System information and process management
§MCP Clients
- CLI Client - Command-line MCP client for testing
- Desktop Client - GUI client for interactive use
§Quick Start
§Running a File Operations Server
cargo run --bin mcp-file-server -- --port 3000
§Using the CLI Client
cargo run --bin mcp-cli -- connect ws://localhost:3000
§Architecture
┌─────────────────────────────────────────────────────────────┐
│ MCP Tools Crate │
├─────────────────────────────────────────────────────────────┤
│ Servers │ Clients │ Examples │
│ ├─ file-ops │ ├─ cli │ ├─ basic-client │
│ ├─ git-tools │ ├─ desktop │ ├─ advanced-server │
│ ├─ code-analysis │ └─ ... │ └─ ... │
│ ├─ web-tools │ │ │
│ └─ system-tools │ │ │
├─────────────────────────────────────────────────────────────┤
│ CoderLib │
│ ┌─ Core ─┐ ┌─ Tools ─┐ ┌─ MCP ─┐ ┌─ Permission ─┐ │
│ │ Session│ │ File │ │ SDK │ │ Security │ │
│ │ LLM │ │ Git │ │ Proto│ │ Validation │ │
│ │ Storage│ │ Code │ │ Tools│ │ Session Mgmt │ │
│ └────────┘ └────────┘ └──────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘
Re-exports§
pub use common::*;
Modules§
- clients
- MCP Client implementations
- common
- Common types and utilities shared across MCP Tools
- config
- Configuration management for MCP Tools
- servers
- MCP Server implementations
- utils
- Utility functions for MCP Tools
Structs§
- Annotated
- Annotations
- Argument
Info - Call
Tool Request Method - Call
Tool Request Param - Call
Tool Result - Cancelled
Notification Method - Cancelled
Notification Param - Client
Capabilities Builder - Client
Capabilities Builder State - Complete
Request Method - Complete
Request Param - Complete
Result - Completion
Info - Create
Message Request Method - Create
Message Request Param - Create
Message Result - Empty
Object - Error
Code - Error
Data - Error information for JSON-RPC error responses.
- GetPrompt
Request Method - GetPrompt
Request Param - GetPrompt
Result - Implementation
- Initialize
Request Param - Initialize
Result - Initialize
Result Method - Initialized
Notification Method - Json
Content - Json
RpcError - Json
RpcNotification - Json
RpcRequest - Json
RpcResponse - Json
RpcVersion2_ 0 - List
Prompts Request Method - List
Prompts Result - List
Resource Templates Request Method - List
Resource Templates Result - List
Resources Request Method - List
Resources Result - List
Roots Request Method - List
Roots Result - List
Tools Request Method - List
Tools Result - Logging
Message Notification Method - Logging
Message Notification Param - McpTools
Info - Information about MCP Tools
- Model
Hint - Model
Preferences - Notification
- Notification
NoParam - Paginated
Request Param Inner - Ping
Request Method - Progress
Notification Method - Progress
Notification Param - Prompt
- A prompt that can be used to generate text from a model
- Prompt
Argument - Represents a prompt argument that can be passed to customize the prompt
- Prompt
Argument Template - A template for a prompt argument, this should be identical to PromptArgument
- Prompt
List Changed Notification Method - Prompt
Message - A message in a prompt conversation
- Prompt
Reference - Prompt
Template - A template for a prompt
- Prompts
Capability - Protocol
Version - RawEmbedded
Resource - RawImage
Content - RawResource
- Represents a resource in the extension with metadata
- RawResource
Template - RawText
Content - Read
Resource Request Method - Read
Resource Request Param - Read
Resource Result - Request
- Request
Meta - Request
NoParam - Resource
List Changed Notification Method - Resource
Reference - Resource
Updated Notification Method - Resource
Updated Notification Param - Resources
Capability - Root
- Roots
Capabilities - Roots
List Changed Notification Method - Sampling
Message - Server
Capabilities Builder - Server
Capabilities Builder State - SetLevel
Request Method - SetLevel
Request Param - Subscribe
Request Method - Subscribe
Request Param - Tool
- A tool that can be used by a model.
- Tool
List Changed Notification Method - Tools
Capability - Unsubscribe
Request Method - Unsubscribe
Request Param - With
Meta
Enums§
- Client
Notification - Client
Request - Client
Result - Json
RpcMessage - Logging
Level - McpTools
Error - Error types for MCP Tools
- Message
- Number
OrString - Prompt
Message Content - Content types that can be included in prompt messages
- Prompt
Message Role - Represents the role of a message sender in a prompt conversation
- RawContent
- Reference
- Resource
Contents - Role
- Server
Notification - Server
Request - Server
Result
Constants§
- DEFAULT_
HOST - Default MCP server configuration
- DEFAULT_
PORT - VERSION
- MCP Tools version
Traits§
- Annotate
Able - Const
String - Into
Contents - Types that can be converted into a list of contents
Functions§
- info
- Get MCP Tools information
- init_
logging - Initialize logging for MCP Tools
- object
- unwrap the JsonObject under
serde_json::Value
Type Aliases§
- Cancelled
Notification - Cancellation
- Client
Json RpcMessage - Client
Message - Complete
Request - Content
- Create
Message Request - Cursor
- Embedded
Resource - Empty
Result - Empty result
- Experimental
Capabilities - GetPrompt
Request - Image
Content - Initialized
Notification - This notification is sent from the client to the server after initialization has finished.
- Json
Object - List
Prompts Request - List
Resource Templates Request - List
Resources Request - List
Roots Request - List
Tools Request - Logging
Message Notification - McpError
- Paginated
Request Param - Ping
Request - Progress
Notification - Progress
Token - Prompt
List Changed Notification - Read
Resource Request - Request
Id - Resource
- Resource
List Changed Notification - Resource
Template - Resource
Updated Notification - Result
- Result type for MCP Tools operations
- Roots
List Changed Notification - Server
Json RpcMessage - Server
Message - SetLevel
Request - Subscribe
Request - Text
Content - Tool
List Changed Notification - Unsubscribe
Request