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

Usage

nx g @frontmcp/nx:app my-app

Options

OptionTypeDefaultDescription
namestringRequired. The name of the application
directorystringapps/<name>The directory of the application
tagsstringComma-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
├── tsconfig.json
├── tsconfig.lib.json
├── tsconfig.spec.json
└── jest.config.ts

Generated Code

src/my-app.app.ts
import { App } from '@frontmcp/sdk';
import HelloTool from './tools/hello.tool';

@App({
  id: 'my-app',
  name: 'MyApp',
  tools: [HelloTool],
})
export class MyAppApp {}
src/main.ts
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:
TargetExecutorDescription
build@frontmcp/nx:buildCompile to dist/
dev@frontmcp/nx:devDevelopment mode with watch
serve@frontmcp/nx:serveRun application server
test@frontmcp/nx:testRun Jest tests
inspector@frontmcp/nx:inspectorLaunch MCP Inspector

Example

# Create app with tags
nx g @frontmcp/nx:app analytics --tags "scope:analytics,type:app"

# Start development
nx dev analytics