Skip to content

Made an mcp server in rust but crashes claude desktop #363

@Jeomon

Description

@Jeomon
Image

Everytime run the mcp server i made get this issue.

//main.rs
mod handler;
mod tools;
mod watch_cursor;
mod desktop;
mod tree;

use rmcp::{
    ServiceExt,
    transport::stdio,
};
use handler::WindowsMCP;

#[tokio::main]
async  fn main()->Result<(),Box<dyn std::error::Error>> {
    let service=WindowsMCP::new();
    let server=service.serve(stdio()).await?;
    server.waiting().await?;  
    Ok(())
}
// handler.rs
use rmcp::{
    handler::server::router::tool::ToolRouter,
    model::{
        Implementation, 
        ProtocolVersion, ServerCapabilities, ServerInfo
    },
    ServerHandler,tool_handler
};

pub struct WindowsMCP {
    pub tool_router:ToolRouter<Self>
}

#[tool_handler]
impl ServerHandler for WindowsMCP {
    fn get_info(&self) -> ServerInfo {
        ServerInfo {
            server_info:Implementation {
                name: "Windows-MCP".to_string(),
                version: "0.1.0".to_string(),
            },
            protocol_version: ProtocolVersion::V_2025_03_26,
            instructions: Some("Lightweight MCP server for computer use in Windows".to_string()),
            capabilities: ServerCapabilities::builder().enable_tools().build(),
            ..Default::default()
        }
    }

}

But if I made the same mcp server in python no issuses

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions