Should I containerise the MCP server with the Magento stack or separately?

Separately, but on the same Docker network. Two reasons. (1) Blast-radius isolation. The MCP server might crash from an unexpected LLM input; you do not want that crash to take down PHP-FPM. Separate container = separate cgroup limits = blast radius contained. (2) Independent deploy cadence. The MCP server iterates weekly (new tools, new prompts, new guardrails); your Magento codebase iterates monthly. Decoupling lets you ship MCP changes without going through the full setup:upgrade + static-content:deploy cycle. Use Docker Compose’s networks: [magento_default] with external: true to attach the sidecar to your existing network so it can call http://kishansavaliya_php/graphql directly without exposing the GraphQL endpoint to the public internet.

Kishan Savaliya
Kishan Savaliya
Adobe Certified Magento Commerce Developer
Ahmedabad [IN]working hours, replies within four hours
When do you need it

Read personally. Never shared. Or email the brief.

More on build a magento 2 mcp server in python, faqs

Need it fixed, not just explained?

Send the brief with your store URL; the written quote comes back within 24 hours.