@frontmcp/nx 0.0.1 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -117
- package/generators/workflow/workflow.js.map +1 -1
- package/package.json +22 -1
package/README.md
CHANGED
|
@@ -1,135 +1,83 @@
|
|
|
1
|
-
|
|
1
|
+
# @frontmcp/nx
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<source width="400" media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/agentfront/frontmcp/refs/heads/main/docs/assets/logo/frontmcp.light.svg">
|
|
6
|
-
<img width="400" alt="FrontMCP Logo" src="https://raw.githubusercontent.com/agentfront/frontmcp/refs/heads/main/docs/assets/logo/frontmcp.light.svg">
|
|
7
|
-
</picture>
|
|
8
|
-
<hr>
|
|
3
|
+
[](https://www.npmjs.com/package/@frontmcp/nx)
|
|
4
|
+
[](https://github.com/agentfront/frontmcp/blob/main/LICENSE)
|
|
9
5
|
|
|
10
|
-
|
|
6
|
+
> Nx plugin for FrontMCP — generators and executors for building MCP servers.
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
[](https://nodejs.org)
|
|
14
|
-
[](https://github.com/agentfront/frontmcp/blob/main/LICENSE)
|
|
15
|
-
[](https://snyk.io/test/github/agentfront/frontmcp)
|
|
16
|
-
|
|
17
|
-
[Docs][docs-home] • [Quickstart][docs-quickstart] • [API Reference][docs-sdk-ref] • [Discord](https://discord.gg/frontmcp)
|
|
8
|
+
## Installation
|
|
18
9
|
|
|
19
|
-
|
|
10
|
+
```bash
|
|
11
|
+
npm install -D @frontmcp/nx
|
|
12
|
+
```
|
|
20
13
|
|
|
21
|
-
|
|
14
|
+
## Generators
|
|
15
|
+
|
|
16
|
+
| Generator | Command | Description |
|
|
17
|
+
| --------------- | --------------------------------- | -------------------------------------------------------------------------------- |
|
|
18
|
+
| `workspace` | `nx g @frontmcp/nx:workspace` | Scaffold a full FrontMCP Nx monorepo with apps/, libs/, and servers/ directories |
|
|
19
|
+
| `app` | `nx g @frontmcp/nx:app` | Generate a FrontMCP application in apps/ |
|
|
20
|
+
| `lib` | `nx g @frontmcp/nx:lib` | Generate a shared library in libs/ |
|
|
21
|
+
| `server` | `nx g @frontmcp/nx:server` | Generate a deployment shell in servers/ |
|
|
22
|
+
| `tool` | `nx g @frontmcp/nx:tool` | Generate a @Tool class |
|
|
23
|
+
| `resource` | `nx g @frontmcp/nx:resource` | Generate a @Resource or @ResourceTemplate class |
|
|
24
|
+
| `prompt` | `nx g @frontmcp/nx:prompt` | Generate a @Prompt class |
|
|
25
|
+
| `skill` | `nx g @frontmcp/nx:skill` | Generate a @Skill class |
|
|
26
|
+
| `agent` | `nx g @frontmcp/nx:agent` | Generate an @Agent class |
|
|
27
|
+
| `provider` | `nx g @frontmcp/nx:provider` | Generate a @Provider class for dependency injection |
|
|
28
|
+
| `plugin` | `nx g @frontmcp/nx:plugin` | Generate a @Plugin class extending DynamicPlugin |
|
|
29
|
+
| `adapter` | `nx g @frontmcp/nx:adapter` | Generate an @Adapter class extending DynamicAdapter |
|
|
30
|
+
| `auth-provider` | `nx g @frontmcp/nx:auth-provider` | Generate an @AuthProvider class |
|
|
31
|
+
| `flow` | `nx g @frontmcp/nx:flow` | Generate a @Flow class extending FlowBase |
|
|
32
|
+
| `job` | `nx g @frontmcp/nx:job` | Generate a @Job class |
|
|
33
|
+
| `workflow` | `nx g @frontmcp/nx:workflow` | Generate a @Workflow class |
|
|
34
|
+
|
|
35
|
+
## Executors
|
|
36
|
+
|
|
37
|
+
| Executor | Description |
|
|
38
|
+
| ------------ | ----------------------------------------------------------- |
|
|
39
|
+
| `build` | Compile a FrontMCP project using `frontmcp build` |
|
|
40
|
+
| `build-exec` | Build a distributable bundle using `frontmcp build --exec` |
|
|
41
|
+
| `dev` | Start a development server using `frontmcp dev` |
|
|
42
|
+
| `serve` | Start a supervised production server using `frontmcp start` |
|
|
43
|
+
| `test` | Run E2E tests using `frontmcp test` |
|
|
44
|
+
| `inspector` | Launch MCP Inspector using `frontmcp inspector` |
|
|
45
|
+
| `deploy` | Deploy to a target platform (node/vercel/lambda/cloudflare) |
|
|
46
|
+
|
|
47
|
+
## Quick Start
|
|
48
|
+
|
|
49
|
+
### Create a new application
|
|
22
50
|
|
|
23
|
-
|
|
24
|
-
|
|
51
|
+
```bash
|
|
52
|
+
nx g @frontmcp/nx:app my-server
|
|
53
|
+
```
|
|
25
54
|
|
|
26
|
-
|
|
27
|
-
import 'reflect-metadata';
|
|
28
|
-
import { FrontMcp, LogLevel } from '@frontmcp/sdk';
|
|
29
|
-
import HelloApp from './hello.app';
|
|
55
|
+
### Add a tool
|
|
30
56
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
apps: [HelloApp],
|
|
34
|
-
http: { port: 3000 },
|
|
35
|
-
logging: { level: LogLevel.Info },
|
|
36
|
-
})
|
|
37
|
-
export default class Server {}
|
|
57
|
+
```bash
|
|
58
|
+
nx g @frontmcp/nx:tool search --project=my-server
|
|
38
59
|
```
|
|
39
60
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
**Node.js 22+** required (24 recommended).
|
|
61
|
+
### Add a resource
|
|
43
62
|
|
|
44
63
|
```bash
|
|
45
|
-
|
|
46
|
-
|
|
64
|
+
nx g @frontmcp/nx:resource config --project=my-server
|
|
65
|
+
```
|
|
47
66
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
67
|
+
### Build and serve
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
nx build my-server
|
|
71
|
+
nx serve my-server
|
|
51
72
|
```
|
|
52
73
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
| **@FrontMcp Server** | Decorator-configured server with info, apps, HTTP, logging, session, auth | [Server][docs-server] |
|
|
60
|
-
| **@App** | Organizational units grouping tools, resources, prompts with optional isolation | [Apps][docs-apps] |
|
|
61
|
-
| **@Tool** | Typed actions with Zod schemas — class or function style | [Tools][docs-tools] |
|
|
62
|
-
| **@Resource** | Read-only data exposure with static and template URIs | [Resources][docs-resources] |
|
|
63
|
-
| **@Prompt** | Reusable message templates returning `GetPromptResult` | [Prompts][docs-prompts] |
|
|
64
|
-
| **@Agent** | Orchestrated multi-step tool chains | [Agents][docs-agents] |
|
|
65
|
-
| **Elicitation** | Request structured user input mid-flow | [Elicitation][docs-elicitation] |
|
|
66
|
-
| **Skills** | HTTP-discoverable tool manifests for agent marketplaces | [Skills][docs-skills] |
|
|
67
|
-
| **Discovery** | Automatic capability advertisement for MCP clients | [Discovery][docs-discovery] |
|
|
68
|
-
| **Authentication** | Remote OAuth, Local OAuth, JWKS, DCR, per-app auth | [Authentication][docs-auth] |
|
|
69
|
-
| **Sessions** | Stateful/stateless session modes with JWT or UUID transport IDs | [Server][docs-server] |
|
|
70
|
-
| **Direct Client** | In-process `create()`, `connect()`, `connectOpenAI()`, `connectClaude()` | [Direct Client][docs-direct] |
|
|
71
|
-
| **Transport** | Streamable HTTP + SSE with session headers | [Transport][docs-transport] |
|
|
72
|
-
| **Ext-Apps** | Mount external MCP servers as sub-apps | [Ext-Apps][docs-ext-apps] |
|
|
73
|
-
| **Hooks** | 5 hook families: tool, list-tools, HTTP, resource, prompt | [Hooks][docs-hooks] |
|
|
74
|
-
| **Providers / DI** | Scoped dependency injection with GLOBAL and CONTEXT scopes | [Providers][docs-providers] |
|
|
75
|
-
| **Plugins** | Cache, Remember, CodeCall, Dashboard — or build your own | [Plugins][docs-plugins] |
|
|
76
|
-
| **Adapters** | Generate tools from OpenAPI specs | [Adapters][docs-adapters] |
|
|
77
|
-
| **Testing** | E2E fixtures, matchers, HTTP mocking for MCP servers | [Testing][docs-testing] |
|
|
78
|
-
| **UI Library** | HTML/React widgets, SSR, MCP Bridge, web components | [UI][docs-ui] |
|
|
79
|
-
| **CLI** | `create`, `init`, `dev`, `build`, `inspector`, `doctor` | [CLI][docs-install] |
|
|
80
|
-
| **Deployment** | Local dev, production builds, version alignment | [Deployment][docs-deploy] |
|
|
81
|
-
|
|
82
|
-
## Packages
|
|
83
|
-
|
|
84
|
-
| Package | Description |
|
|
85
|
-
| ------------------------------------- | ------------------------------------------------------ |
|
|
86
|
-
| [`@frontmcp/sdk`](libs/sdk) | Core framework — decorators, DI, flows, transport |
|
|
87
|
-
| [`@frontmcp/cli`](libs/cli) | CLI tooling (`frontmcp create`, `dev`, `build`) |
|
|
88
|
-
| [`@frontmcp/auth`](libs/auth) | Authentication, OAuth, JWKS, credential vault |
|
|
89
|
-
| [`@frontmcp/adapters`](libs/adapters) | OpenAPI adapter for auto-generating tools |
|
|
90
|
-
| [`@frontmcp/plugins`](libs/plugins) | Official plugins: Cache, Remember, CodeCall, Dashboard |
|
|
91
|
-
| [`@frontmcp/testing`](libs/testing) | E2E test framework with fixtures and matchers |
|
|
92
|
-
| [`@frontmcp/ui`](libs/ui) | React components, hooks, SSR renderers |
|
|
93
|
-
| [`@frontmcp/uipack`](libs/uipack) | React-free themes, build tools, platform adapters |
|
|
94
|
-
| [`@frontmcp/di`](libs/di) | Dependency injection container (internal) |
|
|
95
|
-
| [`@frontmcp/utils`](libs/utils) | Shared utilities — naming, URI, crypto, FS (internal) |
|
|
96
|
-
|
|
97
|
-
## Version Alignment
|
|
98
|
-
|
|
99
|
-
Keep all `@frontmcp/*` packages on the same version. A clear **"version mismatch"** error is thrown at boot if versions drift. ([Production Build][docs-production])
|
|
100
|
-
|
|
101
|
-
## Contributing
|
|
102
|
-
|
|
103
|
-
PRs welcome! See [CONTRIBUTING.md](./CONTRIBUTING.md) for workflow, coding standards, and the PR checklist.
|
|
74
|
+
## Related Packages
|
|
75
|
+
|
|
76
|
+
- [`@frontmcp/sdk`](https://www.npmjs.com/package/@frontmcp/sdk) — Core FrontMCP SDK
|
|
77
|
+
- [`@frontmcp/cli`](https://www.npmjs.com/package/@frontmcp/cli) — FrontMCP CLI
|
|
78
|
+
- [`@frontmcp/adapters`](https://www.npmjs.com/package/@frontmcp/adapters) — Framework adapters
|
|
79
|
+
- [`@frontmcp/plugins`](https://www.npmjs.com/package/@frontmcp/plugins) — Plugin system
|
|
104
80
|
|
|
105
81
|
## License
|
|
106
82
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
<!-- docs links -->
|
|
110
|
-
|
|
111
|
-
[docs-home]: https://docs.agentfront.dev/frontmcp 'FrontMCP Docs'
|
|
112
|
-
[docs-install]: https://docs.agentfront.dev/frontmcp/getting-started/installation 'Installation'
|
|
113
|
-
[docs-quickstart]: https://docs.agentfront.dev/frontmcp/getting-started/quickstart 'Quickstart'
|
|
114
|
-
[docs-sdk-ref]: https://docs.agentfront.dev/frontmcp/sdk-reference/overview 'SDK Reference'
|
|
115
|
-
[docs-server]: https://docs.agentfront.dev/frontmcp/servers/server 'The FrontMCP Server'
|
|
116
|
-
[docs-apps]: https://docs.agentfront.dev/frontmcp/servers/apps 'Apps'
|
|
117
|
-
[docs-tools]: https://docs.agentfront.dev/frontmcp/servers/tools 'Tools'
|
|
118
|
-
[docs-resources]: https://docs.agentfront.dev/frontmcp/servers/resources 'Resources'
|
|
119
|
-
[docs-prompts]: https://docs.agentfront.dev/frontmcp/servers/prompts 'Prompts'
|
|
120
|
-
[docs-agents]: https://docs.agentfront.dev/frontmcp/servers/agents 'Agents'
|
|
121
|
-
[docs-elicitation]: https://docs.agentfront.dev/frontmcp/servers/elicitation 'Elicitation'
|
|
122
|
-
[docs-skills]: https://docs.agentfront.dev/frontmcp/servers/skills 'Skills'
|
|
123
|
-
[docs-discovery]: https://docs.agentfront.dev/frontmcp/servers/discovery 'Discovery'
|
|
124
|
-
[docs-auth]: https://docs.agentfront.dev/frontmcp/authentication/overview 'Authentication'
|
|
125
|
-
[docs-direct]: https://docs.agentfront.dev/frontmcp/deployment/direct-client 'Direct Client'
|
|
126
|
-
[docs-transport]: https://docs.agentfront.dev/frontmcp/deployment/transport 'Transport'
|
|
127
|
-
[docs-ext-apps]: https://docs.agentfront.dev/frontmcp/servers/ext-apps 'Ext-Apps'
|
|
128
|
-
[docs-hooks]: https://docs.agentfront.dev/frontmcp/extensibility/hooks 'Hooks'
|
|
129
|
-
[docs-providers]: https://docs.agentfront.dev/frontmcp/extensibility/providers 'Providers'
|
|
130
|
-
[docs-plugins]: https://docs.agentfront.dev/frontmcp/plugins/overview 'Plugins'
|
|
131
|
-
[docs-adapters]: https://docs.agentfront.dev/frontmcp/adapters/overview 'Adapters'
|
|
132
|
-
[docs-testing]: https://docs.agentfront.dev/frontmcp/testing/overview 'Testing'
|
|
133
|
-
[docs-ui]: https://docs.agentfront.dev/frontmcp/ui/overview 'UI Library'
|
|
134
|
-
[docs-deploy]: https://docs.agentfront.dev/frontmcp/deployment/local-dev-server 'Deployment'
|
|
135
|
-
[docs-production]: https://docs.agentfront.dev/frontmcp/deployment/production-build 'Production Build'
|
|
83
|
+
Apache-2.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../../../src/generators/workflow/workflow.ts"],"names":[],"mappings":";;AAKA,
|
|
1
|
+
{"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../../../src/generators/workflow/workflow.ts"],"names":[],"mappings":";;AAKA,8CAcC;AAnBD,uCAA2F;AAC3F,+BAA4B;AAE5B,2EAA6E;AAEtE,KAAK,UAAU,iBAAiB,CACrC,IAAU,EACV,MAA+B;IAE/B,MAAM,OAAO,GAAG,IAAA,gDAAyB,EAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;IAErE,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAA,WAAI,EAAC,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,EAAE;QAC/D,GAAG,OAAO;QACV,IAAI,EAAE,EAAE;KACT,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;AACH,CAAC;AAED,kBAAe,iBAAiB,CAAC","sourcesContent":["import { type Tree, formatFiles, generateFiles, type GeneratorCallback } from '@nx/devkit';\nimport { join } from 'path';\nimport type { WorkflowGeneratorSchema } from './schema.js';\nimport { normalizePrimitiveOptions } from '../../utils/normalize-options.js';\n\nexport async function workflowGenerator(\n tree: Tree,\n schema: WorkflowGeneratorSchema,\n): Promise<GeneratorCallback | void> {\n const options = normalizePrimitiveOptions(tree, schema, 'workflows');\n\n generateFiles(tree, join(__dirname, 'files'), options.directory, {\n ...options,\n tmpl: '',\n });\n\n if (!schema.skipFormat) {\n await formatFiles(tree);\n }\n}\n\nexport default workflowGenerator;\n"]}
|
package/package.json
CHANGED
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/nx",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "Nx plugin for FrontMCP — generators and executors for building MCP servers",
|
|
5
|
+
"author": "AgentFront <info@agentfront.dev>",
|
|
6
|
+
"homepage": "https://docs.agentfront.dev",
|
|
5
7
|
"license": "Apache-2.0",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"nx",
|
|
10
|
+
"nx-plugin",
|
|
11
|
+
"mcp",
|
|
12
|
+
"generators",
|
|
13
|
+
"executors",
|
|
14
|
+
"agentfront",
|
|
15
|
+
"frontmcp",
|
|
16
|
+
"framework",
|
|
17
|
+
"typescript"
|
|
18
|
+
],
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/agentfront/frontmcp.git",
|
|
22
|
+
"directory": "libs/nx-plugin"
|
|
23
|
+
},
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/agentfront/frontmcp/issues"
|
|
26
|
+
},
|
|
6
27
|
"type": "commonjs",
|
|
7
28
|
"main": "./index.js",
|
|
8
29
|
"types": "./index.d.ts",
|