Discover Awesome MCP Servers

Extend your agent with 12,499 capabilities via MCP servers.

All12,499
Most Popular Model Context Protocol (MCP) Servers

Most Popular Model Context Protocol (MCP) Servers

Smithery.ai の利用データに基づいた、最も人気のある Model Context Protocol (MCP) サーバーの厳選リスト

goose-with-mcp-servers

goose-with-mcp-servers

「Codename Goose」の Docker イメージ (MCP サーバー付き)

MCP Client Server With LLM Command Execution

MCP Client Server With LLM Command Execution

Coco AI

Coco AI

Coco AIアプリ - 検索、つながり、コラボレーション。あなただけのAI検索とアシスタントが、すべて一つの場所に。

Unity AI MCP Server

Unity AI MCP Server

Unityゲーム開発向けに、AIを活用したツールやアシスタンスを提供するMCPサーバー。Cursor IDEとの統合も行われる。

WorldTime MCP Server

WorldTime MCP Server

OSS TimezoneDB API をベースにしたタイムゾーン MCP サーバー

Advanced PocketBase MCP Server

Advanced PocketBase MCP Server

鏡 (Kagami)

🌐 Starknet MCP Server

🌐 Starknet MCP Server

スタークネットMCPサーバー

Typescript Mcp Server Usage

Typescript Mcp Server Usage

