Usage
Options
Generated Files
Generated Code
src/my-app.app.ts
src/main.ts
Nx Targets
The generatedproject.json includes these targets:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Generate a FrontMCP application in apps/
nx g @frontmcp/nx:app my-app
| 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 |
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
import { App } from '@frontmcp/sdk';
import HelloTool from './tools/hello.tool';
@App({
id: 'my-app',
name: 'MyApp',
tools: [HelloTool],
})
export class MyAppApp {}
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 {}
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 |
# Create app with tags
nx g @frontmcp/nx:app analytics --tags "scope:analytics,type:app"
# Start development
nx dev analytics