İçeriğe geç

Black Week: 10% extra from 3 months paid upfront, no code. Until Pazartesi, 23:59. 2 days left.

All deals

Developer API

Control your game servers with an API

With the mcfreehost API you start, stop and monitor your servers from your own scripts, Discord bots or dashboards. Files, backups, players and plugins work the same way. AI assistants like Claude and ChatGPT use the same interface.

The API is included with every server at no extra cost.

Base URL
https://mcfreehost.com/api/automation/v1
Authentication
Bearer token
Format
JSON over HTTPS
Specification
OpenAPI 3.1

Your first call in three steps

  1. 01

    Create access

    In your account, go to Profile → API and create an access token. You pick the servers, the permissions and how long it stays valid.

  2. 02

    Store the token safely

    The token is shown exactly once. Keep it in an environment variable or a password manager, never in your source code.

  3. 03

    Send your first call

    Send the token in the Authorization header. The first example below lists the servers your token may see.

Examples

List servers

curl -X POST https://mcfreehost.com/api/automation/v1/actions/servers_list \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Copying did not work. Select the text and copy it by hand.

Restart a server

curl -X POST https://mcfreehost.com/api/automation/v1/actions/server_restart \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"server_id": "YOUR-SERVER-ID"}'

Copying did not work. Select the text and copy it by hand.

Calls that change something need an Idempotency-Key. If the connection drops, send the same call with the same key again and it runs only once.

How the API is built

One action per task
Every function is an action under POST /actions/{name}, for example server_status or backup_create. The inputs are listed as JSON Schema in the OpenAPI file.
Permissions per token
A token can only do what you allowed when you created it, and only on the servers you selected. If a permission is missing, the API answers with 403.
Long-running work
Starts, installs and restores run in the background. A 202 response means accepted, not finished. Each action's description names the read action you use to check afterwards, such as server_status.
Lifetime and revocation
A token is valid for 30, 90 or 365 days or without expiry, as you choose. You can revoke it in your profile at any time; your other tokens keep working.

Rate limits

Limits apply per token. When one is exceeded, the API answers with 429 and the Retry-After header tells you how many seconds to wait.

Read calls 120 per minute
Calls that change something 30 per minute
Start, stop and restart 10 per minute

Response codes

200 Done. The success field says whether it worked, the result is in data.
202 Accepted, the work is still running in the background.
401 Token missing, expired or revoked.
403 The token lacks the required permission, or the product does not offer the feature.
404 Action or server not found, or the server does not belong to this token.
409 Conflict with the current state. Check the operation before you retry.
422 Invalid input.
429 Limit reached. Wait for the time given in Retry-After.
503 A background service is unavailable. The outcome may be unknown, so check the state.

All actions

301 actions in 24 areas. Description, inputs and required permission of each action are in the OpenAPI file.

Server & power 7 actions
  • servers_list
  • server_status
  • server_start
  • server_stop
  • server_restart
  • reinstall_status
  • server_tps
Players 21 actions
  • players_list
  • whitelist_read
  • whitelist_add
  • whitelist_remove
  • bedrock_allowlist_read
  • bedrock_allowlist_add
  • bedrock_allowlist_remove
  • bedrock_allowlist_enforce
  • bedrock_pocketmine_whitelist_read
  • bedrock_pocketmine_whitelist_add
  • bedrock_pocketmine_whitelist_remove
  • players_live
  • players_broadcast
  • player_message
  • players_history
  • unban_requests_list
  • unban_request_accept
  • unban_request_reject
  • whitelist_requests_list
  • whitelist_request_accept
  • whitelist_request_reject
Console 4 actions
  • console_read
  • console_command
  • operator_reserve
  • log_share
Files 16 actions
  • files_list
  • file_read
  • file_write
  • file_patch
  • directory_create
  • files_delete
  • trash_list
  • trash_restore
  • trash_purge
  • file_copy
  • file_rename
  • files_compress
  • file_decompress
  • server_icon_status
  • server_icon_set
  • server_icon_remove