Okay, I will provide you with a basic example of how to create an MCP (Minecraft Protocol) server using TypeScript. Keep in mind that building a full-fledged Minecraft server from scratch is a complex undertaking. This example will focus on the core networking aspects and a simplified handshake. You'll need to install some dependencies first. **Prerequisites:** * **Node.js:** Make sure you have Node.js installed (version 16 or higher is recommended). * **npm or yarn:** Node Package Manager (npm) or Yarn for managing dependencies. **1. Project Setup:** Create a new directory for your project and initialize a TypeScript project: ```bash mkdir mcp-server cd mcp-server npm init -y # or yarn init -y tsc --init # Create tsconfig.json ``` **2. Install Dependencies:** You'll need a library for handling TCP sockets and potentially for data serialization/deserialization (although this example will keep it simple). The `net` module is built-in to Node.js, so we don't need to install it. For more complex packet handling, you might consider libraries like `prismarine-packet` (from the PrismarineJS project), but for this basic example, we'll avoid external dependencies to keep it simple. **3. TypeScript Code (index.ts):** ```typescript import * as net from 'net'; const serverPort = 25565; // Default Minecraft port const serverDescription = "My TypeScript MCP Server"; const maxPlayers = 20; const protocolVersion = 763; // Example: Minecraft 1.17.1 protocol version // Function to handle the handshake function handleHandshake(socket: net.Socket, data: Buffer) { // In a real server, you'd parse the data buffer according to the Minecraft protocol. // This is a very simplified example. // Assuming the client sends the protocol version, server address, and port. // In a real implementation, you'd use a packet library to decode this properly. console.log("Handshake received:", data.toString()); // Send a status response (JSON) const status = { version: { name: "1.17.1", // Example version protocol: protocolVersion }, players: { max: maxPlayers, online: 0, // In a real server, track online players sample: [] // Player list (optional) }, description: { text: serverDescription } }; const statusJson = JSON.stringify(status); const statusBuffer = Buffer.from('\x00' + statusJson.length.toString(16) + statusJson, 'utf-8'); // Add length prefix socket.write(statusBuffer); } // Function to handle ping function handlePing(socket: net.Socket, data: Buffer) { // Respond to the ping request with the same payload socket.write(data); } // Create the server const server = net.createServer((socket) => { console.log('Client connected:', socket.remoteAddress, socket.remotePort); socket.on('data', (data) => { // Very basic packet handling. A real server needs much more robust parsing. const packetId = data[0]; switch (packetId) { case 0x00: // Handshake handleHandshake(socket, data); break; case 0x01: // Ping handlePing(socket, data); break; default: console.log("Unknown packet ID:", packetId); socket.end(); } }); socket.on('end', () => { console.log('Client disconnected:', socket.remoteAddress, socket.remotePort); }); socket.on('error', (err) => { console.error('Socket error:', err); }); }); // Start the server server.listen(serverPort, () => { console.log(`Server listening on port ${serverPort}`); }); ``` **4. tsconfig.json (Example):** Make sure your `tsconfig.json` is configured correctly. Here's a basic example: ```json { "compilerOptions": { "target": "es2017", "module": "commonjs", "outDir": "./dist", "strict": true, "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true }, "include": ["src/**/*"], "exclude": ["node_modules"] } ``` **5. Build and Run:** 1. **Compile:** Run `tsc` in your project directory to compile the TypeScript code to JavaScript. This will create a `dist` directory (or whatever you specified in `outDir` in `tsconfig.json`) containing the compiled JavaScript files. 2. **Run:** Run the server using `node dist/index.js` (or the appropriate path to your compiled JavaScript file). **Explanation:** * **`net.createServer()`:** Creates a TCP server that listens for incoming connections. * **`socket.on('data', ...)`:** This is the core of the server. It listens for data sent by the client. * **Packet Handling (Simplified):** The code reads the first byte of the data (`packetId`) to determine the type of packet. This is a very basic approach. A real Minecraft server uses a much more complex packet structure. * **Handshake:** The `handleHandshake` function is called when a handshake packet is received. It constructs a JSON response containing server information (version, player count, description) and sends it back to the client. The response is prefixed with a length indicator. * **Ping:** The `handlePing` function simply echoes the ping data back to the client. * **Error Handling:** The code includes basic error handling for socket errors. **Important Considerations and Next Steps:** * **Minecraft Protocol:** This is a *very* simplified example. The Minecraft protocol is complex and involves variable-length integers, different data types, compression, encryption, and more. You'll need to study the protocol documentation (available online) and use a library like `prismarine-packet` to handle packet encoding and decoding correctly. * **Packet Structure:** The example assumes a very simple packet structure. Real Minecraft packets have a specific format that you need to adhere to. * **State Management:** A real server needs to track the state of each client (e.g., their login status, position in the world, etc.). * **World Generation:** This example doesn't handle world generation or game logic. That's a whole separate area of complexity. * **Security:** A production server needs to be secured against attacks. * **Asynchronous Operations:** Use `async/await` for asynchronous operations to avoid blocking the event loop. * **Error Handling:** Implement robust error handling and logging. * **Configuration:** Use a configuration file to store server settings (port, MOTD, etc.). **Using `prismarine-packet` (Example - More Advanced):** To use `prismarine-packet`, install it: ```bash npm install prismarine-packet ``` Then, you would modify your code to use it for encoding and decoding packets. Here's a very basic example of how you might start using it (this is not a complete solution): ```typescript import * as net from 'net'; import { createSerializer, createDeserializer, State } from 'prismarine-packet'; const serverPort = 25565; const serverDescription = "My TypeScript MCP Server"; const maxPlayers = 20; const protocolVersion = 763; // Example: Minecraft 1.17.1 protocol version // Create packet serializer and deserializer const mcVersion = '1.17.1'; // Specify the Minecraft version const serializer = createSerializer({ version: mcVersion, state: State.HANDSHAKING }); const deserializer = createDeserializer({ version: mcVersion, state: State.HANDSHAKING }); function handleHandshake(socket: net.Socket, data: Buffer) { deserializer.write(data); const packet = deserializer.read(); if (packet && packet.name === 'handshake') { console.log("Handshake received:", packet.data); // Switch to status state deserializer.state = State.STATUS; serializer.state = State.STATUS; const status = { version: { name: "1.17.1", protocol: protocolVersion }, players: { max: maxPlayers, online: 0, sample: [] }, description: { text: serverDescription } }; const statusJson = JSON.stringify(status); // Create a status response packet const statusPacket = { name: 'response', params: { json_response: statusJson } }; serializer.write(statusPacket); const buffer = serializer.read(); socket.write(buffer); } else { console.log("Invalid handshake packet"); socket.end(); } } function handlePing(socket: net.Socket, data: Buffer) { deserializer.write(data); const packet = deserializer.read(); if (packet && packet.name === 'ping') { serializer.write(packet); const buffer = serializer.read(); socket.write(buffer); } else { console.log("Invalid ping packet"); socket.end(); } } const server = net.createServer((socket) => { console.log('Client connected:', socket.remoteAddress, socket.remotePort); socket.on('data', (data) => { deserializer.write(data); const packet = deserializer.read(); if (!packet) { console.log("Incomplete packet received."); return; } switch (deserializer.state) { case State.HANDSHAKING: handleHandshake(socket, data); break; case State.STATUS: if (packet.name === 'ping') { handlePing(socket, data); } break; default: console.log("Unknown state:", deserializer.state); socket.end(); } }); socket.on('end', () => { console.log('Client disconnected:', socket.remoteAddress, socket.remotePort); }); socket.on('error', (err) => { console.error('Socket error:', err); }); }); server.listen(serverPort, () => { console.log(`Server listening on port ${serverPort}`); }); ``` **Key improvements with `prismarine-packet`:** * **Protocol Handling:** `prismarine-packet` handles the complexities of the Minecraft protocol, including variable-length integers, data types, and packet structures. * **State Management:** The example now uses `deserializer.state` to track the current state of the connection (handshaking, status, login, play). * **Packet Parsing:** The `deserializer.read()` method parses the incoming data into a structured packet object. * **Packet Creation:** The `serializer.write()` method creates a buffer from a packet object that can be sent to the client. **Important Notes about `prismarine-packet`:** * **Version Compatibility:** Make sure you specify the correct Minecraft version when creating the serializer and deserializer. The protocol changes between versions. * **Packet Names:** Use the correct packet names as defined by `prismarine-packet` for the specified Minecraft version. * **Error Handling:** Add more robust error handling to catch parsing errors. * **State Transitions:** You'll need to handle state transitions correctly as the client progresses through the handshake, login, and play phases. This is still a basic example, but it provides a foundation for building a more complete Minecraft server using TypeScript and `prismarine-packet`. You'll need to continue to study the Minecraft protocol and the `prismarine-packet` documentation to implement all the necessary features. Good luck!

