> ## 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.

# App Generator

> Generate a FrontMCP application in apps/

Generates a FrontMCP application with an entry point, app class, sample tool, and full project configuration.

## Usage

```bash theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
nx g @frontmcp/nx:app my-app
```

## Options

| Option | Type | Default | Description |
| - | - | - | - |
| `name` | `string` | — | **Required.** The name of the application |
| `directory` | `string` | `apps/<name>` | The directory of the application |
| `tags` | `string` | — | Comma-separated tags for the project |

## Generated Files

```
apps/my-app/
├── src/
│   ├── main.ts               # Server entry point
│   ├── my-app.app.ts         # @App class
│   └── tools/
│       └── hello.tool.ts     # Sample @Tool
├── project.json               # Nx project config with targets
├── package.json               # Minimal manifest so `frontmcp build` runs in the project root
├── tsconfig.json
├── tsconfig.lib.json
├── tsconfig.spec.json
└── jest.config.cjs            # swc transform, @frontmcp/testing setup, tsconfig path aliases
```

## Generated Code

```ts src/my-app.app.ts theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
import { App } from '@frontmcp/sdk';
import HelloTool from './tools/hello.tool';

@App({
  id: 'my-app',
  name: 'MyApp',
  tools: [HelloTool],
})
export class MyAppApp {}
```

```ts src/main.ts theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
import 'reflect-metadata';
import { FrontMcp } from '@frontmcp/sdk';
import { MyAppApp } from './my-app.app';

@FrontMcp({
  info: { name: 'MyApp', version: '0.1.0' },
  apps: [MyAppApp],
})
export default class Server {}
```

## Nx Targets

The generated `project.json` includes these targets:

| Target | Executor | Description |
| - | - | - |
| `build` | `@frontmcp/nx:build` | Compile to dist/ |
| `dev` | `@frontmcp/nx:dev` | Development mode with watch |
| `serve` | `@frontmcp/nx:serve` | Run application server |
| `test` | `@frontmcp/nx:test` | Run Jest tests |
| `inspector` | `@frontmcp/nx:inspector` | Launch MCP Inspector |

## Example

```bash theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
# Create app with tags
nx g @frontmcp/nx:app analytics --tags "scope:analytics,type:app"

# Start development
nx dev analytics
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.