Discover Awesome MCP Servers

Extend your agent with 84,517 capabilities via MCP servers.

All84,517
Local Mcp Server Tutorial

Local Mcp Server Tutorial

好的,以下是一个创建本地 MCP 服务器(stdio)的教程: **创建本地 MCP 服务器 (stdio) 教程** **什么是 MCP?** MCP (Minecraft Coder Pack) 是一个用于反编译、反混淆和重新编译 Minecraft 代码的工具。它允许开发者更容易地理解和修改 Minecraft 的内部工作原理。 **什么是 stdio?** stdio (standard input/output) 是一种通信方式,允许程序通过标准输入和标准输出流进行交互。在这种情况下,本地 MCP 服务器将通过 stdio 与客户端进行通信。 **步骤:** **1. 安装 Java Development Kit (JDK)** 确保你的系统上安装了 Java Development Kit (JDK)。你需要 JDK 8 或更高版本。你可以从 Oracle 网站或你的发行版的包管理器下载并安装 JDK。 **2. 下载 MCP** 从 MCP 的官方网站或 GitHub 仓库下载最新版本的 MCP。 **3. 解压 MCP** 将下载的 MCP 压缩包解压到你选择的目录。 **4. 配置 MCP** * **`conf/mcp.cfg`:** 打开 `conf/mcp.cfg` 文件并根据你的需要进行配置。重要的配置项包括: * `MCP_LOC`: MCP 的根目录。 * `SRG_DIR`: SRG (Searge) 映射文件的目录。 * `BIN_DIR`: Minecraft 客户端和服务器 jar 文件的目录。 * `PATCHES_DIR`: 补丁文件的目录。 * `REOBF_PATCHES_DIR`: 反混淆补丁文件的目录。 * `DOCS_DIR`: 文档文件的目录。 * `VERSION`: Minecraft 的版本。 * **`conf/versions.cfg`:** 确保 `conf/versions.cfg` 文件包含你想要使用的 Minecraft 版本的配置。 **5. 获取 Minecraft 客户端和服务器 jar 文件** 你需要获取与你想要使用的 Minecraft 版本相对应的客户端和服务器 jar 文件。你可以从 Minecraft 启动器或 Minecraft 官方网站下载这些文件。将这些文件放置在 `jars/` 目录下。 **6. 反编译 Minecraft** 打开命令行终端,导航到 MCP 的根目录,并运行以下命令: ```bash ./decompile.sh ``` 或者,在 Windows 上: ```batch decompile.bat ``` 这将反编译 Minecraft 客户端和服务器代码。这个过程可能需要一些时间。 **7. 创建 stdio 服务器** 创建一个 Java 程序,该程序将作为本地 MCP 服务器运行。以下是一个简单的示例: ```java import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; public class MCPStdioServer { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); PrintWriter writer = new PrintWriter(System.out, true); String line; while ((line = reader.readLine()) != null) { // 在这里处理来自客户端的请求 // 例如,你可以执行 MCP 命令并返回结果 // 示例:将收到的消息回显给客户端 writer.println("Server received: " + line); } } } ``` **8. 编译 stdio 服务器** 使用 JDK 编译你的 Java 程序。 ```bash javac MCPStdioServer.java ``` **9. 运行 stdio 服务器** 运行编译后的 Java 程序。 ```bash java MCPStdioServer ``` **10. 创建客户端** 创建一个客户端程序,该程序将通过 stdio 与本地 MCP 服务器进行通信。你可以使用任何编程语言来创建客户端。 **11. 与服务器通信** 客户端程序需要通过标准输入向服务器发送请求,并通过标准输出接收响应。 **示例客户端 (Python):** ```python import sys def send_command(command): print(command, flush=True) # 发送命令并刷新输出 response = sys.stdin.readline().strip() # 读取服务器的响应 return response if __name__ == "__main__": response = send_command("Hello from client!") print("Server response:", response) response = send_command("Another command") print("Server response:", response) ``` **运行客户端:** ```bash python your_client.py ``` **重要提示:** * 你需要根据你的具体需求修改服务器和客户端代码。 * 你需要实现 MCP 命令的处理逻辑,以便服务器能够执行客户端请求的操作。 * 确保你的服务器和客户端使用相同的协议进行通信。 **总结:** 这个教程提供了一个创建本地 MCP 服务器 (stdio) 的基本框架。你需要根据你的具体需求进行修改和扩展。记住,理解 MCP 的工作原理以及 Minecraft 的代码结构对于成功创建本地 MCP 服务器至关重要。 希望这个教程对你有所帮助!

VMware Fusion MCP Server

VMware Fusion MCP Server

A Model Context Protocol server that allows managing VMware Fusion virtual machines through natural language, enabling users to list VMs, retrieve VM information, and perform power operations via the Fusion REST API.

Remote MCP Server on Cloudflare

Remote MCP Server on Cloudflare

A template for deploying secure Model Context Protocol servers to Cloudflare Workers with built-in OAuth authentication. It enables hosting and connecting remote tools to Claude Desktop using SSE transport and a local proxy.

weather-mcp

weather-mcp

