Discover Awesome MCP Servers

Extend your agent with 16,880 capabilities via MCP servers.

All16,880
Algolia Search MCP Server

Algolia Search MCP Server

mcp-figma

mcp-figma

A Model Context Protocol server that provides access to Figma API functionality, allowing AI assistants like Claude to interact with Figma files, comments, components, and team resources.

⚡️ mcpo

⚡️ mcpo

Máy chủ proxy MCP sang OpenAPI đơn giản và an toàn.

Datadog MCP Server

Datadog MCP Server

Mirror of

subnoto

subnoto

Subnoto - Electronic Signature MCP server allows to send, receive and sign electronic documents with legally binding signatures. It connects to a confidential computing environment to ensure confidentiality of exchanged documents.

MarkLogic MCP Server

MarkLogic MCP Server

Một máy chủ Giao thức Ngữ cảnh Mô hình (Model Context Protocol) cho MarkLogic, cho phép các hoạt động CRUD và khả năng truy vấn tài liệu thông qua giao diện máy khách.

MCP JSON-RPC Server

MCP JSON-RPC Server

Một máy chủ JSON-RPC lấy cảm hứng từ MCP, thân thiện với người mới bắt đầu, được xây dựng bằng Node.js, cung cấp tương tác cơ bản giữa máy khách và máy chủ thông qua bắt tay khả năng 'initialize' và hàm 'echo'.

StatFlow

StatFlow

Enables AI assistants to perform statistical analysis on MySQL databases, generating formatted Excel reports with t-tests and effect sizes, and creating thesis-quality Word documents with AI-powered insights.

Image Extractor

Image Extractor

Một máy chủ giao thức Model Context (Ngữ cảnh Mô hình) có chức năng trích xuất hình ảnh từ URL hoặc dữ liệu base64 và chuyển đổi chúng thành định dạng phù hợp cho phân tích LLM, cho phép các mô hình AI xử lý và hiểu nội dung trực quan.

MCP Servers Hub

MCP Servers Hub

Khám phá bộ sưu tập máy chủ MCP toàn diện và cập nhật nhất trên thị trường. Kho lưu trữ này đóng vai trò là một trung tâm tập trung, cung cấp danh mục mở rộng các máy chủ MCP mã nguồn mở và độc quyền, hoàn chỉnh với các tính năng, liên kết tài liệu và người đóng góp.

Eureka Labo MCP Server

Eureka Labo MCP Server

Enables task management and automated development tracking for Eureka Labo projects with git integration. Supports creating, updating, and tracking tasks while automatically capturing code changes and generating detailed development logs with syntax highlighting.

Obsidian MCP Server

Obsidian MCP Server

Enables AI assistants like Claude to read, search, create, and manage notes in Obsidian vaults, with features for link analysis, tag management, daily notes, templates, and optional Google Calendar integration. Provides comprehensive vault operations including batch updates, backlinks discovery, and secure file management with path traversal protection.

mcp-init

mcp-init

