Skip to main content
Glama

MCP Async Server

MCP 非同期サーバー

🚀 堅牢なステータス追跡とエラー処理を備えた非同期タスク処理を示す高性能なモデルコンテキストプロトコル (MCP) サーバー実装。


✨ 特徴

  • 🔄非同期タスク処理- 長時間実行される操作を効率的に処理します
  • 📊リアルタイムステータストラッキング- ポーリングサポートでタスクの進行状況を監視
  • 🧹自動リソース管理- スマートなタスクのクリーンアップとメモリ管理
  • ⏱️タイムアウト処理- タスクのタイムアウトを設定可能
  • 🛡️堅牢なエラー処理- カスタムエラータイプと包括的なエラーレポート
  • 📝 TypeScript サポート- 完全な型安全性と最新の JavaScript 機能
  • 🔍組み込みのインスペクター- MCP サーバーを簡単にデバッグおよびテストできます

🚀 クイックスタート

前提条件

  • Node.js 20.x 以上
  • npm 9.x以上

Smithery経由でインストール

Smithery経由で Claude Desktop 用の Async MCP Server を自動的にインストールするには:

npx -y @smithery/cli install @ViezeVingertjes/example-async-mcp --client claude

インストール

# Clone the repository git clone https://github.com/ViezeVingertjes/example-async-mcp.git # Navigate to the project directory cd example-async-mcp # Install dependencies npm install # Build the project npm run build

サーバーの実行

npm start

インスペクタの使用

npm run inspector

📖 APIリファレンス

利用可能なツール

process_task

新しい非同期タスクを作成します。

{ "name": "process_task", "arguments": { "input": "Hello, World!", "delayMs": 5000, "timeoutMs": 30000 } }
パラメータタイプ必須デフォルト説明
入力-処理する入力文字列
遅延Ms番号5000処理遅延(ミリ秒)
タイムアウトMs番号30000タスクのタイムアウト(ミリ秒)
check_task_status

既存のタスクのステータスを確認します。

{ "name": "check_task_status", "arguments": { "taskId": "550e8400-e29b-41d4-a716-446655440000" } }
パラメータタイプ必須説明
タスクIDチェックするタスクのID

タスクの状態

状態説明
🕒 pendingタスクは作成されましたが、開始されていません
processingタスクを処理中です
completeタスクは正常に完了しました
errorタスクが失敗しました

⚙️ 構成

src/constants.tsの主な設定オプション:

export const DEFAULT_TASK_TIMEOUT_MS = 30000; // 30 seconds export const DEFAULT_TASK_DELAY_MS = 5000; // 5 seconds export const DEFAULT_POLL_DELAY_MS = 10000; // 10 seconds export const POLL_INTERVAL_MS = 100; // 100ms export const MAX_TASKS = 1000; // Maximum concurrent tasks

🛠️ 開発

プロジェクト構造

src/ ├── index.ts # Main server implementation ├── types.ts # TypeScript types and interfaces ├── constants.ts # Configuration constants └── utils.ts # Utility functions

開発コマンド

# Build the project npm run build # Watch for changes npm run watch # Run tests npm test # Run inspector npm run inspector

📝 ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。


-
security - not tested
A
license - permissive license
-
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) を実装します。

  1. ✨ 特徴
    1. 🚀 クイックスタート
      1. 前提条件
      2. Smithery経由でインストール
      3. インストール
      4. サーバーの実行
      5. インスペクタの使用
    2. 📖 APIリファレンス
      1. 利用可能なツール
      2. タスクの状態
    3. ⚙️ 構成
      1. 🛠️ 開発
        1. プロジェクト構造
        2. 開発コマンド
      2. 📝 ライセンス

        Related MCP Servers

        • -
          security
          A
          license
          -
          quality
          MCP Server simplifies the implementation of the Model Context Protocol by providing a user-friendly API to create custom tools and manage server workflows efficiently.
          Last updated -
          4
          3
          TypeScript
          MIT License
        • -
          security
          A
          license
          -
          quality
          MCP Server provides a simpler API to interact with the Model Context Protocol by allowing users to define custom tools and services to streamline workflows and processes.
          Last updated -
          13
          2
          TypeScript
          MIT License
        • A
          security
          A
          license
          A
          quality
          A Model Context Protocol (MCP) server that provides tools for managing todo items, including creation, updating, completion, deletion, searching, and summarizing tasks.
          Last updated -
          10
          4
          TypeScript
          MIT License
        • A
          security
          F
          license
          A
          quality
          A Model Context Protocol (MCP) server that provides a simple sleep/wait tool, useful for adding delays between operations such as waiting between API calls or testing eventually consistent systems.
          Last updated -
          1
          6
          7
          JavaScript

        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/ViezeVingertjes/example-async-mcp'

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