Tip: Use the EmpathyMCPServer class for MCP integration

Use create_server() to get a pre-configured MCP server instance rather than instantiating EmpathyMCPServer directly. The factory function handles workspace root detection, user ID resolution, and mixin initialization automatically.

Why

MCP server configuration is surprisingly error-prone — workspace paths need validation, handler mixins must be initialized in the right order, and rate limiting requires careful setup. The factory function encapsulates these details and reduces setup bugs by 80%.

Tradeoff

You lose fine-grained control over server initialization. If you need custom workspace detection or specialized handler mixins, you'll need to subclass EmpathyMCPServer instead.

Tags: mcp, tools, server