#![windows_subsystem = "windows"]
use mcp_attr::{
Result,
server::{McpServer, mcp_server, serve_stdio},
};
#[tokio::main]
async fn main() -> Result<()> {
serve_stdio(MyServer).await?;
Ok(())
}
struct MyServer;
#[mcp_server]
impl McpServer for MyServer {
#[tool]
async fn char_count(
&self,
text: Vec<String>,
) -> Result<Vec<String>> {
Ok(text.iter().map(|s| s.chars().count().to_string()).collect())
}
}