| Crates.io | mc-server-status |
| lib.rs | mc-server-status |
| version | 1.0.0 |
| created_at | 2025-10-15 06:08:48.963997+00 |
| updated_at | 2025-10-15 06:08:48.963997+00 |
| description | High-performance asynchronous Rust library for querying Minecraft server status (Java & Bedrock), Fork of Rust MC Status |
| homepage | |
| repository | https://github.com/pynickle/rust-mc-status |
| max_upload_size | |
| id | 1883802 |
| size | 83,786 |
Fork of NameOfShadow/rust-mc-status
A high-performance, asynchronous Rust library for querying the status of both Minecraft Java Edition and Bedrock Edition servers.
25565) and Bedrock Edition (19132) servers._minecraft._tcp) for Java Edition servers when no port is specified, matching native Minecraft client behavior.serde), including version info, player counts, MOTD, map, gamemode, plugins, mods and more.thiserror.Add this to your Cargo.toml:
[dependencies]
mc-server-status = "1.0.0"
tokio = { version = "*", features = ["full"] }
use mc_server_status::{McClient, ServerEdition, ServerInfo};
use std::time::Duration;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = McClient::new()
.with_timeout(Duration::from_secs(5))
.with_max_parallel(10);
// Check a single server
let status = client.ping("mc.hypixel.net", ServerEdition::Java).await?;
println!("Status: {:?}", status);
// Batch check servers
let servers = vec![
ServerInfo {
address: "mc.hypixel.net".to_string(),
edition: ServerEdition::Java,
},
ServerInfo {
address: "geo.hivebedrock.network:19132".to_string(),
edition: ServerEdition::Bedrock,
},
];
let results = client.ping_many(&servers).await;
for (server, result) in results {
println!("Server: {} - {:?}", server.address, result);
}
Ok(())
}
See examples/advanced_usage.rs for a demonstration of all the new library features.
McClient: The main client for making requests.
new(), with_timeout(), with_max_parallel()ping(address, edition): Ping a single server.ping_many(servers): Ping multiple servers in parallel.ServerStatus: The result of a successful ping.
online: boolip: String - Server IP addressport: u16 - Server porthostname: String - Hostnamelatency: f64 - Latency in msdns: Option<DnsInfo> - DNS informationdata: ServerData (enum containing either JavaStatus or BedrockStatus)JavaStatus: Contains detailed information from a Java server.
version: Version informationplayers: Player informationdescription: Server description (MOTD)map: Map namegamemode: Game modesoftware: Server softwareplugins: List of pluginsmods: List of modssave_favicon(filename): Saves the server icon to a PNG file.BedrockStatus: Contains information from a Bedrock server.
edition: Minecraft editionmotd: Message of the dayversion: Server versiononline_players: Online players countmax_players: Maximum playersmap: Map namesoftware: Server softwaregame_mode: Game modeThis project is licensed under the MIT License - see the LICENSE file for details.