Backups 21 actions
  • backups_list
  • backup_create
  • backup_restore
  • backup_delete
  • backup_rename
  • backup_protect
  • backup_destinations_list
  • backup_destination_connect
  • backup_destination_bind
  • backup_destination_test
  • backup_destination_disconnect
  • backups_recovery_list
  • backup_cloud_restore
  • backup_incremental_create
  • backup_incremental_restore
  • backup_mirror
  • backup_schedule_read
  • backup_schedule_update
  • backup_settings_update
  • backup_files_browse
  • backup_files_restore
Schedules 6 actions
  • schedules_list
  • schedule_create
  • schedule_update
  • schedule_delete
  • task_create
  • task_update
Configuration 6 actions
  • config_read
  • config_write
  • bedrock_gamerules_read
  • bedrock_gamerule_set
  • eula_status
  • eula_accept
Worlds 23 actions
  • worlds_list
  • world_create
  • world_switch
  • world_delete
  • world_studio_job_status
  • world_studio_cancel
  • world_studio_import
  • world_studio_snapshot
  • world_studio_snapshot_status
  • geoworld_search
  • geoworld_status
  • geoworld_start
  • geoworld_cancel
  • world_library_list
  • world_library_install
  • schematics_list
  • schematic_place
  • bedrock_worlds_list
  • bedrock_world_create
  • bedrock_world_switch
  • bedrock_world_delete
  • world_import_status
  • world_import_install
Versions 8 actions
  • versions_list
  • version_status
  • version_preview
  • version_change
  • java_runtime_read
  • java_runtime_select
  • loader_builds_list
  • loader_build_change
Server software 3 actions
  • software_catalog
  • software_preview
  • software_change
Plugins & mods 51 actions
  • addons_list
  • addons_search
  • addon_versions
  • addon_install
  • addon_update
  • addon_remove
  • live_map_status
  • live_map_enable
  • live_map_continue
  • plugin_analysis
  • plugin_outdated_mods_status
  • plugin_outdated_mods_choose
  • plugin_outdated_mod_reenable
  • plugin_config_files
  • plugin_config_read
  • plugin_config_write
  • mod_settings_list
  • mod_settings_read
  • mod_settings_save
  • mod_settings_run_action
  • spark_diagnostic_start
  • spark_report
  • hologram_list
  • hologram_toggle
  • skript_list
  • skript_toggle
  • skript_reload
  • skript_modules_list
  • skript_module_save
  • worldguard_regions
  • worldguard_status
  • worldguard_reload
  • worldguard_global_flag
  • worldedit_reload
  • worldedit_group_access
  • veinminer_status
  • veinminer_apply_preset
  • chunky_status
  • chunky_prewarm_start
  • voice_chat_status
  • voice_chat_setup
  • voice_chat_save_config
  • voice_chat_repair_crossplay
  • voice_chat_restart
  • mc_settings_read
  • mc_settings_save
  • mc_settings_world_property
  • mc_settings_core_status
  • mc_settings_core_lookup
  • minecraft_maker_runs
  • minecraft_maker_create
Modpacks 15 actions
  • modpacks_catalog
  • modpack_preview
  • modpack_status
  • modpack_install
  • modpack_update
  • modpack_settings_read
  • modpack_settings_write
  • modpack_versions
  • modpack_client_pack_read
  • modpack_client_pack_refresh
  • modpack_client_pack_rotate_link
  • modpack_client_pack_mod_mode
  • modpack_profile_find
  • modpack_profile_apply
  • modpack_rollback
Bedrock packs 12 actions
  • bedrock_packs_list
  • bedrock_catalog
  • bedrock_pack_install
  • bedrock_pack_enable
  • bedrock_pack_disable
  • bedrock_pack_remove
  • bedrock_experiments_enable
  • bedrock_migration_status
  • bedrock_migration_start
  • bedrock_migration_confirm_join
  • bedrock_migration_cancel
  • bedrock_migration_revert
