Discover Awesome MCP Servers

Extend your agent with 14,529 capabilities via MCP servers.

All14,529
Workers MCP Server

Workers MCP Server

Talk to a Cloudflare Worker from Claude Desktop!

Waldzell MCP Servers

Waldzell MCP Servers

Monorepo de servidores MCP da Waldzell AI. Use no Claude Desktop, Cline, Roo Code e muito mais!

Goose FM

Goose FM

MVP de um servidor MCP que permite que assistentes de IA sintonizem estações de rádio FM.

My Slack MCP Server Extension

My Slack MCP Server Extension

Uma extensão para o servidor MCP do Slack.

postgres-mcp MCP server

postgres-mcp MCP server

Postgres Pro é um servidor de Protocolo de Contexto de Modelo (MCP) de código aberto construído para dar suporte a você e seus agentes de IA durante todo o processo de desenvolvimento—desde a codificação inicial, passando por testes e implantação, até o ajuste e manutenção da produção.

What is Model Context Protocol (MCP)?

What is Model Context Protocol (MCP)?

Um servidor Model Context Protocol (MCP) leve que permite ao seu LLM validar endereços de e-mail. Esta ferramenta verifica o formato do e-mail, a validade do domínio e a capacidade de entrega usando a API de Validação de E-mail da AbstractAPI. Perfeito para integrar a validação de e-mail em aplicações de IA como o Claude Desktop.

Quarkus Model Context Protocol (MCP) Server

Quarkus Model Context Protocol (MCP) Server

Mirror of

Cortellis MCP Server

Cortellis MCP Server

An MCP server enabling AI assistants to search and analyze pharmaceutical data through Cortellis. Features comprehensive drug search, ontology exploration, and real-time clinical trial data access.

mcp-oceanbase

mcp-oceanbase

Servidor MCP para o banco de dados OceanBase e suas ferramentas.

Limitless MCP Integration

Limitless MCP Integration

A Model Context Protocol server, client and interactive mode for Limitless API

Template Redmine Plugin

Template Redmine Plugin

@modelcontextprotocol/server-terminal

@modelcontextprotocol/server-terminal

Mirror of

ModelContextProtocol (MCP) Java SDK v0.8.0 Specification

ModelContextProtocol (MCP) Java SDK v0.8.0 Specification

