| Crates.io | kodegen_mcp_schema |
| lib.rs | kodegen_mcp_schema |
| version | 0.10.14 |
| created_at | 2025-10-28 20:21:57.905659+00 |
| updated_at | 2026-01-02 14:59:51.831496+00 |
| description | KODEGEN.ᴀɪ: Memory-efficient, Blazing-Fast, MCP tools for code generation agents. |
| homepage | https://kodegen.ai |
| repository | https://github.com/cyrup-ai/kodegen-mcp-schema |
| max_upload_size | |
| id | 1905585 |
| size | 7,078,893 |
Lightweight MCP (Model Context Protocol) tool schema definitions for the kodegen ecosystem.
kodegen_mcp_schema provides type-safe schema definitions for AI agent tools and interactions. This library serves as the single source of truth for all tool schemas, with minimal dependencies and maximum reusability.
Design Philosophy: Schema-only library with zero heavy dependencies. Contains only Args and PromptArgs type definitions using serde, schemars, and serde_json.
Add this to your Cargo.toml:
[dependencies]
kodegen_mcp_schema = "0.1.0"
Or install directly from the repository:
[dependencies]
kodegen_mcp_schema = { git = "https://github.com/cyrup-ai/kodegen-mcp-schema" }
All schemas use Rust's type system with:
schemarsuse kodegen_mcp_schema::{ReadFileArgs, StartSearchArgs, SearchType};
// File reading with optional pagination
let read_args = ReadFileArgs {
path: "/path/to/file.txt".to_string(),
offset: 0,
length: Some(100),
is_url: false,
};
// Advanced file search
let search_args = StartSearchArgs {
path: "/project".to_string(),
pattern: "TODO".to_string(),
search_type: SearchType::Content,
file_pattern: Some("*.rs".to_string()),
max_results: Some(100),
..Default::default()
};
// GitHub operations
use kodegen_mcp_schema::{CreateIssueArgs, SearchCodeArgs};
let issue = CreateIssueArgs {
owner: "cyrup-ai".to_string(),
repo: "kodegen-mcp-schema".to_string(),
title: "Bug report".to_string(),
body: Some("Description here".to_string()),
labels: Some(vec!["bug".to_string()]),
assignees: None,
};
Each tool follows a consistent pattern with two primary types:
XxxArgs - Runtime arguments for tool executionXxxPromptArgs - Arguments for generating contextual promptsExample:
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
pub struct ReadFileArgs {
pub path: String,
#[serde(default)]
pub offset: i64,
#[serde(default)]
pub length: Option<usize>,
}
# Build the library
cargo build
# Run tests
cargo test
# Run clippy linter
cargo clippy
# Format code
cargo fmt
# Check without building
cargo check
The library is organized into domain-specific modules:
src/
├── lib.rs # Re-exports all types
├── filesystem.rs # File operations and search
├── terminal.rs # Process and command execution
├── git.rs # Git operations
├── github.rs # GitHub API interactions
├── browser.rs # Browser automation
├── citescrape.rs # Web crawling
├── database.rs # Database operations
├── claude_agent.rs # Agent spawning and memory
├── reasoning.rs # AI reasoning tools
├── prompt.rs # Template management
├── config.rs # Configuration
├── process.rs # System processes
└── introspection.rs # Usage statistics
Several tools use async session patterns for long-running operations:
start_browser_research → get_research_status → get_research_resultstart_search → get_search_results → stop_searchscrape_url → scrape_check_results → scrape_search_resultsstart_terminal_command → read_terminal_output → send_terminal_inputspawn_claude_agent → read_claude_agent_output → send_claude_agent_promptThe filesystem search tool supports:
Memory tools for persistent agent knowledge:
Contributions are welcome! Please ensure:
#[serde(default)] for optional fields with defaultscargo fmt and cargo clippy before submittingThis project is licensed under the MIT License - see the LICENSE file for details.
ai, ml, agents, candle, inference, mcp, schemas, tools, automation