Sponsored by Deepsite.site

MCP Tools Server

Created By
metrovoc8 months ago
Content

MCP Tools Server

MCP Tools Server is a Minecraft server plugin that provides an API for Large Language Models (LLMs) to interact with your Minecraft server. It leverages the Model Context Protocol (MCP) to expose server functionality as tools that can be called by AI assistants.

Features

  • Server Logs Access: View server logs remotely through the API
  • Chat Monitoring: Access player chat messages and Discord messages (via DiscordSRV)
  • Command Execution: Execute Minecraft commands remotely
  • MCP Compatibility: Follows the Model Context Protocol for seamless integration with LLMs
  • DiscordSRV Integration: Connect your Minecraft server chat with Discord

Requirements

  • Minecraft server running Paper/Spigot 1.19+
  • Java 17 or higher
  • DiscordSRV plugin (optional, for Discord integration)

Installation

  1. Download the latest release JAR file from the Releases page
  2. Place the JAR file in your server's plugins folder
  3. Restart your server
  4. The plugin will generate a default configuration file at plugins/MCPToolsServer/config.yml
  5. Edit the configuration file to customize settings (see Configuration section)
  6. Use /mcptools reload in-game to apply changes

Configuration

The plugin's configuration file (config.yml) contains the following sections:

mcp:
  server:
    port: 8080 # Port for the MCP server
    https: false # Whether to use HTTPS
    access-token: "" # Access token for authentication (empty = no auth)

logs:
  max-lines: 1000 # Maximum number of log lines to store
  include-console: true # Include console logs
  include-chat: true # Include player chat
  include-commands: true # Include command execution

chat:
  max-messages: 100 # Maximum number of chat messages to store
  include-discord: true # Include Discord messages

commands:
  allowed-prefixes: [] # Allowed command prefixes (empty = all)
  blocked-prefixes: # Blocked command prefixes
    - "op"
    - "deop"
    - "ban"
    - "kick"
    - "stop"
    - "reload"
  log-execution: true # Log command execution

API Usage

The plugin exposes an HTTP API that follows the Model Context Protocol (MCP). The API endpoints are:

  • GET /info - Get server information
  • GET /tools/list - List available tools
  • POST /tools/call - Call a tool

Available Tools

1. View Logs (view_logs)

Retrieves server logs.

Parameters:

  • limit (integer, optional): Number of log lines to return (default: 50, max: 1000)
  • filter (string, optional): Filter logs by text
  • logType (string, optional): Type of logs to return ("all", "console", "chat", "command")

Example Request:

{
  "name": "view_logs",
  "arguments": {
    "limit": 100,
    "filter": "error",
    "logType": "console"
  }
}

2. View Chat (view_chat)

Retrieves chat messages.

Parameters:

  • limit (integer, optional): Number of messages to return (default: 20, max: 100)
  • player (string, optional): Filter messages by player name
  • includeDiscord (boolean, optional): Whether to include Discord messages (default: true)

Example Request:

{
  "name": "view_chat",
  "arguments": {
    "limit": 50,
    "player": "Steve",
    "includeDiscord": true
  }
}

3. Execute Command (execute_command)

Executes a Minecraft command.

Parameters:

  • command (string, required): Command to execute (without leading slash)
  • asConsole (boolean, optional): Whether to execute as console (default: true)
  • player (string, optional): Player to execute as (only if asConsole is false)

Example Request:

{
  "name": "execute_command",
  "arguments": {
    "command": "time set day",
    "asConsole": true
  }
}

Example: Calling the API with curl

# List available tools
curl -X GET http://localhost:8080/tools/list

# View logs
curl -X POST http://localhost:8080/tools/call \
  -H "Content-Type: application/json" \
  -d '{"name":"view_logs","arguments":{"limit":50}}'

# Execute a command
curl -X POST http://localhost:8080/tools/call \
  -H "Content-Type: application/json" \
  -d '{"name":"execute_command","arguments":{"command":"say Hello from API"}}'

Integration with LLMs

This plugin is designed to be used with Large Language Models that support the Model Context Protocol. The API allows LLMs to:

  1. Discover available tools via the /tools/list endpoint
  2. Call tools via the /tools/call endpoint
  3. Process the results and take further actions

Commands and Permissions

  • /mcptools reload - Reload the plugin configuration (Permission: mcptools.admin)
  • /mcptools status - Show the current plugin status (Permission: mcptools.admin)

Building from Source

  1. Clone the repository
  2. Build using Maven:
    mvn clean package
    
  3. The compiled JAR will be in the target directory

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Playwright McpPlaywright MCP server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Tavily Mcp
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
CursorThe AI Code Editor
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
ChatWiseThe second fastest AI chatbot™
DeepChatYour AI Partner on Desktop
Amap Maps高德地图官方 MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Serper MCP ServerA Serper MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
WindsurfThe new purpose-built IDE to harness magic
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。