| Crates.io | mcpkit-core |
| lib.rs | mcpkit-core |
| version | 0.5.0 |
| created_at | 2025-12-11 17:01:26.743221+00 |
| updated_at | 2025-12-26 00:52:16.928183+00 |
| description | Core types and traits for the Model Context Protocol (MCP) |
| homepage | |
| repository | https://github.com/praxiomlabs/mcpkit |
| max_upload_size | |
| id | 1980136 |
| size | 452,937 |
Core types and traits for the Model Context Protocol (MCP).
This crate provides the foundational building blocks for the MCP SDK:
McpError type with rich diagnosticsThis crate does not depend on any async runtime. It can be used with Tokio, smol, or any other executor.
Implements MCP protocol version 2025-11-25 with backward compatibility for 2024-11-05.
use mcpkit_core::{
types::{Tool, ToolOutput, Content},
capability::{ServerCapabilities, ServerInfo},
};
// Create a tool definition
let tool = Tool::new("search")
.description("Search the database")
.input_schema(serde_json::json!({
"type": "object",
"properties": {
"query": { "type": "string" }
},
"required": ["query"]
}));
// Create server capabilities
let caps = ServerCapabilities::new()
.with_tools()
.with_resources()
.with_tasks();
// Create server info
let info = ServerInfo::new("my-server", "1.0.0");
fancy-errors - Enable miette's fancy error reporting with terminal colorsThis crate is part of the mcpkit SDK. For most use cases, depend on mcpkit directly rather than this crate.
Licensed under either of Apache License, Version 2.0 or MIT license at your option.