MCP Stock Market

MCP Stock Market

Alpha Vantage API を使用して、任意の株式銘柄の毎日の株式市場データを取得するモデルコンテキストプロトコルツール。

Remix Icon MCP

Remix Icon MCP

MCP Servers - OpenAI and Flux Integration

MCP Servers - OpenAI and Flux Integration

鏡 (Kagami)

Runbook MCP server

Runbook MCP server

anitabi-mcp-server

anitabi-mcp-server

アニ旅 巡礼マップの MCP サーバー

MCP Google Map Server

MCP Google Map Server

Google Maps APIとの統合を提供するモデルコンテキストプロトコルサーバー。ユーザーは、LLM処理機能を通じて、場所の検索、場所の詳細の取得、住所のジオコーディング、距離の計算、ルートの取得、および標高データの取得を行うことができます。

FindRepo MCP Server

FindRepo MCP Server

MongoDB MCP Server

MongoDB MCP Server

鏡 (Kagami)

Garmin MCP Server

Garmin MCP Server

Garmin Connectに接続し、あなたのフィットネスと健康データ(アクティビティ、睡眠、心拍数、歩数、体組成)をClaudeやその他のMCP互換クライアントに公開します。

mcp-remote-server

mcp-remote-server

鏡 (Kagami)

DemiCode

DemiCode

素晴らしい MCP サーバー集 - Model Context Protocol (MCP) サーバーのコレクションの概要

National Parks MCP Server

National Parks MCP Server

NPS APIを通じて、アメリカの国立公園に関するリアルタイムな情報を提供します。ユーザーは公園の検索、詳細情報の確認、アラート、ビジターセンター、キャンプ場、今後のイベントなどを調べることができます。

GitHub MCP Server

GitHub MCP Server

MCP server for CData Connect Cloud サンプル

MCP server for CData Connect Cloud サンプル

CData Connect Cloud の MCP サーバー

Raindrop.io MCP Server (Go)

Raindrop.io MCP Server (Go)

Pokemon MCP Demo

Pokemon MCP Demo

MCPサーバー、クライアント、およびホストを紹介するための簡単なポケモンデモ

MCP Windows Desktop Automation

MCP Windows Desktop Automation

AutoItの機能をラップしたモデルコンテキストプロトコルサーバー。LLMがマウス/キーボード操作、ウィンドウ管理、UIコントロールのインタラクションなど、Windowsデスクトップタスクを自動化できるようにする。

D&D Knowledge Navigator

D&D Knowledge Navigator

D&D 5e API の MCP サーバー実装。リソース、ツール、プロンプトを使用。

MCP Cortex

MCP Cortex

高度なドキュメントおよびナレッジグラフ処理のためのMCPサーバー実装

puppeteer-mcp-server

puppeteer-mcp-server

prometheus-mcp-server

prometheus-mcp-server