Skip to main content
Glama

kick_player

Remove a player from a Minecraft server with an optional reason, enabling administrator-level moderation and player management through the MCP protocol.

Instructions

Kick a player from the server with an optional reason.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
playerYesPlayer name
reasonNoKick reason message

Implementation Reference

  • The kick_player tool handler registers the MCP tool, defines its schema using Zod, and executes the kick command via RCON.
    server.tool(
      "kick_player",
      "Kick a player from the server with an optional reason.",
      {
        player: z.string().describe("Player name"),
        reason: z.string().optional().describe("Kick reason message"),
      },
      async ({ player, reason }) => {
        const cmd = reason ? `kick ${player} ${reason}` : `kick ${player}`;
        try {
          const response = await manager.rcon.send(cmd);
          return { content: [{ type: "text", text: response }] };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Failed: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
            isError: true,
          };
        }
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tamo2918/Minecraft-Server-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server