Okay, here's a basic outline and code snippets to get you started with creating a new Minecraft Protocol (MCP) server in TypeScript, with a focus on including common "batteries" (features and libraries) to make development easier. This will be a simplified example, and you'll need to expand upon it for a fully functional server. **Conceptual Outline** 1. **Project Setup:** Initialize a TypeScript project with necessary dependencies. 2. **Networking:** Set up a TCP server to listen for Minecraft client connections. 3. **Protocol Handling:** Implement the Minecraft protocol (MCP) parsing and serialization. This is the most complex part. 4. **Authentication:** Handle player authentication (online or offline mode). 5. **World Management:** Load, generate, and manage the game world. 6. **Entity Management:** Track and update entities (players, mobs, objects). 7. **Game Logic:** Implement game rules, events, and player interactions. 8. **Command Handling:** Parse and execute server commands. 9. **Logging:** Implement logging for debugging and monitoring. **1. Project Setup** ```bash mkdir minecraft-server cd minecraft-server npm init -y npm install typescript ts-node @types/node ws minecraft-protocol --save npm install nodemon --save-dev # For automatic restarts during development tsc --init # Creates a tsconfig.json file ``` **Explanation:** * `mkdir minecraft-server`: Creates a directory for your project. * `cd minecraft-server`: Navigates into the project directory. * `npm init -y`: Initializes a new Node.js project with default settings. * `npm install typescript ts-node @types/node ws minecraft-protocol --save`: Installs the core dependencies: * `typescript`: The TypeScript compiler. * `ts-node`: Allows you to run TypeScript files directly. * `@types/node`: TypeScript type definitions for Node.js. * `ws`: A WebSocket library (useful for some MCP implementations or future extensions). * `minecraft-protocol`: A library that handles the Minecraft protocol encoding and decoding. This is *crucial*. * `npm install nodemon --save-dev`: Installs `nodemon` as a development dependency. It automatically restarts the server when you make changes to your code. * `tsc --init`: Creates a `tsconfig.json` file, which configures the TypeScript compiler. **tsconfig.json (Example)** ```json { "compilerOptions": { "target": "es2020", "module": "commonjs", "outDir": "./dist", "rootDir": "./src", "strict": true, "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true }, "include": ["src/**/*"], "exclude": ["node_modules"] } ``` **Explanation:** * `target`: Specifies the ECMAScript target version (ES2020 is a good modern choice). * `module`: Specifies the module system (CommonJS is common for Node.js). * `outDir`: The directory where the compiled JavaScript files will be placed. * `rootDir`: The root directory of your TypeScript source files. * `strict`: Enables strict type checking. Highly recommended. * `esModuleInterop`: Enables interoperability between CommonJS and ES modules. * `skipLibCheck`: Skips type checking of declaration files (`.d.ts`). * `forceConsistentCasingInFileNames`: Enforces consistent casing in file names. * `resolveJsonModule`: Allows importing JSON files as modules. * `include`: Specifies the files to include in the compilation. * `exclude`: Specifies the files to exclude from the compilation. **2. Networking and Protocol Handling (src/index.ts)** ```typescript import net from 'net'; import { createServer } from 'minecraft-protocol'; const server = createServer({ 'online-mode': false, // Set to true for online authentication host: '0.0.0.0', // Listen on all interfaces port: 25565, // Default Minecraft port version: '1.19.4', // Specify the Minecraft version maxPlayers: 10 }); server.on('login', (client) => { console.log(`${client.username} connected`); client.on('end', () => { console.log(`${client.username} disconnected`); }); client.on('error', (err) => { console.error(`Client ${client.username} error:`, err); }); // Send initial game data (example) client.write('login', { entityId: 123, isHardcore: false, gameMode: 0, previousGameMode: -1, worldNames: ['minecraft:overworld'], dimensionCodec: { dimension: { type: 'compound', name: 'dimension', value: { ambient_light: { type: 'float', value: 0 }, bed_works: { type: 'byte', value: 1 }, coordinate_scale: { type: 'double', value: 1 }, effects: { type: 'string', value: 'minecraft:overworld' }, fixed_time: { type: 'long', value: 6000 }, has_ceiling: { type: 'byte', value: 0 }, has_raids: { type: 'byte', value: 1 }, has_skylight: { type: 'byte', value: 1 }, infiniburn: { type: 'string', value: 'minecraft:infiniburn_overworld' }, logical_height: { type: 'int', value: 256 }, min_y: { type: 'int', value: -64 }, height: { type: 'int', value: 384 }, monster_spawn_block_light_limit: { type: 'int', value: 0 }, monster_spawn_light_level: { type: 'int', value: 7 }, natural: { type: 'byte', value: 1 }, piglin_safe: { type: 'byte', value: 0 }, respawn_anchor_works: { type: 'byte', value: 0 }, require_skylight: { type: 'byte', value: 0 }, ultrawarm: { type: 'byte', value: 0 } } } }, dimension: 'minecraft:overworld', seed: [0, 0], maxPlayers: 10, isFlat: false, isDebug: false, hasRespawnAnchor: false }); client.write('position', { x: 0, y: 64, z: 0, yaw: 0, pitch: 0, flags: 0, teleportId: 0 }); client.write('chat', { message: JSON.stringify({ translate: 'chat.type.announcement', with: [ 'Server', 'Welcome to the server!' ] }), position: 0, sender: '0' }); }); server.on('listening', () => { console.log(`Server listening on port ${server.socketServer.address().port}`); }); server.on('error', (err) => { console.error('Server error:', err); }); ``` **Explanation:** * `import net from 'net';`: Imports the Node.js `net` module for networking. * `import { createServer } from 'minecraft-protocol';`: Imports the `createServer` function from the `minecraft-protocol` library. * `createServer(...)`: Creates the Minecraft server instance. * `online-mode`: Set to `false` for offline mode (no Mojang authentication). Set to `true` for online authentication (requires a Mojang account). **Important: Offline mode is insecure and should only be used for testing.** * `host`: The IP address to listen on. `'0.0.0.0'` listens on all interfaces. * `port`: The port to listen on (default Minecraft port is 25565). * `version`: The Minecraft version the server supports. **Crucially important to match the client's version.** Check the `minecraft-protocol` documentation for supported versions. * `maxPlayers`: The maximum number of players allowed on the server. * `server.on('login', (client) => { ... });`: This is the core event handler. It's called when a client successfully connects and authenticates. * `client`: An object representing the connected client. It has properties like `username` and methods for sending data. * `client.on('end', ...)`: Handles client disconnection. * `client.on('error', ...)`: Handles client errors. * `client.write('login', ...)`: Sends the initial login data to the client. This includes the entity ID, game mode, world information, and other essential data. **This data *must* be correct for the client to properly join the world.** The example provides a basic dimension codec. * `client.write('position', ...)`: Sends the player's initial position in the world. * `client.write('chat', ...)`: Sends a welcome message to the player. * `server.on('listening', ...)`: Called when the server starts listening for connections. * `server.on('error', ...)`: Handles server-level errors. **3. Running the Server** 1. **Compile:** Run `tsc` in your project directory to compile the TypeScript code to JavaScript. This will create a `dist` directory with the compiled files. 2. **Run:** Run the server using `node dist/index.js`. Alternatively, use `nodemon` for automatic restarts: `nodemon dist/index.js`. **Important Considerations and Next Steps** * **Minecraft Protocol Complexity:** The Minecraft protocol is *very* complex. The `minecraft-protocol` library handles much of the low-level encoding and decoding, but you still need to understand the structure of the packets and the data they contain. Refer to the `minecraft-protocol` documentation and the official Minecraft protocol documentation (if available) for details. * **World Generation:** The example doesn't include any world generation. You'll need to implement a system for creating and loading chunks of the world. Consider using libraries like `prismarine-chunk` and `prismarine-world` for this. * **Entity Management:** You'll need to manage entities (players, mobs, objects) in the world. This involves tracking their positions, properties, and interactions. * **Game Logic:** Implement the game rules, events, and player interactions. * **Security:** If you're running an online server, security is paramount. Implement proper authentication, authorization, and anti-cheat measures. * **Error Handling:** Add robust error handling to catch and log errors gracefully. * **Configuration:** Use a configuration file (e.g., JSON or YAML) to store server settings. * **Logging:** Implement a proper logging system for debugging and monitoring. Consider using a library like `winston` or `pino`. * **Plugins/Modding:** Consider designing your server with a plugin or modding API to allow for extensibility. **Example with `prismarine-chunk` (Illustrative)** This is a very basic example to show how you might start using `prismarine-chunk`. You'll need to install it: `npm install prismarine-chunk`. ```typescript import net from 'net'; import { createServer } from 'minecraft-protocol'; import { Chunk } from 'prismarine-chunk'; import { Vec3 } from 'vec3'; const server = createServer({ /* ... server options ... */ }); server.on('login', (client) => { // ... (existing login code) ... // Create a chunk const chunk = new Chunk({ version: '1.19.4' }); // Match server version // Fill the chunk with blocks (example: grass) for (let x = 0; x < 16; x++) { for (let z = 0; z < 16; z++) { chunk.setBlockType(new Vec3(x, 63, z), 2); // Grass block ID (may vary by version) chunk.setBlockData(new Vec3(x, 63, z), 0); } } // Send the chunk to the client client.write('map_chunk', { x: 0, z: 0, groundUp: true, biomes: new Array(1024).fill(1), // Example biome data heightmaps: { type: 'compound', name: 'heightmaps', value: { MOTION_BLOCKING: { type: 'longArray', value: new Array(36).fill(0) }, WORLD_SURFACE: { type: 'longArray', value: new Array(36).fill(0) } }}, chunkData: chunk.dump(), blockEntities: [] }); // ... (rest of the login code) ... }); ``` **Important Notes about `prismarine-chunk`:** * **Version Compatibility:** Make sure the `version` option in `new Chunk()` matches the Minecraft version your server is using. * **Block IDs:** Block IDs can change between Minecraft versions. You'll need to look up the correct IDs for the version you're using. Libraries like `prismarine-registry` can help with this. * **Chunk Format:** The chunk format is complex. `prismarine-chunk` simplifies it, but you still need to understand the basics of how chunks are structured. * **Biomes and Heightmaps:** The `biomes` and `heightmaps` data are also required for the client to render the chunk correctly. The example provides placeholder data; you'll need to generate realistic data for a proper world. **In summary, building a Minecraft server is a significant undertaking. Start with the basics, understand the protocol, and gradually add features. The `minecraft-protocol` and `prismarine-*` libraries are essential tools for this process.** **Vietnamese Translation:** Okay, đây là một phác thảo cơ bản và các đoạn mã để giúp bạn bắt đầu tạo một máy chủ Minecraft Protocol (MCP) mới bằng TypeScript, tập trung vào việc bao gồm các "pin" (tính năng và thư viện) phổ biến để giúp việc phát triển dễ dàng hơn. Đây sẽ là một ví dụ đơn giản và bạn sẽ cần mở rộng nó để có một máy chủ hoạt động đầy đủ. **Phác thảo khái niệm** 1. **Thiết lập dự án:** Khởi tạo một dự án TypeScript với các phụ thuộc cần thiết. 2. **Mạng:** Thiết lập một máy chủ TCP để lắng nghe các kết nối từ máy khách Minecraft. 3. **Xử lý giao thức:** Triển khai phân tích cú pháp và tuần tự hóa giao thức Minecraft (MCP). Đây là phần phức tạp nhất. 4. **Xác thực:** Xử lý xác thực người chơi (chế độ trực tuyến hoặc ngoại tuyến). 5. **Quản lý thế giới:** Tải, tạo và quản lý thế giới trò chơi. 6. **Quản lý thực thể:** Theo dõi và cập nhật các thực thể (người chơi, mob, đối tượng). 7. **Logic trò chơi:** Triển khai các quy tắc trò chơi, sự kiện và tương tác của người chơi. 8. **Xử lý lệnh:** Phân tích cú pháp và thực thi các lệnh máy chủ. 9. **Ghi nhật ký:** Triển khai ghi nhật ký để gỡ lỗi và giám sát. **1. Thiết lập dự án** ```bash mkdir minecraft-server cd minecraft-server npm init -y npm install typescript ts-node @types/node ws minecraft-protocol --save npm install nodemon --save-dev # Để tự động khởi động lại trong quá trình phát triển tsc --init # Tạo một tệp tsconfig.json ``` **Giải thích:** * `mkdir minecraft-server`: Tạo một thư mục cho dự án của bạn. * `cd minecraft-server`: Điều hướng vào thư mục dự án. * `npm init -y`: Khởi tạo một dự án Node.js mới với các cài đặt mặc định. * `npm install typescript ts-node @types/node ws minecraft-protocol --save`: Cài đặt các phụ thuộc cốt lõi: * `typescript`: Trình biên dịch TypeScript. * `ts-node`: Cho phép bạn chạy trực tiếp các tệp TypeScript. * `@types/node`: Định nghĩa kiểu TypeScript cho Node.js. * `ws`: Một thư viện WebSocket (hữu ích cho một số triển khai MCP hoặc các tiện ích mở rộng trong tương lai). * `minecraft-protocol`: Một thư viện xử lý mã hóa và giải mã giao thức Minecraft. Điều này là *rất quan trọng*. * `npm install nodemon --save-dev`: Cài đặt `nodemon` làm một phụ thuộc phát triển. Nó tự động khởi động lại máy chủ khi bạn thực hiện các thay đổi đối với mã của mình. * `tsc --init`: Tạo một tệp `tsconfig.json`, tệp này định cấu hình trình biên dịch TypeScript. **tsconfig.json (Ví dụ)** ```json { "compilerOptions": { "target": "es2020", "module": "commonjs", "outDir": "./dist", "rootDir": "./src", "strict": true, "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true }, "include": ["src/**/*"], "exclude": ["node_modules"] } ``` **Giải thích:** * `target`: Chỉ định phiên bản mục tiêu ECMAScript (ES2020 là một lựa chọn hiện đại tốt). * `module`: Chỉ định hệ thống mô-đun (CommonJS là phổ biến cho Node.js). * `outDir`: Thư mục nơi các tệp JavaScript đã biên dịch sẽ được đặt. * `rootDir`: Thư mục gốc của các tệp nguồn TypeScript của bạn. * `strict`: Bật kiểm tra kiểu nghiêm ngặt. Rất khuyến khích. * `esModuleInterop`: Cho phép khả năng tương tác giữa các mô-đun CommonJS và ES. * `skipLibCheck`: Bỏ qua kiểm tra kiểu của các tệp khai báo (`.d.ts`). * `forceConsistentCasingInFileNames`: Buộc cách viết hoa nhất quán trong tên tệp. * `resolveJsonModule`: Cho phép nhập các tệp JSON làm mô-đun. * `include`: Chỉ định các tệp cần đưa vào quá trình biên dịch. * `exclude`: Chỉ định các tệp cần loại trừ khỏi quá trình biên dịch. **2. Mạng và Xử lý giao thức (src/index.ts)** ```typescript import net from 'net'; import { createServer } from 'minecraft-protocol'; const server = createServer({ 'online-mode': false, // Đặt thành true để xác thực trực tuyến host: '0.0.0.0', // Lắng nghe trên tất cả các giao diện port: 25565, // Cổng Minecraft mặc định version: '1.19.4', // Chỉ định phiên bản Minecraft maxPlayers: 10 }); server.on('login', (client) => { console.log(`${client.username} đã kết nối`); client.on('end', () => { console.log(`${client.username} đã ngắt kết nối`); }); client.on('error', (err) => { console.error(`Lỗi máy khách ${client.username}:`, err); }); // Gửi dữ liệu trò chơi ban đầu (ví dụ) client.write('login', { entityId: 123, isHardcore: false, gameMode: 0, previousGameMode: -1, worldNames: ['minecraft:overworld'], dimensionCodec: { dimension: { type: 'compound', name: 'dimension', value: { ambient_light: { type: 'float', value: 0 }, bed_works: { type: 'byte', value: 1 }, coordinate_scale: { type: 'double', value: 1 }, effects: { type: 'string', value: 'minecraft:overworld' }, fixed_time: { type: 'long', value: 6000 }, has_ceiling: { type: 'byte', value: 0 }, has_raids: { type: 'byte', value: 1 }, has_skylight: { type: 'byte', value: 1 }, infiniburn: { type: 'string', value: 'minecraft:infiniburn_overworld' }, logical_height: { type: 'int', value: 256 }, min_y: { type: 'int', value: -64 }, height: { type: 'int', value: 384 }, monster_spawn_block_light_limit: { type: 'int', value: 0 }, monster_spawn_light_level: { type: 'int', value: 7 }, natural: { type: 'byte', value: 1 }, piglin_safe: { type: 'byte', value: 0 }, respawn_anchor_works: { type: 'byte', value: 0 }, require_skylight: { type: 'byte', value: 0 }, ultrawarm: { type: 'byte', value: 0 } } } }, dimension: 'minecraft:overworld', seed: [0, 0], maxPlayers: 10, isFlat: false, isDebug: false, hasRespawnAnchor: false }); client.write('position', { x: 0, y: 64, z: 0, yaw: 0, pitch: 0, flags: 0, teleportId: 0 }); client.write('chat', { message: JSON.stringify({ translate: 'chat.type.announcement', with: [ 'Server', 'Chào mừng đến với máy chủ!' ] }), position: 0, sender: '0' }); }); server.on('listening', () => { console.log(`Máy chủ đang lắng nghe trên cổng ${server.socketServer.address().port}`); }); server.on('error', (err) => { console.error('Lỗi máy chủ:', err); }); ``` **Giải thích:** * `import net from 'net';`: Nhập mô-đun `net` của Node.js để kết nối mạng. * `import { createServer } from 'minecraft-protocol';`: Nhập hàm `createServer` từ thư viện `minecraft-protocol`. * `createServer(...)`: Tạo phiên bản máy chủ Minecraft. * `online-mode`: Đặt thành `false` cho chế độ ngoại tuyến (không xác thực Mojang). Đặt thành `true` để xác thực trực tuyến (yêu cầu tài khoản Mojang). **Quan trọng: Chế độ ngoại tuyến không an toàn và chỉ nên được sử dụng để thử nghiệm.** * `host`: Địa chỉ IP để lắng nghe. `'0.0.0.0'` lắng nghe trên tất cả các giao diện. * `port`: Cổng để lắng nghe (cổng Minecraft mặc định là 25565). * `version`: Phiên bản Minecraft mà máy chủ hỗ trợ. **Cực kỳ quan trọng để khớp với phiên bản của máy khách.** Kiểm tra tài liệu `minecraft-protocol` để biết các phiên bản được hỗ trợ. * `maxPlayers`: Số lượng người chơi tối đa được phép trên máy chủ. * `server.on('login', (client) => { ... });`: Đây là trình xử lý sự kiện cốt lõi. Nó được gọi khi một máy khách kết nối và xác thực thành công. * `client`: Một đối tượng đại diện cho máy khách đã kết nối. Nó có các thuộc tính như `username` và các phương thức để gửi dữ liệu. * `client.on('end', ...)`: Xử lý ngắt kết nối của máy khách. * `client.on('error', ...)`: Xử lý lỗi của máy khách. * `client.write('login', ...)`: Gửi dữ liệu đăng nhập ban đầu cho máy khách. Điều này bao gồm ID thực thể, chế độ trò chơi, thông tin thế giới và các dữ liệu cần thiết khác. **Dữ liệu này *phải* chính xác để máy khách tham gia thế giới một cách chính xác.** Ví dụ cung cấp một codec kích thước cơ bản. * `client.write('position', ...)`: Gửi vị trí ban đầu của người chơi trong thế giới. * `client.write('chat', ...)`: Gửi một tin nhắn chào mừng đến người chơi. * `server.on('listening', ...)`: Được gọi khi máy chủ bắt đầu lắng nghe các kết nối. * `server.on('error', ...)`: Xử lý các lỗi cấp máy chủ. **3. Chạy máy chủ** 1. **Biên dịch:** Chạy `tsc` trong thư mục dự án của bạn để biên dịch mã TypeScript thành JavaScript. Điều này sẽ tạo một thư mục `dist` với các tệp đã biên dịch. 2. **Chạy:** Chạy máy chủ bằng cách sử dụng `node dist/index.js`. Ngoài ra, hãy sử dụng `nodemon` để tự động khởi động lại: `nodemon dist/index.js`. **Các cân nhắc quan trọng và các bước tiếp theo** * **Độ phức tạp của giao thức Minecraft:** Giao thức Minecraft *rất* phức tạp. Thư viện `minecraft-protocol` xử lý phần lớn việc mã hóa và giải mã cấp thấp, nhưng bạn vẫn cần hiểu cấu trúc của các gói và dữ liệu mà chúng chứa. Tham khảo tài liệu `minecraft-protocol` và tài liệu giao thức Minecraft chính thức (nếu có) để biết chi tiết. * **Tạo thế giới:** Ví dụ không bao gồm bất kỳ thế giới nào. Bạn sẽ cần triển khai một hệ thống để tạo và tải các khối của thế giới. Cân nhắc sử dụng các thư viện như `prismarine-chunk` và `prismarine-world` cho việc này. * **Quản lý thực thể:** Bạn sẽ cần quản lý các thực thể (người chơi, mob, đối tượng) trong thế giới. Điều này liên quan đến việc theo dõi vị trí, thuộc tính và tương tác của chúng. * **Logic trò chơi:** Triển khai các quy tắc trò chơi, sự kiện và tương tác của người chơi. * **Bảo mật:** Nếu bạn đang chạy một máy chủ trực tuyến, bảo mật là tối quan trọng. Triển khai xác thực, ủy quyền và các biện pháp chống gian lận thích hợp. * **Xử lý lỗi:** Thêm xử lý lỗi mạnh mẽ để bắt và ghi lại các lỗi một cách duyên dáng. * **Cấu hình:** Sử dụng tệp cấu hình (ví dụ: JSON hoặc YAML) để lưu trữ cài đặt máy chủ. * **Ghi nhật ký:** Triển khai một hệ thống ghi nhật ký thích hợp để gỡ lỗi và giám sát. Cân nhắc sử dụng một thư viện như `winston` hoặc `pino`. * **Plugin/Modding:** Cân nhắc thiết kế máy chủ của bạn với API plugin hoặc modding để cho phép khả năng mở rộng. **Ví dụ với `prismarine-chunk` (Minh họa)** Đây là một ví dụ rất cơ bản để cho thấy cách bạn có thể bắt đầu sử dụng `prismarine-chunk`. Bạn sẽ cần cài đặt nó: `npm install prismarine-chunk`. ```typescript import net from 'net'; import { createServer } from 'minecraft-protocol'; import { Chunk } from 'prismarine-chunk'; import { Vec3 } from 'vec3'; const server = createServer({ /* ... các tùy chọn máy chủ ... */ }); server.on('login', (client) => { // ... (mã đăng nhập hiện có) ... // Tạo một khối const chunk = new Chunk({ version: '1.19.4' }); // Khớp với phiên bản máy chủ // Điền vào khối với các khối (ví dụ: cỏ) for (let x = 0; x < 16; x++) { for (let z = 0; z < 16; z++) { chunk.setBlockType(new Vec3(x, 63, z), 2); // ID khối cỏ (có thể khác nhau tùy theo phiên bản) chunk.setBlockData(new Vec3(x, 63, z), 0); } } // Gửi khối cho máy khách client.write('map_chunk', { x: 0, z: 0, groundUp: true, biomes: new Array(1024).fill(1), // Dữ liệu quần xã ví dụ heightmaps: { type: 'compound', name: 'heightmaps', value: { MOTION_BLOCKING: { type: 'longArray', value: new Array(36).fill(0) }, WORLD_SURFACE: { type: 'longArray', value: new Array(36).fill(0) } }}, chunkData: chunk.dump(), blockEntities: [] }); // ... (phần còn lại của mã đăng nhập) ... }); ``` **Lưu ý quan trọng về `prismarine-chunk`:** * **Khả năng tương thích phiên bản:** Đảm bảo tùy chọn `version` trong `new Chunk()` khớp với phiên bản Minecraft mà máy chủ của bạn đang sử dụng. * **ID khối:** ID khối có thể thay đổi giữa các phiên bản Minecraft. Bạn sẽ cần tra cứu ID chính xác cho phiên bản bạn đang sử dụng. Các thư viện như `prismarine-registry` có thể giúp bạn việc này. * **Định dạng khối:** Định dạng khối rất phức tạp. `prismarine-chunk` đơn giản hóa nó, nhưng bạn vẫn cần hiểu những điều cơ bản về cách các khối được cấu trúc. * **Quần xã và Bản đồ độ cao:** Dữ liệu `biomes` và `heightmaps` cũng được yêu cầu để máy khách hiển thị khối một cách chính xác. Ví dụ cung cấp dữ liệu giữ chỗ; bạn sẽ cần tạo dữ liệu thực tế cho một thế giới thích hợp. **Tóm lại, xây dựng một máy chủ Minecraft là một nỗ lực đáng kể. Bắt đầu với những điều cơ bản, hiểu giao thức và dần dần thêm các tính năng. Các thư viện `minecraft-protocol` và `prismarine-*` là những công cụ cần thiết cho quá trình này.**

