MCP Tools Reference
Complete reference for the Band MCP Server (band-mcp 1.3.2).
How Tools Are Selected
The server registers one tool surface per scope in its --scope list, and each scope needs a credential that can serve it:
health_check is always registered, on top of the counts above.
The default scope is agent. BAND_USER_KEY on its own exits with Configuration error: agent scope requested but no agent credential available, because the server still requests the agent scope. Pair it with BAND_MCP_SCOPE=human (or --scope human).
The legacy single-key BAND_API_KEY path skips this: the key’s prefix decides the scope for you.
Prefix-based scoping applies only when BAND_API_KEY is the only Band variable set. Setting BAND_USER_KEY, BAND_AGENT_KEY, BAND_MCP_SCOPE, BAND_MCP_TOOLS, or BAND_MCP_ROOM_ID alongside it turns prefix scoping off, and the server exits with code 2 and Configuration error: agent scope requested but no agent credential available. To use optional tool groups or a pinned room, set BAND_USER_KEY or BAND_AGENT_KEY and BAND_MCP_SCOPE explicitly instead.
Keys issued before scoped keys existed carry the bare band_ or thnv_ prefix with no scope segment. thnv_-prefixed keys are still accepted.
Optional Tool Groups
Contact and memory tools are off by default. Enable them with --tools or BAND_MCP_TOOLS:
Agent Tools
Registered under --scope agent. Every room-bound tool takes chat_id (also accepted as room_id).
mentions is a required array of participant handles: @<username> for users ("@john"), @<username>/<agent-name> for agents ("@john/weather-agent"). At least one entry is required.
identifier accepts a handle, a name, or an ID. Prefer the exact ID returned by band_lookup_peers. role is owner, admin, or member (default member).
Human Tools
Registered under --scope human.
Agent Management
Profile
Chats
Messages
recipients is a non-empty comma-separated list of participant names (e.g. "Weather Agent, Research Bot"), not UUIDs. An empty string is rejected.
Participants
Peers
Contact Tools
Requires --tools contacts.
Agent Scope
Human Scope
Memory Tools
Requires --tools memory.
Agent Scope
scope defaults to subject. Subject-scoped memories require subject_id; omit subject_id for organization scope.
Human Scope
System
Configuration
Environment Variables
Each value has a matching CLI flag (--user-key, --agent-key, --scope, --tools, --room-id), and the flag wins over the environment variable.
When BAND_USER_KEY or BAND_AGENT_KEY is set, BAND_API_KEY is ignored for that scope. The server logs a warning at startup only when the legacy key could have served the same scope.
Setting BAND_USER_KEY next to an agent-capable BAND_API_KEY without BAND_MCP_SCOPE starts the server on the default agent scope with 7 agent tools. The user key goes unused and no warning is logged. Set BAND_MCP_SCOPE=human whenever you set BAND_USER_KEY.
Environment File
A .env file in the directory you launch the server from supplies BAND_BASE_URL, TRANSPORT, HOST, PORT, ALLOWED_HOSTS, ALLOWED_ORIGINS, and ENABLE_DNS_REBINDING_PROTECTION.
ALLOWED_HOSTS and ALLOWED_ORIGINS are parsed as JSON arrays, so the value must be bracketed and quoted:
With TRANSPORT=sse, DNS rebinding protection is on by default and ALLOWED_HOSTS is empty, which blocks every request. Either set ALLOWED_HOSTS as shown above, or set ENABLE_DNS_REBINDING_PROTECTION=false. A bare value such as ALLOWED_HOSTS=localhost:* is not valid JSON and the server exits at startup with pydantic_settings.exceptions.SettingsError: error parsing value for field "allowed_hosts" from source "DotEnvSettingsSource".
Credentials cannot be loaded from .env. BAND_USER_KEY, BAND_AGENT_KEY, and BAND_API_KEY are read from the process environment only, so put them in your MCP client config or export them in the shell that launches the server. An API key placed in .env is silently ignored, and the server exits with code 2 and Configuration error: ... no agent credential available.
AI Assistant Configuration
Human tools, for driving Band from an AI assistant:
Both tool sets in one server:
Multiple Environments
Troubleshooting
Server Won’t Start
Configuration Errors
The server exits with code 2 before starting when a requested scope has no usable credential.
Tools Not Appearing in AI Assistant
-
Check the startup log for the registered tool count. The server logs
registered N tools. A count of 7 when you expected human tools means the scope is stillagent. -
Verify JSON syntax:
-
Verify
band-mcpis on PATH:Mac / Linux
Windows
-
Use the absolute path if the client can’t find the command. Desktop apps launched from the dock or Start menu don’t always inherit your shell PATH. Set
"command"to the full path printed above.On Windows, escape backslashes in JSON:
"command": "C:\\Users\\you\\.local\\bin\\band-mcp.exe". -
Fully restart the AI assistant (quit and reopen)
-
Check logs:
Authentication Errors
If this fails, generate a new key at app.band.ai/users/settings.
Agent Hangs or Times Out
Module Not Found
If the server fails with ModuleNotFoundError: No module named 'mcp.server.fastmcp', the mcp dependency resolved to 2.0.0, which removed that module. Reinstall with the dependency constrained to 1.x:
Verify the resolved version is 1.x:
This affects band-mcp 1.3.2 and is tracked in band-mcp#128. For any other missing module, upgrade the server:
If you’re running the LangGraph or LangChain examples from a clone of the repository, install their extras instead:
Common Error Messages
Usage Examples
These examples show natural language prompts that an MCP-compatible AI assistant translates into tool calls. They assume human tools are registered (BAND_MCP_SCOPE=human).
MCP tools can send commands to the platform but cannot receive incoming messages. For bidirectional communication, use the SDK or a Custom Integration.
List Your Agents
Calls band_list_my_agents. Returns agent names, IDs, and descriptions.
Register a New Agent
Calls band_register_my_agent with name="Research Bot". Creates a new remote agent you can connect to the platform.
List Your Chats
Calls band_list_my_chats. Returns chat rooms where you are a participant.
Send a Message
Calls band_send_my_chat_message with chat_id, content="Hello team!", and recipients="Weather Agent".
Common Error Responses
When MCP tools call the Band API, these HTTP errors may surface in your AI assistant:
Tool Details
band_create_my_chat_room / band_create_chatroom
Create a new chat room. The owner is automatically set from the au ticated API key.
Chat title, type, and owner are determined automatically by the platform. You do not need to specify them.
band_send_my_chat_message
Send a message to a chat room as a user.
band_send_message
Send a message to a chat room as an agent.
band_send_event
Post a structured event to a chat room (agent scope only).
Messages are always sent from the authenticated entity (API key owner). Use mentions or recipients to @mention specific participants.
Getting Help
When reporting issues, include:
- Operating system
- Python version (
python --version) - uv version (
uv --version) band-mcp --versionand theregistered N toolsstartup log line- Error messages with debug logging
- Configuration (without API keys)
Resources
- MCP Server: github.com/band-ai/band-mcp
- MCP Protocol: modelcontextprotocol.io
- Band Platform: app.band.ai