@agentailor/create-mcp-server 0.9.0 → 0.10.0

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 CHANGED
@@ -29,10 +29,10 @@ npx @agentailor/create-mcp-server --name=my-server
29
29
  |--------|-------|---------|-------------|
30
30
  | `--name` | `-n` | — | Project name (required in CLI mode) |
31
31
  | `--package-manager` | `-p` | `npm` | Package manager: npm, pnpm, yarn |
32
- | `--framework` | `-f` | `sdk` | Framework: sdk, fastmcp (deprecated) |
32
+ | `--framework` | `-f` | `sdk` | Accepted for compatibility; `sdk` is the only framework |
33
33
  | `--stdio` | — | `false` | Use stdio transport (for local clients) |
34
34
  | `--template` | `-t` | `stateless` | Accepted for compatibility; SDK v2 serves both modes through one per-request idiom |
35
- | `--oauth` | — | `false` | Enable OAuth (sdk HTTP only, incompatible with --stdio) |
35
+ | `--oauth` | — | `false` | Enable OAuth (HTTP only, incompatible with --stdio) |
36
36
  | `--no-git` | — | `false` | Skip git initialization |
37
37
  | `--no-skills` | — | `false` | Skip adding the tool-design skill |
38
38
  | `--help` | `-h` | — | Show help |
@@ -51,7 +51,6 @@ npx @agentailor/create-mcp-server --name=my-server --stdio
51
51
  npx @agentailor/create-mcp-server \
52
52
  --name=my-auth-server \
53
53
  --package-manager=pnpm \
54
- --framework=sdk \
55
54
  --oauth
56
55
 
57
56
  # Short flags
@@ -60,54 +59,22 @@ npx @agentailor/create-mcp-server -n my-server -p yarn --stdio
60
59
 
61
60
  ## Features
62
61
 
63
- - **MCP SDK v2** — SDK projects serve protocol revision `2026-07-28` and still accept 2025-era clients
64
- - **Official MCP SDK** — FastMCP is still available but deprecated
62
+ - **MCP SDK v2** — projects serve protocol revision `2026-07-28` and still accept 2025-era clients
65
63
  - **Two transport types** — HTTP (streamable) or stdio (for local clients)
66
64
  - **Stateless by design** — the SDK handler builds a fresh server per request, so HTTP servers scale without sticky sessions
67
- - **Optional OAuth** — OIDC-compliant authentication (SDK HTTP only) ([setup guide](docs/oauth-setup.md))
65
+ - **Optional OAuth** — OIDC-compliant authentication (HTTP only) ([setup guide](docs/oauth-setup.md))
68
66
  - **Package manager choice** — npm, pnpm, or yarn
69
67
  - **TypeScript ready** — ready to customize
70
68
  - **Docker ready** — production Dockerfile included (HTTP transport)
71
69
  - **MCP Inspector** — built-in debugging with `npm run inspect`
72
70
 
73
- ## Frameworks
71
+ ## Official MCP SDK
74
72
 
