Skip to main content
Glama

Express MCP Server Echo

by jhgaylor

エクスプレスMCPサーバー

Express と TypeScript で構築されたステートレスな Model Context Protocol (MCP) サーバー。

特徴

  • 最新のストリーミング可能な HTTP トランスポートを使用したステートレス MCP サーバーの実装
  • 型安全性のためのTypeScript
  • HTTP処理用のExpress.js

要件

  • Node.js 18歳以上
  • npmまたはyarn

インストール

# Clone the repository (or download) git clone https://github.com/your-username/sample-express-mcp-server.git cd sample-express-mcp-server # Install dependencies npm install

発達

# Build the TypeScript code npm run build # Run in development mode with auto-reloading npm run dev # Run tests (when added) npm test

サーバー構造

src/ ├── index.ts # Main application entry point └── server.ts # MCP server definition with resource, tool, and prompt

利用可能な機能

このサーバーは、3 つの MCP コンポーネントを持つ単純なエコー エンドポイントを実装します。

  • リソース: echo://{message} - メッセージをリソースとして返します
  • ツール: echo - 提供されたメッセージをツールの応答として返します
  • プロンプト: echo - 指定されたメッセージでユーザープロンプトを作成します

MCPプロトコル

このサーバーは、LLMが外部データや機能とやり取りするための標準化された方法であるモデルコンテキストプロトコル(MCP)を実装しています。JSON-RPCリクエストに応答するステートレスAPIエンドポイントを公開します。

APIの使用

JSON-RPC ペイロードを含む POST リクエストを/mcpに送信します。

初期化
curl -X POST http://localhost:3001/mcp \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -H "Accept: text/event-stream" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2024-11-05", "capabilities": { "roots": { "listChanged": true }, "sampling": {} }, "clientInfo": { "name": "ExampleClient", "version": "1.0.0" } } }'
通話エコーツール
curl -X POST http://localhost:3001/mcp \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -H "Accept: text/event-stream" \ -d '{ "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "echo", "arguments": { "message": "Hello, World!" } }, "id": 1 }'

ライセンス

ISC

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

リソース、ツール、およびプロンプト コンポーネントを使用して単純なエコー機能を実装し、標準化された MCP インタラクションを通じて LLM がメッセージをエコーバックできるようにするステートレス モデル コンテキスト プロトコル サーバー。

  1. 特徴
    1. 要件
      1. インストール
        1. 発達
          1. サーバー構造
            1. 利用可能な機能
              1. MCPプロトコル
                1. APIの使用
              2. ライセンス

                Related MCP Servers

                • -
                  security
                  F
                  license
                  -
                  quality
                  A Model Context Protocol server that allows LLMs to execute shell commands and receive their output in a controlled manner.
                  Last updated -
                  Python
                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol server that gives LLMs the ability to interact with Ethereum networks, manage wallets, query blockchain data, and execute smart contract operations through a standardized interface.
                  Last updated -
                  31
                  323
                  2
                  TypeScript
                  MIT License
                • A
                  security
                  A
                  license
                  A
                  quality
                  An educational implementation of a Model Context Protocol server that demonstrates how to build a functional MCP server for integrating with various LLM clients like Claude Desktop.
                  Last updated -
                  1
                  88
                  Python
                  MIT License
                  • Apple
                  • Linux
                • A
                  security
                  A
                  license
                  A
                  quality
                  A simple server implementing the Model Context Protocol (MCP) that echoes messages back, designed for testing MCP clients.
                  Last updated -
                  1
                  Python
                  MIT License

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/jhgaylor/express-mcp-server-echo'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server