MCP Tools

MCP Tools

An MCP (Model Context Protocol) server implementation using HTTP SSE (Server-Sent Events) connections with built-in utility tools including echo, time, calculator, and weather query functionality.

Zerodha Trading Bot MCP

Zerodha Trading Bot MCP

An automated trading bot that interfaces with Zerodha to execute stock trades, manage positions, and access market information through natural language commands.

Data Analysis MCP Server

Data Analysis MCP Server

Provides comprehensive statistical analysis tools for industrial data including time series analysis, correlation calculations, stationarity tests, outlier detection, causal analysis, and forecasting capabilities. Enables data quality assessment and statistical modeling through a FastAPI-based MCP architecture.

MCP Ctl

MCP Ctl

Một trình quản lý gói để quản lý tất cả các máy chủ MCP của bạn trên các nền tảng.

MCP Tool

MCP Tool

Một máy chủ được xây dựng trên mcp-framework, cho phép tích hợp với Claude Desktop thông qua Giao thức Ngữ cảnh Mô hình (Model Context Protocol).

Cloudflare Playwright MCP

Cloudflare Playwright MCP

A Model Control Protocol server that enables AI assistants to control a browser through tools for web automation tasks like navigation, typing, clicking, and taking screenshots.

Cloudflare Playwright MCP

