axum-http-mcp-server

axum-http-mcp-serverは、Rustプログラミング言語を使用して構築されたHTTPサーバーで、マイクロサービスアーキテクチャに適した設計が特徴です。高いパフォーマンスと非同期処理能力を持ち、RESTful APIの構築に最適です。開発者は簡単にエンドポイントを定義し、リクエストを処理できます。

GitHubスター

1

ユーザー評価

未評価

お気に入り

0

閲覧数

27

フォーク

0

イシュー

0

README
Axum-HTTP-MCP-Server
Build
git clone https://github.com/apepkuss/axum-http-mcp-server.git

cd axum-http-mcp-server

cargo build --release
Run
  • Install WasmEdge Runtime
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- -v 0.14.1
  • Start the server

    wasmedge --dir .:. ./target/wasm32-wasip1/release/axum-mcp-server.wasm
    
  • Test the server

    • Call "counter" tool to increment the counter

      curl -X POST http://localhost:10086/api/counter \
        --header "Content-Type: application/json" \
        --data '{
            "jsonrpc": "2.0",
            "id": 5,
            "method": "tools/call",
            "params": {
                "name": "counter",
                "arguments": {
                    "operation": "increment"
                }
            }
        }'
      

      Response:

      {
          "id": 5,
          "jsonrpc": "2.0",
          "result": {
              "value": 1
          }
      }
      
    • Call "counter" tool to decrement the counter

      curl -X POST http://127.0.0.1:10086/api/counter \
        --header "Content-Type: application/json" \
        --data '{
          "jsonrpc": "2.0",
          "id": 5,
          "method": "tools/call",
          "params": {
              "name": "counter",
              "arguments": {
                  "operation": "decrement"
              }
          }
      }'
      

      Response:

      {
        "id": 5,
        "jsonrpc": "2.0",
        "result": {
            "value": 0
        }
      }
      
    • Call "counter" tool to get the counter value

      curl -X POST http://127.0.0.1:10086/api/counter \
        --header "Content-Type: application/json" \
        --data '{
            "jsonrpc": "2.0",
            "id": 5,
            "method": "tools/call",
            "params": {
                "name": "counter",
                "arguments": {
                    "operation": "get_value",
                }
            }
        }'
      

      Response:

      {
          "id": 5,
          "jsonrpc": "2.0",
          "result": {
              "value": 0
          }
      }