发现优秀的 MCP 服务器

通过 MCP 服务器扩展您的代理能力,拥有 54,273 个能力。

全部54,273
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 服务器至关重要。 希望这个教程对你有所帮助!

FatihAI MCP Server

FatihAI MCP Server

A free MCP server providing 13 tools for email verification, domain intelligence, and website analysis with no API keys required.

PEX MCP Server

PEX MCP Server

Enables AI assistants to interact with the PEX Card External API to manage business accounts, cards, and transactions. It provides 72 tools for retrieving account balances, managing spending rules, and tracking business expenses through natural language.

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.

github-mcp-server

github-mcp-server

Enables comprehensive GitHub operations including repository management, push, releases, issues, PRs, GitHub Actions, secrets, security, profile, search, and a unique portfolio push tool to create repos from local folders.

HongKongAddressMCP

HongKongAddressMCP

Enables Hong Kong address lookup and correction using government data, with fuzzy matching and LLM-powered correction for both Chinese and English addresses.

GitHub MCP Server

GitHub MCP Server

提供通过 MCP 协议与 GitHub API 交互的工具,允许用户创建存储库、推送内容和检索用户信息。

mcp-fabric-api

mcp-fabric-api

MCP server for Microsoft Fabric REST APIs that enables data engineers and analysts to manage Fabric components using AI assistants.

MCP Gemini Server

MCP Gemini Server

镜子 (jìng zi)

Confluence MCP Server

Confluence MCP Server

A server that integrates Confluence with Claude Desktop and other AI assistants, enabling natural language interactions with your Confluence documentation.

MCP Multiagent Bridge

MCP Multiagent Bridge

Enables secure coordination between multiple LLM agents through authenticated messaging, status updates, and conversation management. Features automatic secret redaction, rate limiting, and audit trails for safe multi-agent collaboration in development environments.

mcp-server-template

mcp-server-template

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.

MCP Demo

MCP Demo

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

ReasonForge

ReasonForge

Provides a suite of deterministic math tools powered by SymPy to handle algebra, calculus, linear algebra, and statistics via the Model Context Protocol. It enables smaller language models to delegate complex computations to a verified symbolic backend for accurate and reliable results.

MCP Ethereum Address Info Server

MCP Ethereum Address Info Server

使用模型上下文协议,跨多个链提供以太坊地址的实时信息,并具有用于实时更新的服务器发送事件 (Server-Sent Events) 端点。

HoudiniMCP

HoudiniMCP

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

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.

memos-mcp-server

memos-mcp-server

Enables AI assistants to create, read, update, delete, and list memos via the MCP protocol.

LinkedIn MCP Assistant

LinkedIn MCP Assistant

LinkedIn MCP Assistant

Dataverse MCP Server

Dataverse MCP Server

A Model Context Protocol server that enables CRUD operations and querying on Microsoft Dataverse through natural language.

codex-web-bridge

codex-web-bridge

Local MCP server bridging ChatGPT Web to local tools for file, shell, git, test, and process management with secure policy controls.

Autodocument MCP Server

Autodocument MCP Server

一个 MCP 服务器,它通过 OpenRouter API 使用 AI 模型分析目录结构和代码文件,从而自动为代码仓库生成文档、测试计划和代码审查。

Cortex

Cortex

An MCP server for capturing, searching, and synthesizing knowledge objects with formal ontology, reasoning, and hybrid retrieval.

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.

Transfa

Transfa

Upload any file from the local filesystem and get a shareable, expiring link — with tools to check file status, list recent uploads, and delete files on demand.

fpl-server

fpl-server

FPL 的 MCP 服务器

mcp-openweather

mcp-openweather

Wraps the OpenWeatherMap API to provide weather data through MCP, enabling AI agents to query current conditions, forecasts, and other weather information via natural language.

CorelDRAW Signage MCP

CorelDRAW Signage MCP

This MCP server exposes CorelDRAW as a tool server, enabling AI agents to create documents, replace text, manipulate shapes, run preflight checks, and batch-export production files from natural language instructions via COM API.

OctoBrowser MCP Server

OctoBrowser MCP Server

Enables Claude Desktop to automate OctoBrowser, managing profiles, tags, proxies, and cookies through a standardized protocol interface.