Returns the current and recent weather data using city name or pincode(india). Using tomorrow.io api

MCP WebSocket Server

MCP WebSocket Server

A WebSocket-based MCP server that enables mail operations including retrieval, search, and statistics for email addresses. Can be deployed on Render.com or run locally.

lcm2m-caddis-mcp

lcm2m-caddis-mcp

Enables read-only access to LCM2M Caddis VM2M API for equipment, runs, telemetry, alarms, etc., via MCP tools.

MCP Demo

MCP Demo

使用 Python 构建 Slack 的 MCP(管理控制面板)服务器。

Redmine MCP Server

Redmine MCP Server

Model Context Protocol (MCP) server for Redmine that provides comprehensive access to the Redmine REST API. It allows you to operate Redmine from MCP clients such as Claude Desktop.

Arcaelas MCP

Arcaelas MCP

Provides AI-powered tools for image generation, text-to-speech conversion, background removal, and image upscaling through OpenAI and image processing APIs.

watsonx MCP Server

watsonx MCP Server

Enables Claude to delegate tasks to IBM watsonx.ai foundation models (Granite, Llama, Mistral) for text generation, chat, embeddings, and document analysis. Supports two-agent architectures where Claude can leverage IBM's enterprise AI capabilities for specialized workloads.

Amazon Nova Reel MCP Server

Amazon Nova Reel MCP Server

An MCP server for generating videos through Amazon Nova Reel 1.1 using AWS Bedrock, providing asynchronous video generation with comprehensive prompting guidelines and multiple transport methods.

mcp-vanguard

mcp-vanguard

A security pentesting MCP server with 89 tools across 10 categories, enabling comprehensive reconnaissance, web security, OSINT, and exploitation tasks. It features a native Windows/WSL bridge for Kali Linux tools and scope-aware permission tiers for safe and efficient scanning.

HoudiniMCP

HoudiniMCP

Connects Claude AI to Houdini via the Model Context Protocol, enabling prompt-assisted 3D modeling, scene manipulation, and rendering within Houdini.

sheet-compressor

sheet-compressor

Compresses spreadsheets into compact encodings, enables Q&A on sheet content, and extracts structured order data via LLM calls.

MetaEngine MCP Server

MetaEngine MCP Server

Enables agents to generate typed client code from OpenAPI, GraphQL, Protobuf, and SQL specs using MetaEngine's code-generation platform.

Codex Bridge MCP

Codex Bridge MCP

Codex Bridge MCP is a local MCP orchestration service for a stable Claude Code x Codex CLI development workflow.

Sunshine Atlas MCP server

Sunshine Atlas MCP server

Provides climate data for 3,833 destinations including sunshine scores, temperatures, rainfall, and sea temperature, enabling users to find sunny destinations and compare climates via three tools.

Second Brain MCP

Second Brain MCP

Enables querying Tom Osborne's voice-cloned AI agent with a 21,000-article marketing knowledge base and his interview corpus to get answers in his voice.

Fabric Admin MCP Server

Fabric Admin MCP Server

Provides MCP tools to manage Microsoft Fabric capacities, including listing, creating, updating, and deleting them, using Azure authentication.

AnalyticDB for MySQL MCP Server

AnalyticDB for MySQL MCP Server

镜子 (jìng zi)

MCP Gemini Server

MCP Gemini Server

镜子 (jìng zi)

Optimization MCP

Optimization MCP

Provides nine specialized production-ready solvers for advanced resource allocation, network flow, and multi-objective optimization with native Monte Carlo integration. It enables users to perform constraint-based decision-making and performance analysis directly through Claude Code.

OpenWebGAL Assistant

OpenWebGAL Assistant

MCP server that automates WebGAL game development tasks such as resource management, script editing, documentation lookup, and AI-powered voice generation using LLMs.

ecl_mcp

ecl_mcp

Provides AI agents with access to the European Commission's Component Library documentation and code examples, enabling full-text search and recipe retrieval.

Gramps MCP

Gramps MCP

Enables AI assistants to interact with Gramps genealogy databases for intelligent family tree research and management. Provides comprehensive tools for searching family data, creating records, analyzing relationships, and tracking genealogy research through natural language.

Logstash MCP Server

Logstash MCP Server

A Model Context Protocol server that provides comprehensive tools for monitoring and identifying performance bottlenecks in Logstash instances through an interactive web UI and JSON-RPC interface.

MCP Server Boilerplate

MCP Server Boilerplate

A TypeScript template for building Model Context Protocol servers with example tools, type-safe validation, and best practices for integrating custom functionality with AI assistants like Cursor and Claude.

cointelegraph-mcp

cointelegraph-mcp

关于 一个MCP服务器,提供来自Cointelegraph的最新新闻的实时访问。

notification-mcp

notification-mcp

An MCP server that lets AI assistants send spoken audio notifications using high-quality AI voices, so you don't have to stare at the screen waiting for long tasks to finish.

Oakland Open Data MCP

Oakland Open Data MCP

Enables searching the Oakland Open Data catalog and querying datasets with Socrata SoQL. Provides access to metadata and rows from over 1000 live data sources via Pipeworx.