Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agentfront.dev/llms.txt

Use this file to discover all available pages before exploring further.

This walkthrough takes you from an empty directory to a running multi-app MCP server inside an Nx monorepo.
1

Create the workspace

npx frontmcp create my-platform --nx
cd my-platform
This scaffolds the full monorepo structure with a sample app.
2

Generate an app

nx g @frontmcp/nx:app crm
Creates apps/crm/ with a main entry point, app class, and sample tool.
3

Add a tool

nx g @frontmcp/nx:tool fetch-contacts --project crm
Creates apps/crm/src/tools/fetch-contacts.tool.ts — edit the execute() method to add your logic.
4

Generate a shared library

nx g @frontmcp/nx:lib shared-utils
Creates libs/shared-utils/ — use it for code shared across apps.
5

Generate a server

nx g @frontmcp/nx:server production --apps crm --deploymentTarget node
Creates servers/production/ with a Dockerfile, docker-compose.yml, and an entry point that composes the CRM app.
6

Start development

nx dev crm
Starts the CRM app in development mode with hot-reload.
7

Build for production

nx build production
Compiles the production server to servers/production/dist/.
8

Run tests

nx test crm
Runs E2E tests for the CRM app using @frontmcp/testing.
Your monorepo is ready! Add more apps, tools, and libraries as your platform grows.

Project Structure

After completing the steps above, your workspace looks like this:
my-platform/
├── apps/
│   └── crm/
│       ├── src/
│       │   ├── main.ts
│       │   ├── crm.app.ts
│       │   └── tools/
│       │       ├── hello.tool.ts
│       │       └── fetch-contacts.tool.ts
│       ├── project.json
│       └── tsconfig.json
├── libs/
│   └── shared-utils/
│       ├── src/
│       │   ├── shared-utils.ts
│       │   └── index.ts
│       └── project.json
├── servers/
│   └── production/
│       ├── src/main.ts
│       ├── Dockerfile
│       ├── docker-compose.yml
│       └── project.json
├── nx.json
├── tsconfig.base.json
└── package.json

Common Commands

CommandDescription
nx dev <app>Start an app with hot-reload
nx build <project>Build an app or server
nx test <project>Run tests
nx inspector <app>Launch MCP Inspector
nx graphVisualize dependency graph
nx affected -t testTest only affected projects
nx run-many -t buildBuild all projects

Next Steps

Generators

All 14 generators for scaffolding components

Monorepo Patterns

Architecture patterns for large monorepos