A Dart SDK for interacting with a Minecraft server using the RCON protocol. Package on pub.dev


Provides an API to connect to, log in to, send commands to, and receive data from a Minecraft server via the RCON protocol.

Getting started

Run flutter pub add mc_rcon_dart or add the following to your pubspec.yaml:

  mc_rcon_dart: ^<current_version>


See the example below. Full code example also in example.dart.

import 'package:flutter/foundation.dart';
import 'package:mc_rcon_dart/mc_rcon_dart.dart';

main() async {
  await createSocket("", port: 25575);
  sendCommand("time set 0");

void onData(Uint8List data) {
  print(String.fromCharCodes(data, 12));

Additional information

  • The RCON documentation is here.
  • The documentation for Minecraft console commands is here.
  • The documentation for Socket (as of 2.18.1), which is used to communicate with the RCON server, is here.
  • Report bugs by making a new issue or send a merge request with the fix, but I’m pretty sure this is all working as is, and I don’t expect the RCON protocol to change.


View Github