Okay, here are instructions for an AI on how to create a Java-based Minecraft Protocol (MCP) server and client. This is a complex task, so the instructions are broken down into manageable steps. The AI should be able to use these instructions to generate code snippets and explanations. **Important Considerations Before Starting:** * **Minecraft Protocol (MCP) Version:** The Minecraft protocol changes with every version of the game. The AI *must* know which Minecraft version the server and client are intended for. This is *critical*. The instructions below assume the AI can be told the target version. Let's assume for this example, we're targeting **Minecraft 1.19.4**. The AI needs to be able to find the protocol documentation for 1.19.4. A good starting point is the Wiki.vg website. * **Libraries:** Using existing libraries will significantly simplify the process. Consider using libraries like: * **Netty:** For handling network communication (TCP sockets). This is almost essential. * **Gson or Jackson:** For JSON serialization/deserialization (used in some packets). * **SLF4J or Log4j:** For logging. * **Error Handling:** Robust error handling is crucial. The AI should include try-catch blocks and logging to handle potential exceptions. * **Security:** Be aware of security implications. The AI should be instructed to avoid common vulnerabilities like command injection or denial-of-service attacks. Consider encryption (e.g., using the Minecraft encryption handshake). * **Asynchronous Operations:** Network operations should be handled asynchronously to avoid blocking the main thread. Netty makes this easier. * **Code Structure:** Encourage a modular and well-structured codebase. Separate concerns into different classes and packages. **High-Level Overview:** The process involves: 1. **Setting up the Project:** Create a Java project with the necessary dependencies (Netty, Gson/Jackson, logging). 2. **Understanding the Minecraft Protocol:** Research the specific protocol for the target Minecraft version (1.19.4 in this example). Pay close attention to: * **Handshaking:** The initial connection process. * **Packet IDs:** Each packet type has a unique ID. * **Packet Structure:** The data fields within each packet and their data types. * **State Management:** The connection goes through different states (Handshaking, Status, Login, Play). 3. **Implementing the Server:** * Listen for incoming connections. * Handle the handshake. * Handle login. * Implement the "Play" state, which involves sending and receiving game-related packets. 4. **Implementing the Client:** * Connect to the server. * Perform the handshake. * Login. * Send and receive game-related packets. **Detailed Instructions for the AI:** **Phase 1: Project Setup (Server and Client - Shared Steps)** 1. **Create a New Java Project:** Use a build tool like Maven or Gradle. The AI should generate the necessary `pom.xml` (Maven) or `build.gradle` (Gradle) file. Example (Maven): ```xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.example</groupId> <artifactId>minecraft-mcp</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>minecraft-mcp</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <netty.version>4.1.94.Final</netty.version> <gson.version>2.10.1</gson.version> <slf4j.version>2.0.7</slf4j.version> </properties> <dependencies> <dependency> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> <version>${netty.version}</version> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>${gson.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>${slf4j.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> <source>17</source> <target>17</target> </configuration> </plugin> </plugins> </build> </project> ``` 2. **Add Dependencies:** Include the necessary dependencies in the `pom.xml` or `build.gradle` file. At a minimum, include Netty, Gson (or Jackson), and SLF4J (or Log4j). The AI should suggest appropriate versions. The example above shows the dependencies. 3. **Create Basic Packages:** Create packages for the server and client code, such as `com.example.minecraft.server` and `com.example.minecraft.client`. Also, create a package for shared code, such as `com.example.minecraft.protocol`. **Phase 2: Protocol Definition (Shared)** 1. **Packet Structure Classes:** Create Java classes to represent the structure of each packet. These classes should have fields corresponding to the data fields in the Minecraft protocol. The AI *must* consult the Minecraft protocol documentation for the target version (1.19.4). For example, a simple "KeepAlive" packet might look like this: ```java package com.example.minecraft.protocol.packets; public class KeepAlivePacket { private long keepAliveId; public KeepAlivePacket(long keepAliveId) { this.keepAliveId = keepAliveId; } public long getKeepAliveId() { return keepAliveId; } public void setKeepAliveId(long keepAliveId) { this.keepAliveId = keepAliveId; } } ``` The AI should generate similar classes for other packets, based on the protocol documentation. Crucially, it needs to know the data types (e.g., `int`, `long`, `String`, `byte[]`) for each field. Minecraft uses custom data types like "VarInt" and "VarLong," which need special handling (see below). 2. **Packet IDs:** Define constants for the packet IDs. These IDs are used to identify the type of packet being sent or received. The AI should create an `enum` or a class with `static final int` fields for each packet ID. Again, this information comes from the protocol documentation. Example: ```java package com.example.minecraft.protocol; public class PacketConstants { public static final int HANDSHAKE_PACKET_ID = 0x00; public static final int LOGIN_START_PACKET_ID = 0x00; public static final int KEEP_ALIVE_PACKET_ID = 0x1F; // Example ID - check the actual protocol // ... other packet IDs } ``` 3. **Data Serialization/Deserialization:** Implement methods to serialize and deserialize the packet data. This involves converting Java objects into byte arrays for sending over the network and converting byte arrays back into Java objects when receiving data. This is where Netty's `ByteBuf` class is very useful. The AI should create helper methods or classes for reading and writing data to `ByteBuf` objects. **Crucially, handle VarInt and VarLong correctly.** These are variable-length integers that are encoded differently than standard `int` and `long` values. The AI needs to find and implement the VarInt/VarLong encoding/decoding algorithms. Example (simplified): ```java package com.example.minecraft.protocol.util; import io.netty.buffer.ByteBuf; public class ByteBufUtils { public static void writeVarInt(ByteBuf buffer, int value) { while (true) { if ((value & ~0x7F) == 0) { buffer.writeByte(value); return; } else { buffer.writeByte((value & 0x7F) | 0x80); value >>>= 7; } } } public static int readVarInt(ByteBuf buffer) { int numRead = 0; int result = 0; byte read; do { read = buffer.readByte(); int value = (read & 0x7F); result |= (value << (7 * numRead)); numRead++; if (numRead > 5) { throw new RuntimeException("VarInt is too big"); } } while ((read & 0x80) != 0); return result; } // Similar methods for VarLong, Strings, etc. } ``` The AI should provide similar methods for writing and reading other data types, including strings (which are length-prefixed), booleans, and byte arrays. **Phase 3: Server Implementation** 1. **Server Class:** Create a `MinecraftServer` class. This class will be responsible for listening for incoming connections and handling them. 2. **Netty Setup:** Use Netty to create a `ServerBootstrap` that binds to a specific port (e.g., 25565). Configure the `ServerBootstrap` with a `ChannelInitializer` that adds the necessary handlers to the channel pipeline. 3. **Channel Handlers:** Create custom `ChannelHandler` classes to handle different stages of the connection: * **Handshake Handler:** Handles the initial handshake packet. This handler should read the protocol version, server address, and port from the handshake packet and determine the next state (Status, Login, or Play). * **Status Handler:** Handles status requests (used by the Minecraft client to display server information in the server list). This handler should respond with a JSON string containing the server's MOTD, player count, and other information. * **Login Handler:** Handles the login process. This handler should authenticate the player (e.g., by verifying their username against a database or Mojang's authentication servers). If the login is successful, the handler should transition the connection to the "Play" state. * **Play Handler:** Handles game-related packets. This handler should process incoming packets from the client and send appropriate responses. This is the most complex part of the server. 4. **Packet Handling:** Within each handler, implement logic to read the packet ID from the `ByteBuf` and dispatch the packet to the appropriate handler method. The AI should use a `switch` statement or a `Map` to map packet IDs to handler methods. 5. **Example Server Code (Simplified):** ```java package com.example.minecraft.server; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.*; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.handler.codec.ByteToMessageDecoder; import io.netty.handler.codec.MessageToByteEncoder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class MinecraftServer { private static final Logger logger = LoggerFactory.getLogger(MinecraftServer.class); private int port; public MinecraftServer(int port) { this.port = port; } public void start() throws Exception { EventLoopGroup bossGroup = new NioEventLoopGroup(); EventLoopGroup workerGroup = new NioEventLoopGroup(); try { ServerBootstrap b = new ServerBootstrap(); b.group(bossGroup, workerGroup) .channel(NioServerSocketChannel.class) .childHandler(new ChannelInitializer<SocketChannel>() { @Override public void initChannel(SocketChannel ch) throws Exception { ChannelPipeline p = ch.pipeline(); // Add packet encoder and decoder p.addLast("decoder", new PacketDecoder()); p.addLast("encoder", new PacketEncoder()); // Add handlers for different states p.addLast("handshakeHandler", new HandshakeHandler()); p.addLast("loginHandler", new LoginHandler()); p.addLast("playHandler", new PlayHandler()); // Placeholder } }) .option(ChannelOption.SO_BACKLOG, 128) .childOption(ChannelOption.SO_KEEPALIVE, true); // Bind and start to accept incoming connections. ChannelFuture f = b.bind(port).sync(); logger.info("Server started on port " + port); // Wait until the server socket is closed. // In this example, this does not happen, but you can do that to gracefully // shut down your server. f.channel().closeFuture().sync(); } finally { workerGroup.shutdownGracefully(); bossGroup.shutdownGracefully(); } } public static void main(String[] args) throws Exception { int port = 25565; // Default Minecraft port MinecraftServer server = new MinecraftServer(port); server.start(); } } // Example Handlers (Implement these based on the protocol) class HandshakeHandler extends ChannelInboundHandlerAdapter { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { // Handle the handshake packet // Determine the next state (Status, Login, Play) // Remove this handler from the pipeline after handling the handshake logger.info("Received Handshake"); ctx.pipeline().remove(this); // Remove after handling ctx.fireChannelRead(msg); // Pass the message to the next handler } } class LoginHandler extends ChannelInboundHandlerAdapter { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { // Handle the login process logger.info("Received Login"); ctx.pipeline().remove(this); // Remove after handling ctx.fireChannelRead(msg); // Pass the message to the next handler } } class PlayHandler extends ChannelInboundHandlerAdapter { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { // Handle game-related packets logger.info("Received Play Packet"); } } class PacketDecoder extends ByteToMessageDecoder { @Override protected void decode(ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, java.util.List<Object> out) throws Exception { if (in.readableBytes() < 5) { // Minimum size for a packet (VarInt ID) return; } in.markReaderIndex(); int packetLength = ByteBufUtils.readVarInt(in); if (in.readableBytes() < packetLength) { in.resetReaderIndex(); return; } int packetId = ByteBufUtils.readVarInt(in); logger.debug("Received packet with ID: 0x" + Integer.toHexString(packetId)); // Create a new ByteBuf containing the packet data ByteBuf packetData = in.readRetainedSlice(packetLength - ByteBufUtils.getVarIntSize(packetId)); // Pass the packet ID and data to the next handler out.add(new PacketInfo(packetId, packetData)); } } class PacketEncoder extends MessageToByteEncoder<Object> { @Override protected void encode(ChannelHandlerContext ctx, Object msg, io.netty.buffer.ByteBuf out) throws Exception { // Encode the packet // This will depend on the specific packet type // Example: // ByteBufUtils.writeVarInt(out, packetId); // ... write packet data ... logger.debug("Encoding packet"); } } class PacketInfo { private final int packetId; private final ByteBuf packetData; public PacketInfo(int packetId, ByteBuf packetData) { this.packetId = packetId; this.packetData = packetData; } public int getPacketId() { return packetId; } public ByteBuf getPacketData() { return packetData; } } ``` This is a very basic example. The AI needs to fill in the details based on the Minecraft protocol. The `PacketDecoder` and `PacketEncoder` are crucial for handling the variable-length integers and packet structure. **Phase 4: Client Implementation** The client implementation is very similar to the server implementation, but with the following differences: 1. **Client Class:** Create a `MinecraftClient` class. 2. **Netty Setup:** Use Netty to create a `Bootstrap` that connects to the server. 3. **Channel Handlers:** Create similar `ChannelHandler` classes for the client: * **Handshake Handler:** Sends the initial handshake packet to the server. * **Login Handler:** Sends the login start packet to the server. * **Play Handler:** Handles game-related packets from the server. 4. **Packet Handling:** Implement logic to send and receive packets, similar to the server. 5. **Example Client Code (Simplified):** ```java package com.example.minecraft.client; import io.netty.bootstrap.Bootstrap; import io.netty.channel.*; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioSocketChannel; import io.netty.handler.codec.ByteToMessageDecoder; import io.netty.handler.codec.MessageToByteEncoder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class MinecraftClient { private static final Logger logger = LoggerFactory.getLogger(MinecraftClient.class); private final String host; private final int port; public MinecraftClient(String host, int port) { this.host = host; this.port = port; } public void start() throws Exception { EventLoopGroup workerGroup = new NioEventLoopGroup(); try { Bootstrap b = new Bootstrap(); b.group(workerGroup); b.channel(NioSocketChannel.class); b.option(ChannelOption.SO_KEEPALIVE, true); b.handler(new ChannelInitializer<SocketChannel>() { @Override public void initChannel(SocketChannel ch) throws Exception { ChannelPipeline p = ch.pipeline(); p.addLast("decoder", new PacketDecoder()); p.addLast("encoder", new PacketEncoder()); p.addLast("handshakeHandler", new HandshakeHandler(host, port)); p.addLast("loginHandler", new LoginHandler("TestPlayer")); // Replace with actual username p.addLast("playHandler", new PlayHandler()); } }); // Start the client. ChannelFuture f = b.connect(host, port).sync(); logger.info("Client connected to " + host + ":" + port); // Wait until the connection is closed. f.channel().closeFuture().sync(); } finally { workerGroup.shutdownGracefully(); } } public static void main(String[] args) throws Exception { String host = "localhost"; int port = 25565; MinecraftClient client = new MinecraftClient(host, port); client.start(); } } class HandshakeHandler extends ChannelInboundHandlerAdapter { private final String host; private final int port; public HandshakeHandler(String host, int port) { this.host = host; this.port = port; } @Override public void channelActive(ChannelHandlerContext ctx) throws Exception { // Send the handshake packet when the connection is established logger.info("Sending Handshake"); // Construct the handshake packet using ByteBufUtils and the protocol // ctx.writeAndFlush(handshakePacket); ctx.pipeline().remove(this); // Remove after sending } } class LoginHandler extends ChannelInboundHandlerAdapter { private final String username; public LoginHandler(String username) { this.username = username; } @Override public void channelActive(ChannelHandlerContext ctx) throws Exception { // Send the login start packet logger.info("Sending Login Start"); // Construct the login start packet // ctx.writeAndFlush(loginStartPacket); ctx.pipeline().remove(this); // Remove after sending } } class PlayHandler extends ChannelInboundHandlerAdapter { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { // Handle game-related packets from the server logger.info("Received Play Packet from Server"); } } class PacketDecoder extends ByteToMessageDecoder { @Override protected void decode(ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, java.util.List<Object> out) throws Exception { if (in.readableBytes() < 5) { // Minimum size for a packet (VarInt ID) return; } in.markReaderIndex(); int packetLength = ByteBufUtils.readVarInt(in); if (in.readableBytes() < packetLength) { in.resetReaderIndex(); return; } int packetId = ByteBufUtils.readVarInt(in); logger.debug("Received packet with ID: 0x" + Integer.toHexString(packetId)); // Create a new ByteBuf containing the packet data ByteBuf packetData = in.readRetainedSlice(packetLength - ByteBufUtils.getVarIntSize(packetId)); // Pass the packet ID and data to the next handler out.add(new PacketInfo(packetId, packetData)); } } class PacketEncoder extends MessageToByteEncoder<Object> { @Override protected void encode(ChannelHandlerContext ctx, Object msg, io.netty.buffer.ByteBuf out) throws Exception { // Encode the packet // This will depend on the specific packet type // Example: // ByteBufUtils.writeVarInt(out, packetId); // ... write packet data ... logger.debug("Encoding packet"); } } class PacketInfo { private final int packetId; private final ByteBuf packetData; public PacketInfo(int packetId, ByteBuf packetData) { this.packetId = packetId; this.packetData = packetData; } public int getPacketId() { return packetId; } public ByteBuf getPacketData() { return packetData; } } ``` Again, this is a simplified example. The AI needs to fill in the details based on the Minecraft protocol. The `HandshakeHandler` and `LoginHandler` need to construct and send the appropriate packets. **Phase 5: Testing and Debugging** 1. **Run the Server and Client:** Start the server and then the client. 2. **Use a Minecraft Client:** Try connecting to the server using a standard Minecraft client (version 1.19.4 in this example). 3. **Debug Packet Handling:** Use logging to track the packets being sent and received. Verify that the packet IDs and data are correct. 4. **Implement More Packets:** Gradually implement more packets to support more features of the Minecraft protocol. **Key Considerations for the AI:** * **Minecraft Protocol Documentation:** The AI *must* be able to access and understand the Minecraft protocol documentation for the target version. Wiki.vg is a good resource. * **Error Handling:** The AI should include robust error handling in all code. * **Asynchronous Operations:** The AI should use Netty's asynchronous features to avoid blocking the main thread. * **Security:** The AI should be aware of security implications and avoid common vulnerabilities. * **Code Clarity:** The AI should generate clear and well-documented code. * **Version Specificity:** The AI must generate code that is specific to the target Minecraft version. Packet IDs and data structures change between versions. **Example Prompts for the AI:** * "Generate a Maven `pom.xml` file for a Java project that uses Netty, Gson, and SLF4J." * "Create a Java class to represent the Minecraft `Handshake` packet for version 1.19.4. Include the fields `protocolVersion`, `serverAddress`, and `serverPort`." * "Implement a method to write a VarInt to a Netty `ByteBuf`." * "Create a Netty `ChannelHandler` that handles the Minecraft handshake. The handler should read the protocol version and set the next state to `Login`." * "Generate the code for a Minecraft client that connects to a server at `localhost:25565` and sends the handshake and login start packets." These instructions are a starting point. The AI will need to be able to adapt and refine its code based on the specific requirements of the project. Building a complete Minecraft server and client is a significant undertaking, but these instructions should provide a solid foundation. Good luck!

Code Analyzer MCP Server

Code Analyzer MCP Server

MCP server for analyzing code for bugs, errors, and functionality issues

Recall MCP Server

Recall MCP Server

Um servidor MCP simples que expõe funcionalidades básicas de Recall, incluindo listar buckets, obter saldos de contas, criar objetos e muito mais.

HAN JIE

HAN JIE

123123

🤖 Claude AI Documentation Assistant 📚

🤖 Claude AI Documentation Assistant 📚

Um servidor MCP que se integra com o Claude para fornecer capacidades inteligentes de busca de documentação em múltiplas bibliotecas de IA/ML, permitindo aos usuários recuperar e processar informações técnicas através de consultas em linguagem natural.

MCP Server Template (Python)

MCP Server Template (Python)

Bilibili MCP 服务器

Bilibili MCP 服务器

mcp-clj

mcp-clj

A MCP server written in clojure

MCP Server

MCP Server

Uma implementação baseada em FastAPI do Protocolo de Contexto do Modelo que permite a interação padronizada entre modelos de IA e ambientes de desenvolvimento, facilitando a integração e o gerenciamento de tarefas de IA para desenvolvedores.

Govee MCP Server

Govee MCP Server

Mirror of

GitHub MCP Server Practice Repository

GitHub MCP Server Practice Repository

Mirror of

Podman MCP Server

Podman MCP Server

Model Context Protocol (MCP) server for container runtimes (Podman and Docker)

Claude Desktop Commander MCP

Claude Desktop Commander MCP

Permite que Claude execute comandos de terminal no seu computador e realize operações no sistema de arquivos, incluindo edição cirúrgica de código com substituições baseadas em diff.

Dify as MCP Server

Dify as MCP Server

Expõe aplicações Dify (tanto Chatflow quanto Workflow) como servidores MCP (Model Context Protocol), permitindo que Claude e outros clientes MCP interajam diretamente com aplicativos Dify através de um protocolo padronizado.

imagegen-go MCP 服务器

imagegen-go MCP 服务器

MCP server which will trigger OpenAI to generate image

Weather MCP Server

Weather MCP Server

Um servidor de Protocolo de Contexto de Modelo que fornece informações meteorológicas.

FastMCP 🚀

FastMCP 🚀

The fast, Pythonic way to build Model Context Protocol servers 🚀

Firecrawl MCP Server

Firecrawl MCP Server

Espelho de