Agent Team Chat Enhanced (MCP Server)
Production-ready MCP server scaffolding for multi-agent team chat with signed webhooks, token-bucket rate limiting, presence, floor control, project digests, and a DocStation subsystem backed by SQLite FTS5.
Features
- Natural team chat (agents + humans); images by path or base64.
- Signed webhooks (HMAC-SHA256) with async httpx delivery and retries for 5xx
- Token-bucket per-agent-per-project rate limits with polite retry_after
- Presence/status and optional floor control
- Project digests from recent messages
- DocStation: register text/URL, chunk (≈700–900 tokens by words), FTS5 search, chunk retrieval, version listing
- Universal MCP-friendly tools: stateless calls, pagination args, JSON error shapes
Requirements
- Python 3.11+ required (FTS5 support and modern async features)
Install
-
Development install (recommended for testing):
pip install -e .
-
Production install:
pip install -r requirements.txt pip install .
-
Environment (optional):
cp .env.example .env # Edit ATC_DB_PATH, ATC_IMAGE_DIR, etc.
Smoke Test
Verify installation with these 3 quick steps:
# 1. Install editable
pip install -e .
# 2. Test console script
agent-team-chat --help # Should show MCP server startup
# 3. Test core functionality
python examples/demo_multi_agent.py
MCP Client Config Add this snippet to your client configuration:
{
"mcpServers": {
"agent-team-chat": {
"command": "agent-team-chat",
"args": []
}
}
}
CLI
agent-team-chat- Starts the MCP server with all 16 tools available- FTS5 availability is checked on startup (fails fast if missing)
- Use
ATC_*environment variables for configuration
Security Notes
- Filenames are sanitized, images restricted to PNG/JPEG/GIF/WEBP with an 8MB cap
- Webhooks are HMAC-SHA256 signed:
X-ATC-Timestamp,X-ATC-Signatureover"{timestamp}." + body - SQLite FTS5 (porter stemming) is required and checked on startup
- Rate limiting is per-agent-per-project (prevents cross-project interference)
DocStation: Agent Etiquette (also seeded as guidance)
- Call get_recent_messages() and search_docs() before acting.
- Only add new signal; avoid acknowledgements.
- Respect {retry_after} and floor control.
- Use upload_image(_base64) for visuals; keep messages concise.
Quick Demo
-
Create a project
- Use tool
create_projectwithname="demo".
- Use tool
-
Post messages and rate limit
- Call
send_message6 times rapidly (default cap 5/60s). - Expect
{ success:false, error:{ code:"RATE_LIMITED", retry_after: <seconds> } }on the 6th call.
- Call
-
Register a webhook and verify signature
- Call
register_webhookwithurlandsecretand events["message.created"]. - Post a message; your receiver should get
X-ATC-Event,X-ATC-Timestamp,X-ATC-Signature.
- Call
-
Docs: register text and search
register_doctitle+text; thensearch_docsfor terms; useget_doc_chunk.
-
Image upload
upload_imagewith a file path orupload_image_base64.
-
Presence + Floor Control
set_agent_status/get_agent_status.take_floor/release_floorfor optional coordination.
Running Tests
pip install -e . # Install in development mode
python -m unittest discover -s tests -v
All tests should pass with the new async httpx implementation!
Release files for agent-team-chat-enhanced 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agent_team_chat_enhanced-0.1.0.tar.gz | 56.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agent_team_chat_enhanced-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 93.9 kB
Release files / agent_team_chat_enhanced-0.1.0.tar.gz
| Download URL | agent_team_chat_enhanced-0.1.0.tar.gz |
|---|---|
| Size | 56.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5340b11d8d2373c3be01176bc43fd04ddf1e122ea4a6aa5440e708c927870b0
|
|
BLAKE2b-256 checksum How to use checksums |
87d80ce20162b62c436a0eae8ce282a68593be2b31165b3d641a045b3292b0b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / agent_team_chat_enhanced-0.1.0-py3-none-any.whl
| Download URL | agent_team_chat_enhanced-0.1.0-py3-none-any.whl |
|---|---|
| Size | 37.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a42188b152fae0ca34e60e6db6a4a92a1d7984482a08823e060c1d1e974f42b
|
|
BLAKE2b-256 checksum How to use checksums |
d54deeb3950477dcd2884d92fdf662981c013743f92631a66d6a11baa9ec8e36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|