Server settings 24 actions
  • notifications_read
  • notification_rules_update
  • notification_alerts_update
  • notification_quiet_hours_update
  • settings_read
  • settings_update
  • auto_update_read
  • auto_update_set
  • update_center_read
  • update_center_runtime_update
  • auto_update_skip_next
  • profile_quiet_hours_read
  • profile_quiet_hours_update
  • discord_webhook_read
  • discord_webhook_set
  • discord_events_update
  • discord_webhook_test
  • webhooks_list
  • webhook_create
  • webhook_set_active
  • webhook_delete
  • webhook_test
  • startup_variables_read
  • startup_variables_update
Metrics and history 2 actions
  • metrics_current
  • metrics_history
Activity log 1 actions
  • activity_list
Health and join test 11 actions
  • health_status
  • join_test_start
  • join_test_status
  • health_crash_diagnosis
  • health_repairs_list
  • health_boot_repair
  • health_plugin_repair_preview
  • health_plugin_repair_apply
  • health_policy_read
  • health_policy_update
  • health_repair_answer
Databases 4 actions
  • databases_list
  • database_create
  • database_delete
  • database_password_rotate
World export and import 2 actions
  • export_start
  • export_status
Server address 2 actions
  • subdomain_check
  • subdomain_change
Game tools 47 actions
  • cs2_build_update
  • rust_wipe_schedule_read
  • rust_wipe_schedule_create
  • rust_wipe_schedule_cancel
  • rust_startup_params_read
  • rust_startup_params_update
  • rust_map_preview
  • cs2_map_pool_read
  • cs2_map_pool_write
  • cs2_match_status
  • cs2_match_load
  • cs2_match_control
  • cs2_map_change
  • ark_ini_read
  • ark_ini_write
  • ark_mod_order_read
  • ark_mod_order_write
  • valheim_worlds_list
  • valheim_world_activate
  • valheim_backups_list
  • valheim_backup_create
  • valheim_plugins_list
  • valheim_plugin_toggle
  • minecraft_players_admin_read
  • minecraft_player_op
  • minecraft_player_deop
  • minecraft_player_kick
  • minecraft_player_ban
  • minecraft_player_unban
  • minecraft_crossplay_read
  • minecraft_crossplay_set
  • minecraft_gamerules_read
  • minecraft_gamerule_set
  • minecraft_cracked_mode_read
  • minecraft_cracked_mode_set
  • minecraft_presets_list
  • minecraft_preset_apply
  • minecraft_anti_xray_read
  • minecraft_anti_xray_set
  • minecraft_item_obfuscation_read
  • minecraft_item_obfuscation_set
  • minecraft_end_access_read
  • minecraft_end_access_set
  • minecraft_gameplay_options_read
  • minecraft_gameplay_option_set
  • minecraft_many_players_read
  • minecraft_many_players_set
Reinstall 1 actions
  • server_reinstall
Account 13 actions
  • account_read
  • account_profile_update
  • account_billing_history
  • account_subscriptions
  • account_email_change
  • account_password_change
  • account_delete_request
  • subscription_cancel
  • subscription_reactivate
  • account_security_status
  • account_two_factor_manage
  • account_payment_methods_manage
  • account_order_prepare
Support tickets 1 actions
  • support_ticket_create

Documentation

  • OpenAPI file (JSON)

    Machine-readable, for Postman, Insomnia or a client generator.

  • Detailed guide

    Scope, workflows and the checks needed after actions that change something.

Prefer an AI assistant?

The same actions are available as an MCP server. Claude, ChatGPT or Codex then manage your servers by chat, with the same permissions and limits.

Go to AI server management

Frequently asked questions

Does the API cost extra?

No. The API comes with every server at no extra cost.

Can one token access all my servers?

Only if you set it up that way. When you create a token you choose the servers and permissions. A status bot, for example, only needs a read-only token.

What if a token ends up in the wrong hands?

Revoke it in your profile under API. It stops working immediately. Then create a new one.

Is there a sandbox?

There is no separate test environment. For your first tries, create a read-only token. Read calls change nothing on your servers.