Organize several MCP servers in an Nx workspace
Maintained guide. How checks work.
Once two MCP servers share tools or services, changes can cross project boundaries. You need to know which servers depend on a library and which tests to run after editing it. @frontmcp/nx puts apps, shared libraries and deployment entry points in an Nx workspace so those relationships appear in the project graph.
A standalone project can still share modules, cache tasks and build multiple targets. Nx makes project relationships and affected tasks explicit; it is useful when those benefits justify the workspace tooling.
Three-layer architecture
libs/holds shared code.apps/groups tools, providers and capabilities.servers/supplies deployment entry points that compose apps.
Generators write files; generated tools still need registration in their app. The Nx reference records checked generator/executor behavior and migration caveats. Its current catalog contains 21 generators and seven executors; use nx list @frontmcp/nx to inspect your installed release.
Start a workspace
npx frontmcp@1.12.2 create platform --nx
cd platform
npx nx g @frontmcp/nx:app crm
npx nx g @frontmcp/nx:tool search --project crm
npx nx graphFollow the generator reference for required options and registration. To add Nx to an existing workspace, use nx add @frontmcp/nx@1.12.2 and review the generated configuration.
Multi-platform deployment
These informational alternatives are all present in the initial HTML and Markdown. Choose a target for its runtime constraints, not just its deployment command.
nx g @frontmcp/nx:server api --apps crm --deploymentTarget nodeUse the generated Dockerfile or a long-running Node process. Verify its health check and graceful shutdown.
Link to Node or Dockernx g @frontmcp/nx:server api --apps crm --deploymentTarget lambdaConfigure credentials, duration and shared state for actual invocation behavior.
Link to AWS Lambdanx g @frontmcp/nx:server workers --apps crm --deploymentTarget cloudflareCheck edge-runtime dependencies and bindings against the Cloudflare guide.
Link to Cloudflare Workersnx g @frontmcp/nx:server web --apps crm --deploymentTarget vercelInspect the generated Node function and use the Vercel endpoint checks.
Link to VercelAffected tasks and caching
Run the tests and builds affected by a change, with a defined base and head for CI. Cache benefit depends on task inputs, cache state, runner and workspace size. This article does not claim a fixed CI speedup.
Migration from standalone
Move shared code into a library, preserve import and client-visible contracts, then add one server shell at a time. Keep existing deployment checks until the new outputs pass. For one small server with few shared dependencies, staying standalone may require less maintenance.