database_mcp_server/
server.rs1use rmcp::model::{ErrorData, Implementation, ServerCapabilities, ServerInfo};
6
7pub fn map_error(e: impl std::fmt::Display) -> ErrorData {
9 ErrorData::internal_error(e.to_string(), None)
10}
11
12#[must_use]
17pub fn server_info() -> ServerInfo {
18 ServerInfo::new(ServerCapabilities::builder().enable_tools().build())
19 .with_server_info(Implementation::new(
20 env!("CARGO_PKG_NAME"),
21 env!("CARGO_PKG_VERSION"),
22 ))
23 .with_instructions(
24 "Database MCP Server - provides database exploration and query tools for MySQL, MariaDB, PostgreSQL, and SQLite",
25 )
26}