First off, thank you for considering contributing to InterMCP! We welcome contributions of all kinds: new universal developer tools, protocol improvements, performance optimizations, documentation guides, and bug fixes.
- Rust toolchain (1.75+): https://rustup.rs
- Node.js (v18+): Optional, only if working on the npm wrapper package.
git clone https://github.com/Bharathcoorg/intermcp.git
cd intermcp
cargo buildcargo test
cargo clippy -- -D warnings
cargo fmt -- --checkAll tools in InterMCP implement the Tool trait or use the SimpleTool constructor.
- Create a new file in
src/tools/my_tool.rs(or add to an existing module):
use serde_json::{json, Value};
use crate::protocol::CallToolResult;
use crate::tool::{SimpleTool, Tool};
pub fn create_my_custom_tool() -> Box<dyn Tool> {
Box::new(SimpleTool::new(
"my_tool_name",
"A clear, 1-sentence description of what this tool accomplishes",
json!({
"type": "object",
"properties": {
"input_param": {
"type": "string",
"description": "Explanation of this parameter"
}
},
"required": ["input_param"]
}),
|args: Value| async move {
let param = args["input_param"].as_str().unwrap_or("");
let result = format!("Processed: {}", param);
Ok(CallToolResult::text(result))
},
))
}-
Register the tool in
src/tools/mod.rsinsideuniversal_toolset(). -
Test your tool instantly in the terminal:
cargo run -- test-tool my_tool_name --args '{"input_param":"hello"}'- Add a unit test in
src/lib.rs.
- Keep it Universal: Default tools should solve headaches for general software engineers (Filesystem, Git, Shell, Diagnostics, Net, SQLite, etc.). Domain-specific extensions should be placed in
src/tools/as optional plugins. - Pure Native & Lightweight: Avoid adding heavy external C/C++ dependencies or large crates that blow up binary size.
- No stdout Pollution: The Model Context Protocol communicates via newline-delimited JSON-RPC over
stdout. Never useprintln!or log tostdoutin server code. Always usetracing::info!,tracing::error!, oreprintln!which write tostderr. - Performance: Tool executions should be non-blocking (
async) and minimize heap allocations.
- Issues: If you find a bug or want to request a feature, please open an issue.
- Security Disclosures: Please send confidential vulnerability reports to
bharathbr0x@gmail.com. - Maintainer: Bharath B R (@Bharathcoorg).