Architecture¶
mattermost-mcp follows the standardized agent-connector-sdk dynamic-facade
architecture: a multi-inheritance REST client under one Api object, a thin FastMCP
Layers¶
mattermost_mcp.api_client.Api— the dynamic facade. It composes the per-domain Mattermost clients (channels, teams, posts, users, bots, files, and the full administrative surface) into a single object. All REST transport, credential handling, and request behavior live here.mattermost_mcp.auth.get_client()— builds anApifromMATTERMOST_URL/MATTERMOST_TOKENin the environment.mattermost_mcp.mcp_server— registers FastMCP tools (oneregister_*_toolsmodule per domain) tagged under theMMprefix. The tool layer adds no business logic; it delegates to theApifacade. Runtime toolset selection and visibility filtering keep the model's context window lean. which connects to the running MCP server overMCP_URLand can serve a web UI.
Request flow¶
Deployment topology¶
graph LR
Client([MCP Client]) -->|/mcp| MCP[mattermost-mcp]
UI([Web UI]) -->|HTTP| AgentSvc[mattermost-agent]
AgentSvc -->|MCP_URL| MCP
MCP -->|v4 REST| MM([Mattermost Server])
reverse proxy, and DNS, and Concepts for the CONCEPT:MM-* registry.