asyncmcp
asyncmcpは、非同期処理を利用したPythonライブラリで、効率的なワークフローの自動化をサポートします。特に、複数のタスクを同時に実行する必要がある場合に役立ち、開発者が時間を節約し、パフォーマンスを向上させることができます。
GitHubスター
106
ユーザー評価
未評価
お気に入り
0
閲覧数
13
フォーク
2
イシュー
2
asyncmcp - Async transport layers for MCP
📚 Documentation
View Full Documentation - Comprehensive guides, API reference, and examples
- Quickstart Guide - Get running in 5 minutes
- Installation - Setup instructions
- Examples - Working code examples
- API Reference - Detailed API documentation
Overview
A regular MCP Server but working over queues :
https://github.com/user-attachments/assets/4b775ff8-02ae-4730-a822-3e1cedf9d744
Another MCP Server that sends async responses via Webhooks :
https://github.com/user-attachments/assets/22f15a96-13bf-4038-8e80-938d9ee490c9
Quoting from the official description :
MCP is an open protocol that standardizes how applications provide context to LLMs.
But a lot of this context is not always readily available and takes time for the applications to process - think batch processing APIs, webhooks or queues. In these cases with the current transport layers, the MCP server would have to expose a light-weight polling wrapper in the MCP layer to allow waiting and polling for the tasks to be done. Although SSE does provide async functionalities but it comes with caveats.
asyncmcp explores supporting more of the async transport layer implementations for MCP clients and servers, beyond the officially supported stdio and Streamable Http transports.
The whole idea of an MCP server with async transport layer is that it doesn't have to respond immediately to any requests. It can choose to direct them to internal queues for processing and the client doesn't have to stick around for the response.
Available Transports
- SQS Transport - AWS Simple Queue Service for reliable queue-based messaging
- SNS+SQS Transport - Pub/sub messaging with topic-based routing and fanout
- Webhook Transport - HTTP-based async messaging for web applications
- StreamableHTTP + Webhook - Hybrid transport with SSE for sync and webhooks for async operations
- Proxy Server - Bridge standard MCP clients to async transports
Installation
# Using uv (recommended)
uv add asyncmcp
# Using pip
pip install asyncmcp
For detailed setup instructions and requirements, see the Installation Guide.
Quick Start
Check out the Quickstart Guide to get running in 5 minutes.
Examples
Complete working examples are available in the /examples
directory and documented in the Examples Guide.
Contributing
We welcome contributions! Please see our Contributing Guide for details.
git clone https://github.com/bh-rat/asyncmcp.git
cd asyncmcp
uv sync
License
Apache License 2.0 - see LICENSE file for details.
Links
- Documentation: asyncmcp.mintlify.app
- GitHub: github.com/bh-rat/asyncmcp
- MCP Specification: spec.modelcontextprotocol.io