75
- | Framework | Description |
76
- |-----------|-------------|
77
- | **Official MCP SDK** (default) | SDK v2, full control with Express.js, supports OAuth |
78
- | **FastMCP** (deprecated) | Simpler API with less boilerplate (still on SDK v1) |
79
-
80
- ### Official MCP SDK
81
-
82
- SDK projects are generated against the [MCP TypeScript SDK v2](https://ts.sdk.modelcontextprotocol.io/v2/) — the split `@modelcontextprotocol/server`, `@modelcontextprotocol/express`, and `@modelcontextprotocol/node` packages, rather than the v1 `@modelcontextprotocol/sdk` monolith.
73
+ Projects are generated against the [MCP TypeScript SDK v2](https://ts.sdk.modelcontextprotocol.io/v2/) — the split `@modelcontextprotocol/server`, `@modelcontextprotocol/express`, and `@modelcontextprotocol/node` packages, rather than the v1 `@modelcontextprotocol/sdk` monolith.
83
74
 
84
75
  HTTP servers are built on `createMcpHandler`, which runs the server factory once per request. They serve protocol revision `2026-07-28` and also accept 2025-era clients. stdio servers use `serveStdio`, which negotiates the era per connection.
85
76
 
86
- ### FastMCP (deprecated)
87
-
88
- > **Deprecated:** FastMCP support will be removed in a future release. Generating a FastMCP project prints a warning. New projects should use the Official MCP SDK; if you need to keep scaffolding FastMCP projects after the removal, pin `npx @agentailor/create-mcp-server@0.9`.
89
-
90
- [FastMCP](https://github.com/punkpeye/fastmcp) is a TypeScript framework built on top of the official MCP SDK that provides a simpler, more intuitive API for building MCP servers.
91
-
92
- > **Note:** FastMCP has not migrated to SDK v2 — it still depends on `@modelcontextprotocol/sdk` v1 internally, so FastMCP projects speak the 2025-era protocol. Choose the Official MCP SDK if you need protocol revision `2026-07-28`.
93
-
94
- ```typescript
95
- import { FastMCP } from "fastmcp";
96
- import { z } from "zod";
97
-
98
- const server = new FastMCP({ name: "My Server", version: "1.0.0" });
99
-
100
- server.addTool({
101
- name: "add",
102
- description: "Add two numbers",
103
- parameters: z.object({ a: z.number(), b: z.number() }),
104
- execute: async ({ a, b }) => String(a + b),
105
- });
106
-
107
- server.start({ transportType: "httpStream", httpStream: { port: 3000 } });
108
- ```
109
-
110
- Learn more: [FastMCP Documentation](https://github.com/punkpeye/fastmcp)
77
+ > **FastMCP was removed in 0.10.0.** It never moved to SDK v2, so FastMCP projects stayed on the 2025-era protocol and shipped without tests. To scaffold one anyway, pin the last release that supports it: `npx @agentailor/create-mcp-server@0.9 --framework=fastmcp`.
111
78
 
112
79
  ## Transport Types
113
80
 
@@ -115,7 +82,7 @@ Learn more: [FastMCP Documentation](https://github.com/punkpeye/fastmcp)
115
82
  |---------|------------------------|-------|
116
83
  | Use case | Remote access, cloud deployment | Local clients (Claude Desktop) |
117
84
  | Protocol | HTTP | stdin/stdout |
118
- | OAuth support | ✓ (SDK only) | — |
85
+ | OAuth support | ✓ | — |
119
86
  | Docker deployment | ✓ | — |
120
87
  | Port configuration | ✓ | — |
121
88
 
@@ -152,9 +119,9 @@ my-mcp-server/
152
119
  └── README.md
153
120
  ```
154
121
 
155
- SDK projects come with a worked example — a small notes server — and a test suite
122
+ Projects come with a worked example — a small notes server — and a test suite
156
123
  that runs green immediately, so there is a working pattern to copy when you add
157
- your own tools. FastMCP projects ship the example only, without tests, for now.
124
+ your own tools.
158
125
 
159
126
  Projects also get Agentailor's [tool-design](https://github.com/agentailor/skills)
160
127
  skill at `.agents/skills/`, so a coding agent working in the project has the
@@ -169,7 +136,7 @@ to the protocol over stdio).
169
136
 
170
137
  **Scripts:**
171
138
  - `npm run dev` — build and start the server
172
- - `npm test` — run the test suite (SDK projects)
139
+ - `npm test` — run the test suite
173
140
  - `npm run inspect` — open MCP Inspector (update URL in `package.json` if needed)
174
141
 
175
142
  ## Learning Resources
@@ -178,7 +145,6 @@ to the protocol over stdio).
178
145
  |-------|-------------|
179
146
  | [Create Your First MCP Server in 5 Minutes](https://blog.agentailor.com/posts/create-your-first-mcp-server-in-5-minutes?utm_source=github&utm_medium=readme&utm_campaign=create-mcp-server) | Build your first production-ready MCP server. A complete beginner guide to scaffolding a Fetch MCP server with TypeScript. |
180
147
  | [Securing MCP Servers with Keycloak](https://blog.agentailor.com/posts/oauth-for-mcp-servers-practical-guide-keycloak?utm_source=github&utm_medium=readme&utm_campaign=create-mcp-server) | Learn how to secure your MCP servers with OAuth authentication using Keycloak. |
181
- | [Getting Started with FastMCP](https://blog.agentailor.com/posts/getting-started-with-fastmcp?utm_source=github&utm_medium=readme&utm_campaign=create-mcp-server) | Build MCP servers faster with FastMCP — the TypeScript framework inspired by Python's most popular MCP library. |
182
148
  | [OAuth for MCP Clients (Next.js + LangGraph.js)](https://blog.agentailor.com/posts/mcp-client-oauth-nextjs-langgraph?utm_source=github&utm_medium=readme&utm_campaign=create-mcp-server) | Implement OAuth authentication in your MCP client using Next.js and the MCP SDK. |
183
149
 
184
150
  ## Need help building MCP servers or agent infrastructure?
package/dist/cli.d.ts CHANGED
@@ -1,9 +1,8 @@
1
- import type { PackageManager, Framework, TransportType } from './templates/common/types.js';
1
+ import type { PackageManager, TransportType } from './templates/common/types.js';
2
2
  export type TemplateType = 'stateless' | 'stateful';
3
3
  export interface CLIOptions {
4
4
  name: string;
5
5
  packageManager: PackageManager;
6
- framework: Framework;
7
6
  transport: TransportType;
8
7
  template: TemplateType;
9
8
  oauth: boolean;
@@ -14,4 +13,5 @@ export interface ParseResult {
14
13
  mode: 'interactive' | 'cli';
15
14
  options?: CLIOptions;
16
15
  }
16
+ export declare const FASTMCP_REMOVED_MESSAGE: string;
17
17
  export declare function parseArguments(): ParseResult;
package/dist/cli.js CHANGED
@@ -1,6 +1,12 @@
1
1
  import { Command, Option, InvalidArgumentError } from 'commander';
2
2
  const NAME_REGEX = /^[a-z0-9-_]+$/i;
3
- const VERSION = '0.9.0';
3
+ const VERSION = '0.10.0';
4
+ export const FASTMCP_REMOVED_MESSAGE = [
5
+ 'FastMCP support was removed in 0.10.0. New projects use the Official MCP SDK;',
6
+ 'drop --framework, or pass --framework=sdk.',
7
+ 'To scaffold a FastMCP project, pin the last release that supports it:',
8
+ ' npx @agentailor/create-mcp-server@0.9 --framework=fastmcp',
9
+ ].join('\n');
4
10
  function validateName(value) {
5
11
  if (!NAME_REGEX.test(value)) {
6
12
  throw new InvalidArgumentError('Project name can only contain letters, numbers, hyphens, and underscores');
@@ -17,9 +23,10 @@ export function parseArguments() {
17
23
  .addOption(new Option('-p, --package-manager <manager>', 'Package manager')
18
24
  .choices(['npm', 'pnpm', 'yarn'])
19
25
  .default('npm'))
20
- .addOption(new Option('-f, --framework <framework>', 'Framework to use (fastmcp is deprecated)')
21
- .choices(['sdk', 'fastmcp'])
22
- .default('sdk'))
26
+ // Only one framework remains. The flag is still parsed so existing
27
+ // `--framework=sdk` invocations keep working, and so `fastmcp` gets a
28
+ // removal message instead of Commander's generic invalid-choice error.
29
+ .addOption(new Option('-f, --framework <framework>', 'Framework (sdk only; accepted for compatibility)').default('sdk'))
23
30
  .addOption(new Option('-t, --template <type>', 'Template type (no effect on SDK projects; both generate the same server)')
24
31
  .choices(['stateless', 'stateful'])
25
32
  .default('stateless'))
@@ -36,6 +43,15 @@ export function parseArguments() {
36
43
  if (!hasExplicitArgs) {
37
44
  return { mode: 'interactive' };
38
45
  }
46
+ // Checked before --name, so a FastMCP user sees why rather than a missing-name error.
47
+ if (opts.framework === 'fastmcp') {
48
+ console.error(`\nError: ${FASTMCP_REMOVED_MESSAGE}\n`);
49
+ process.exit(1);
50
+ }
51
+ if (opts.framework !== 'sdk') {
52
+ console.error(`\nError: unknown --framework "${opts.framework}". The only framework is sdk.\n`);
53
+ process.exit(1);
54
+ }
39
55
  // CLI mode - validate required args
40
56
  if (!opts.name) {
41
57
  console.error('\nError: --name is required when using CLI arguments\n');
@@ -52,17 +68,11 @@ export function parseArguments() {
52
68
  console.error('\nError: --template=stateful is not applicable with --stdio (stdio is inherently stateless)\n');
53
69
  process.exit(1);
54
70
  }
55
- // Validate OAuth constraint
56
- if (opts.oauth && opts.framework !== 'sdk') {
57
- console.error('\nError: --oauth is only valid with --framework=sdk\n');
58
- process.exit(1);
59
- }
60
71
  return {
61
72
  mode: 'cli',
62
73
  options: {
63
74
  name: opts.name,
64
75
  packageManager: opts.packageManager,
65
- framework: opts.framework,
66
76
  transport: (opts.stdio ? 'stdio' : 'http'),
67
77
  template: opts.template,
68
78
  oauth: opts.oauth,
package/dist/cli.test.js CHANGED
@@ -31,7 +31,6 @@ describe('CLI argument parsing', () => {
31
31
  const { parseArguments } = await import('./cli.js');
32
32
  const result = parseArguments();
33
33
  expect(result.options?.packageManager).toBe('npm');
34
- expect(result.options?.framework).toBe('sdk');
35
34
  expect(result.options?.transport).toBe('http');
36
35
  expect(result.options?.template).toBe('stateless');
37
36
  expect(result.options?.oauth).toBe(false);
@@ -43,7 +42,7 @@ describe('CLI argument parsing', () => {
43
42
  'create-mcp-server',
44
43
  '--name=test-project',
45
44
  '--package-manager=pnpm',
46
- '--framework=fastmcp',
45
+ '--framework=sdk',
47
46
  '--template=stateful',
48
47
  '--no-git',
49
48
  ];
@@ -52,7 +51,6 @@ describe('CLI argument parsing', () => {
52
51
  expect(result.options).toEqual({
53
52
  name: 'test-project',
54
53
  packageManager: 'pnpm',
55
- framework: 'fastmcp',
56
54
  transport: 'http',
57
55
  template: 'stateful',
58
56
  oauth: false,
@@ -77,7 +75,6 @@ describe('CLI argument parsing', () => {
77
75
  const result = parseArguments();
78
76
  expect(result.options?.name).toBe('my-project');
79
77
  expect(result.options?.packageManager).toBe('yarn');
80
- expect(result.options?.framework).toBe('sdk');
81
78
  expect(result.options?.template).toBe('stateful');
82
79
  });
83
80
  it('parses oauth flag correctly for sdk+stateful', async () => {
@@ -92,7 +89,6 @@ describe('CLI argument parsing', () => {
92
89
  const { parseArguments } = await import('./cli.js');
93
90
  const result = parseArguments();
94
91
  expect(result.options?.oauth).toBe(true);
95
- expect(result.options?.framework).toBe('sdk');
96
92
  expect(result.options?.template).toBe('stateful');
97
93
  });
98
94
  // SDK v2 collapsed the stateless/stateful distinction, and OAuth is
@@ -102,7 +98,6 @@ describe('CLI argument parsing', () => {
102
98
  const { parseArguments } = await import('./cli.js');
103
99
  const result = parseArguments();
104
100
  expect(result.options?.oauth).toBe(true);
105
- expect(result.options?.framework).toBe('sdk');
106
101
  expect(result.options?.template).toBe('stateless');
107
102
  });
108
103
  it('exits with error when --name is missing in CLI mode', async () => {
@@ -119,8 +114,10 @@ describe('CLI argument parsing', () => {
119
114
  expect(consoleError).toHaveBeenCalledWith(expect.stringContaining('--name is required when using CLI arguments'));
120
115
  consoleError.mockRestore();
121
116
  });
122
- it('exits with error when --oauth used without sdk framework', async () => {
123
- process.argv = ['node', 'create-mcp-server', '--name=test', '--oauth', '--framework=fastmcp'];
117
+ // FastMCP was removed in 0.10.0. The flag value must explain that and say how
118
+ // to get the old behaviour, not fall through to a generic error.
119
+ it('exits with a removal message for --framework=fastmcp', async () => {
120
+ process.argv = ['node', 'create-mcp-server', '--name=test', '--framework=fastmcp'];
124
121
  let exitCode;
125
122
  process.exit = vi.fn((code) => {
126
123
  exitCode = code;
@@ -130,7 +127,8 @@ describe('CLI argument parsing', () => {
130
127
  const { parseArguments } = await import('./cli.js');
131
128
  expect(() => parseArguments()).toThrow('process.exit called');
132
129
  expect(exitCode).toBe(1);
133
- expect(consoleError).toHaveBeenCalledWith(expect.stringContaining('--oauth is only valid with --framework=sdk'));
130
+ expect(consoleError).toHaveBeenCalledWith(expect.stringContaining('FastMCP support was removed in 0.10.0'));
131
+ expect(consoleError).toHaveBeenCalledWith(expect.stringContaining('@agentailor/create-mcp-server@0.9 --framework=fastmcp'));
134
132
  consoleError.mockRestore();
135
133
  });
136
134
  it('exits with error for invalid project name', async () => {
@@ -163,18 +161,32 @@ describe('CLI argument parsing', () => {
163
161
  expect(result.options?.transport).toBe('stdio');
164
162
  expect(result.options?.oauth).toBe(false);
165
163
  });
166
- it('--stdio with --framework=fastmcp is valid', async () => {
167
- process.argv = [
168
- 'node',
169
- 'create-mcp-server',
170
- '--name=my-server',
171
- '--stdio',
172
- '--framework=fastmcp',
173
- ];
164
+ // Checked before --name, so the user learns FastMCP is gone rather than
165
+ // fixing --name first and only then hitting the removal.
166
+ it('reports the FastMCP removal even when --name is missing', async () => {
167
+ process.argv = ['node', 'create-mcp-server', '-f', 'fastmcp'];
168
+ process.exit = vi.fn(() => {
169
+ throw new Error('process.exit called');
170
+ });
171
+ const consoleError = vi.spyOn(console, 'error').mockImplementation(() => { });
174
172
  const { parseArguments } = await import('./cli.js');
175
- const result = parseArguments();
176
- expect(result.options?.transport).toBe('stdio');
177
- expect(result.options?.framework).toBe('fastmcp');
173
+ expect(() => parseArguments()).toThrow('process.exit called');
174
+ expect(consoleError).toHaveBeenCalledWith(expect.stringContaining('FastMCP support was removed'));
175
+ consoleError.mockRestore();
176
+ });
177
+ it('exits with error for an unknown --framework', async () => {
178
+ process.argv = ['node', 'create-mcp-server', '--name=test', '--framework=nope'];
179
+ let exitCode;
180
+ process.exit = vi.fn((code) => {
181
+ exitCode = code;
182
+ throw new Error('process.exit called');
183
+ });
184
+ const consoleError = vi.spyOn(console, 'error').mockImplementation(() => { });
185
+ const { parseArguments } = await import('./cli.js');
186
+ expect(() => parseArguments()).toThrow('process.exit called');
187
+ expect(exitCode).toBe(1);
188
+ expect(consoleError).toHaveBeenCalledWith(expect.stringContaining('unknown --framework'));
189
+ consoleError.mockRestore();
178
190
  });
179
191
  it('exits with error when --stdio combined with --oauth', async () => {
180
192
  process.argv = [
package/dist/index.js CHANGED
@@ -12,9 +12,7 @@ async function main() {
12
12
  await generateProject({
13
13
  projectName: options.name,
14
14
  packageManager: options.packageManager,
15
- framework: options.framework,
16
15
  transport: options.transport,
17
- templateType: options.template,
18
16
  withOAuth: options.oauth,
19
17
  withGitInit: options.git,
20
18
  withSkills: options.skills,
@@ -37,26 +37,6 @@ export async function runInteractiveMode() {
37
37
  initial: 0,
38
38
  }, { onCancel });
39
39
  const packageManager = packageManagerResponse.packageManager || 'npm';
40
- // Framework selection
41
- const frameworkResponse = await prompts({
42
- type: 'select',
43
- name: 'framework',
44
- message: 'Framework:',
45
- choices: [
46
- {
47
- title: 'Official MCP SDK',
48
- value: 'sdk',
49
- description: 'Full control with Express.js',
50
- },
51
- {
52
- title: 'FastMCP (deprecated)',
53
- value: 'fastmcp',
54
- description: 'Stays on SDK v1, no tests; will be removed in a future release',
55
- },
56
- ],
57
- initial: 0,
58
- }, { onCancel });
59
- const framework = frameworkResponse.framework || 'sdk';
60
40
  // Transport selection
61
41
  const transportResponse = await prompts({
62
42
  type: 'select',
@@ -77,34 +57,9 @@ export async function runInteractiveMode() {
77
57
  initial: 0,
78
58
  }, { onCancel });
79
59
  const transport = transportResponse.transport || 'http';
80
- // Only asked for FastMCP HTTP, where it maps to a real `stateless` config
81
- // flag. SDK projects generate the same server either way, so asking would be
82
- // a meaningless choice.
83
- let templateType = 'stateless';
84
- if (transport === 'http' && framework === 'fastmcp') {
85
- const templateTypeResponse = await prompts({
86
- type: 'select',
87
- name: 'templateType',
88
- message: 'Server mode:',
89
- choices: [
90
- {
91
- title: 'Stateless',
92
- value: 'stateless',
93
- description: 'No session state between requests',
94
- },
95
- {
96
- title: 'Stateful',
97
- value: 'stateful',
98
- description: 'Session-based server with SSE support',
99
- },
100
- ],
101
- initial: 0,
102
- }, { onCancel });
103
- templateType = templateTypeResponse.templateType || 'stateless';
104
- }
105
60
  // OAuth prompt - available for any SDK HTTP project
106
61
  let withOAuth = false;
107
- if (transport === 'http' && framework === 'sdk') {
62
+ if (transport === 'http') {
108
63
  const oauthResponse = await prompts({
109
64
  type: 'confirm',
110
65
  name: 'withOAuth',
@@ -131,9 +86,7 @@ export async function runInteractiveMode() {
131
86
  await generateProject({
132
87
  projectName,
133
88
  packageManager,
134
- framework,
135
89
  transport,
136
- templateType,
137
90
  withOAuth,
138
91
  withGitInit,
139
92
  withSkills,
@@ -1,5 +1,4 @@
1
- import type { Framework, PackageManager, TransportType } from './templates/common/types.js';
2
- import type { TemplateType } from './cli.js';
1
+ import type { PackageManager, TransportType } from './templates/common/types.js';
3
2
  export declare const packageManagerCommands: Record<PackageManager, {
4
3
  install: string;
5
4
  dev: string;
@@ -7,9 +6,7 @@ export declare const packageManagerCommands: Record<PackageManager, {
7
6
  export interface ProjectConfig {
8
7
  projectName: string;
9
8
  packageManager: PackageManager;
10
- framework: Framework;
11
9
  transport: TransportType;
12
- templateType: TemplateType;
13
10
  withOAuth: boolean;
14
11
  withGitInit: boolean;
15
12
  withSkills: boolean;
@@ -6,11 +6,9 @@ import { getTsconfigTemplate } from './templates/common/tsconfig.json.js';
6
6
  import { getGitignoreTemplate } from './templates/common/gitignore.js';
7
7
  import { getEnvExampleTemplate } from './templates/common/env.example.js';
8
8
  import { getAgentsMdTemplate } from './templates/common/agents.md.js';
9
- import { warnIfDeprecated } from './deprecations.js';
10
9
  import { copySkill, SKILLS_UPDATE_COMMAND, SKILLS_INSTALL_HINT, SKILLS_DIR } from './skills.js';
11
10
  import { getServerTemplate as getSdkStatelessServerTemplate, getIndexTemplate as getSdkStatelessIndexTemplate, getReadmeTemplate as getSdkStatelessReadmeTemplate, getStoreTemplate as getSdkStoreTemplate, getToolsTemplate as getSdkToolsTemplate, getPromptsTemplate as getSdkPromptsTemplate, getResourcesTemplate as getSdkResourcesTemplate, getStoreTestTemplate as getSdkStoreTestTemplate, getServerTestTemplate as getSdkServerTestTemplate, } from './templates/sdk/stateless/index.js';
12
11
  import { getAuthTemplate as getSdkAuthTemplate } from './templates/sdk/stateful/index.js';
13
- import { getServerTemplate as getFastMCPServerTemplate, getIndexTemplate as getFastMCPIndexTemplate, getReadmeTemplate as getFastMCPReadmeTemplate, } from './templates/fastmcp/index.js';
14
12
  import { getServerTemplate as getSdkStdioServerTemplate, getIndexTemplate as getSdkStdioIndexTemplate, getReadmeTemplate as getSdkStdioReadmeTemplate, } from './templates/sdk/stdio/index.js';
15
13
  import { getDockerfileTemplate, getDockerignoreTemplate } from './templates/deployment/index.js';
16
14
  // Auth is keyed off `withOAuth`, never off the template type - see
@@ -21,25 +19,16 @@ const sdkHttpTemplateFunctions = {
21
19
  getReadmeTemplate: getSdkStatelessReadmeTemplate,
22
20
  getAuthTemplate: getSdkAuthTemplate,
23
21
  };
24
- const fastmcpTemplateFunctions = {
25
- getServerTemplate: getFastMCPServerTemplate,
26
- getIndexTemplate: getFastMCPIndexTemplate,
27
- getReadmeTemplate: getFastMCPReadmeTemplate,
28
- };
29
22
  export const packageManagerCommands = {
30
23
  npm: { install: 'npm install', dev: 'npm run dev' },
31
24
  pnpm: { install: 'pnpm install', dev: 'pnpm dev' },
32
25
  yarn: { install: 'yarn', dev: 'yarn dev' },
33
26
  };
34
27
  export async function generateProject(config) {
35
- const { projectName, packageManager, framework, transport, templateType, withOAuth, withGitInit, withSkills, } = config;
36
- // Here rather than in either entry point, so CLI and interactive runs both warn.
37
- warnIfDeprecated(framework);
28
+ const { projectName, packageManager, transport, withOAuth, withGitInit, withSkills } = config;
38
29
  const templateOptions = {
39
30
  withOAuth: transport === 'http' ? withOAuth : false,
40
31
  packageManager,
41
- framework,
42
- stateless: transport === 'stdio' ? true : templateType === 'stateless',
43
32
  transport,
44
33
  };
45
34
  const projectPath = join(process.cwd(), projectName);
@@ -48,11 +37,7 @@ export async function generateProject(config) {
48
37
  await mkdir(srcPath, { recursive: true });
49
38
  // Build list of files to write
50
39
  const filesToWrite = [];
51
- if (framework === 'fastmcp') {
52
- // FastMCP templates
53
- filesToWrite.push(writeFile(join(srcPath, 'server.ts'), fastmcpTemplateFunctions.getServerTemplate(projectName)), writeFile(join(srcPath, 'index.ts'), fastmcpTemplateFunctions.getIndexTemplate(templateOptions)), writeFile(join(projectPath, 'README.md'), fastmcpTemplateFunctions.getReadmeTemplate(projectName, templateOptions)));
54
- }
55
- else if (transport === 'stdio') {
40
+ if (transport === 'stdio') {
56
41
  // SDK stdio templates
57
42
  filesToWrite.push(writeFile(join(srcPath, 'server.ts'), getSdkStdioServerTemplate(projectName)), writeFile(join(srcPath, 'index.ts'), getSdkStdioIndexTemplate(templateOptions)), writeFile(join(projectPath, 'README.md'), getSdkStdioReadmeTemplate(projectName, templateOptions)));
58
43
  }
@@ -63,14 +48,12 @@ export async function generateProject(config) {
63
48
  filesToWrite.push(writeFile(join(srcPath, 'auth.ts'), templates.getAuthTemplate()));
64
49
  }
65
50
  }
66
- // server.ts only composes these; they are identical on both SDK transports.
67
- if (framework === 'sdk') {
68
- filesToWrite.push(writeFile(join(srcPath, 'tools.ts'), getSdkToolsTemplate()), writeFile(join(srcPath, 'prompts.ts'), getSdkPromptsTemplate()), writeFile(join(srcPath, 'resources.ts'), getSdkResourcesTemplate()), writeFile(join(srcPath, 'notes-store.ts'), getSdkStoreTemplate()),
69
- // Two layers: the store in isolation, and the payload an agent reads.
70
- writeFile(join(srcPath, 'notes-store.test.ts'), getSdkStoreTestTemplate()), writeFile(join(srcPath, 'server.test.ts'), getSdkServerTestTemplate()));
71
- }
51
+ // server.ts only composes these; they are identical on both transports.
52
+ filesToWrite.push(writeFile(join(srcPath, 'tools.ts'), getSdkToolsTemplate()), writeFile(join(srcPath, 'prompts.ts'), getSdkPromptsTemplate()), writeFile(join(srcPath, 'resources.ts'), getSdkResourcesTemplate()), writeFile(join(srcPath, 'notes-store.ts'), getSdkStoreTemplate()),
53
+ // Two layers: the store in isolation, and the payload an agent reads.
54
+ writeFile(join(srcPath, 'notes-store.test.ts'), getSdkStoreTestTemplate()), writeFile(join(srcPath, 'server.test.ts'), getSdkServerTestTemplate()));
72
55
  // Common files for all templates
73
- filesToWrite.push(writeFile(join(projectPath, 'package.json'), getPackageJsonTemplate(projectName, templateOptions)), writeFile(join(projectPath, 'tsconfig.json'), getTsconfigTemplate({ withTests: framework === 'sdk' })), writeFile(join(projectPath, '.gitignore'), getGitignoreTemplate()), writeFile(join(projectPath, '.env.example'), getEnvExampleTemplate(templateOptions)), writeFile(join(projectPath, 'AGENTS.md'), getAgentsMdTemplate(projectName, templateOptions)));
56
+ filesToWrite.push(writeFile(join(projectPath, 'package.json'), getPackageJsonTemplate(projectName, templateOptions)), writeFile(join(projectPath, 'tsconfig.json'), getTsconfigTemplate()), writeFile(join(projectPath, '.gitignore'), getGitignoreTemplate()), writeFile(join(projectPath, '.env.example'), getEnvExampleTemplate(templateOptions)), writeFile(join(projectPath, 'AGENTS.md'), getAgentsMdTemplate(projectName, templateOptions)));
74
57
  // Deployment files for HTTP transport only (stdio servers are not HTTP services)
75
58
  if (transport === 'http') {
76
59
  filesToWrite.push(writeFile(join(projectPath, 'Dockerfile'), getDockerfileTemplate(templateOptions)), writeFile(join(projectPath, '.dockerignore'), getDockerignoreTemplate()));
@@ -98,8 +81,7 @@ export async function generateProject(config) {
98
81
  }
99
82
  }
100
83
  const commands = packageManagerCommands[packageManager];
101
- const frameworkName = framework === 'fastmcp' ? 'FastMCP' : 'MCP SDK';
102
- console.log(`\nCreated ${projectName} with ${frameworkName} (${transport}) at ${projectPath}`);
84
+ console.log(`\nCreated ${projectName} with MCP SDK (${transport}) at ${projectPath}`);
103
85
  console.log(`\nNext steps:`);
104
86
  console.log(` cd ${projectName}`);
105
87
  console.log(` ${commands.install}`);
@@ -7,19 +7,16 @@ import { SKILLS_UPDATE_COMMAND, SKILLS_INSTALL_HINT, SKILLS_DIR } from '../../sk
7
7
  * someone changing it will otherwise get wrong.
8
8
  */
9
9
  export function getAgentsMdTemplate(projectName, options) {
10
- const framework = options?.framework ?? 'sdk';
11
10
  const transport = options?.transport ?? 'http';
12
11
  const withOAuth = options?.withOAuth ?? false;
13
12
  const packageManager = options?.packageManager ?? 'npm';
14
- const isSdk = framework === 'sdk';
15
13
  const isStdio = transport === 'stdio';
16
14
  const run = {
17
15
  npm: { build: 'npm run build', test: 'npm test', dev: 'npm run dev' },
18
16
  pnpm: { build: 'pnpm build', test: 'pnpm test', dev: 'pnpm dev' },
19
17
  yarn: { build: 'yarn build', test: 'yarn test', dev: 'yarn dev' },
20
18
  }[packageManager];
21
- const layout = isSdk
22
- ? `- \`src/server.ts\` — creates the \`McpServer\` and registers the primitives. It
19
+ const layout = `- \`src/server.ts\` — creates the \`McpServer\` and registers the primitives. It
23
20
  should stay a composition root; definitions do not belong here.
24
21
  - \`src/tools.ts\`, \`src/prompts.ts\`, \`src/resources.ts\` — one file per MCP
25
22
  primitive, each exporting a \`register*(server)\` function.
@@ -29,13 +26,8 @@ export function getAgentsMdTemplate(projectName, options) {
29
26
 
30
27
  The project is generated with a small example so nothing starts empty. It is
31
28
  meant to be replaced — delete it once your own tools exist. The guidance below
32
- applies to whatever replaces it.`
33
- : `- \`src/server.ts\` — the FastMCP server and its tools, prompts and resources.
34
- - \`src/index.ts\` — transport startup.
35
-
36
- The project is generated with a small example so nothing starts empty. It is
37
- meant to be replaced — delete it once your own tools exist.`;
38
- const perRequestSection = isSdk && !isStdio
29
+ applies to whatever replaces it.`;
30
+ const perRequestSection = !isStdio
39
31
  ? `
40
32
  ## State lives in the module, not the server
41
33
 
@@ -80,8 +72,7 @@ server misconfiguration and belongs in the 500 bucket.
80
72
  line, not inside it.
81
73
  `
82
74
  : '';
83
- const testingSection = isSdk
84
- ? `
75
+ const testingSection = `
85
76
  ## Adding a tool means adding a test
86
77
 
87
78
  \`${run.test}\` runs two layers:
@@ -102,17 +93,8 @@ tests that exercise your data structures; those teach nothing about the tool.
102
93
 
103
94
  Assert on the parsed payload rather than on internal calls. It is the surface the
104
95
  agent sees, and it survives refactoring underneath.
105
- `
106
- : `
107
- ## Testing
108
-
109
- This project ships without a test setup. If you add one, assert on the **payload
110
- a tool returns** rather than on internal function calls — that is the surface an
111
- agent reads, and a tool can be internally correct while returning something
112
- misleading.
113
96
  `;
114
- const toolDesignSection = isSdk
115
- ? `
97
+ const toolDesignSection = `
116
98
  ## Writing a good tool
117
99
 
118
100
  A tool is a contract with a non-deterministic caller. It cannot ask what you
@@ -156,8 +138,7 @@ The flat layout here suits a handful of tools. It is not meant to be permanent:
156
138
  Whichever shape you land on, keep two things: \`server.ts\` stays a composition
157
139
  root, and domain logic stays free of MCP imports so it remains testable on its
158
140
  own.
159
- `
160
- : '';
141
+ `;
161
142
  const skillSection = `
162
143
  ## The tool-design skill
163
144
 
@@ -179,8 +160,7 @@ is missing entirely, add it with \`${SKILLS_INSTALL_HINT}\`.
179
160
 
180
161
  Commit \`${SKILLS_DIR}/\` so everyone working on this project gets the same copy.
181
162
  `;
182
- const conventions = isSdk
183
- ? `
163
+ const conventions = `
184
164
  ## Conventions worth keeping
185
165
 
186
166
  - This project uses the **MCP TypeScript SDK v2** split packages
@@ -191,11 +171,10 @@ Commit \`${SKILLS_DIR}/\` so everyone working on this project gets the same copy
191
171
  - A tool handler's second argument is \`ctx\` (\`ctx.mcpReq.signal\`,
192
172
  \`ctx.http?.authInfo\`), not the v1 \`extra\`.
193
173
  - Logging, sampling and roots are deprecated in v2 — avoid \`sendLoggingMessage\`.
194
- `
195
- : '';
174
+ `;
196
175
  const commands = [
197
176
  [run.dev, 'build and run'],
198
- ...(isSdk ? [[run.test, 'run the tests']] : []),
177
+ [run.test, 'run the tests'],
199
178
  [run.build, 'type-check and compile'],
200
179
  ];
201
180
  const commandWidth = Math.max(...commands.map(([cmd]) => cmd.length));