Cloudflare Playwright MCP

Enables AI assistants to control a browser through a set of tools, allowing them to perform web automation tasks like navigation, typing, clicking, and taking screenshots.

MCP Debugger Tools

MCP Debugger Tools

A VSCode extension that enables AI agents to programmatically control VSCode's debugging features through the Model Context Protocol (MCP).

MAVLinkMCP

MAVLinkMCP

Máy chủ MCP để LLM giao tiếp với máy bay không người lái thông qua MAVLink

Azure Java SDK MCP Server

Azure Java SDK MCP Server

A Model Context Protocol server that provides Azure Java SDK documentation to AI assistants, allowing them to access readme files with introductions, key concepts, and code samples.

Node.js MCP Weather Server

Node.js MCP Weather Server

An MCP server that provides weather information like forecasts and alerts for US locations using the National Weather Service API.

mcp-server-hcp-terraform

mcp-server-hcp-terraform

Máy chủ MCP để làm việc với HCP Terraform

🌐 Claude MCP Server Quickstart

🌐 Claude MCP Server Quickstart

UML MCP

UML MCP

Enables AI assistants to generate UML diagrams through natural language by rendering PlantUML code into PNG or SVG images. Supports sequence diagrams, class diagrams, use case diagrams, and other UML chart types with Base64-encoded output.

ssh-connect MCP server

ssh-connect MCP server

Máy chủ MCP cho các kết nối SSH và các thao tác tập tin.

Prisma

Prisma

homelab-mcp

homelab-mcp

MCP servers for managing homelab infrastructure. Monitor Docker/Podman containers, Ollama AI models, Pi-hole DNS, Unifi networks, and Ansible inventory.