Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agentailor/create-mcp-server",
"version": "0.5.0",
"version": "0.5.1",
"description": "Create a new MCP (Model Context Protocol) server project",
"type": "module",
"bin": {
Expand Down
45 changes: 41 additions & 4 deletions src/templates/fastmcp/readme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,31 @@ export function getReadmeTemplate(projectName: string, options?: TemplateOptions
const packageManager = options?.packageManager ?? 'npm';
const stateless = options?.stateless ?? false;

const commands: Record<string, { install: string; dev: string; build: string; start: string }> = {
npm: { install: 'npm install', dev: 'npm run dev', build: 'npm run build', start: 'npm start' },
pnpm: { install: 'pnpm install', dev: 'pnpm dev', build: 'pnpm build', start: 'pnpm start' },
yarn: { install: 'yarn', dev: 'yarn dev', build: 'yarn build', start: 'yarn start' },
const commands: Record<
string,
{ install: string; dev: string; build: string; start: string; inspect: string }
> = {
npm: {
install: 'npm install',
dev: 'npm run dev',
build: 'npm run build',
start: 'npm start',
inspect: 'npm run inspect',
},
pnpm: {
install: 'pnpm install',
dev: 'pnpm dev',
build: 'pnpm build',
start: 'pnpm start',
inspect: 'pnpm inspect',
},
yarn: {
install: 'yarn',
dev: 'yarn dev',
build: 'yarn build',
start: 'yarn start',
inspect: 'yarn inspect',
},
};

const cmd = commands[packageManager];
Expand Down Expand Up @@ -40,6 +61,22 @@ ${cmd.start}

The server will start on port 3000 by default. You can change this by setting the \`PORT\` environment variable.

## Testing with MCP Inspector

This project includes [MCP Inspector](https://github.com/modelcontextprotocol/inspector) as a dev dependency for testing and debugging.

First, start the server in one terminal:

\`\`\`bash
${cmd.dev}
\`\`\`

Then, in another terminal, launch the inspector:

\`\`\`bash
${cmd.inspect}
\`\`\`

## API Endpoints

- **POST /mcp** - Main MCP endpoint for JSON-RPC messages
Expand Down
40 changes: 37 additions & 3 deletions src/templates/sdk/stateful/readme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,27 @@ export function getReadmeTemplate(projectName: string, options?: TemplateOptions
const packageManager = options?.packageManager ?? 'npm';

const commands = {
npm: { install: 'npm install', dev: 'npm run dev', build: 'npm run build', start: 'npm start' },
pnpm: { install: 'pnpm install', dev: 'pnpm dev', build: 'pnpm build', start: 'pnpm start' },
yarn: { install: 'yarn', dev: 'yarn dev', build: 'yarn build', start: 'yarn start' },
npm: {
install: 'npm install',
dev: 'npm run dev',
build: 'npm run build',
start: 'npm start',
inspect: 'npm run inspect',
},
pnpm: {
install: 'pnpm install',
dev: 'pnpm dev',
build: 'pnpm build',
start: 'pnpm start',
inspect: 'pnpm inspect',
},
yarn: {
install: 'yarn',
dev: 'yarn dev',
build: 'yarn build',
start: 'yarn start',
inspect: 'yarn inspect',
},
}[packageManager];

const description = withOAuth
Expand Down Expand Up @@ -126,6 +144,22 @@ ${commands.start}
\`\`\`

The server will start on port 3000 by default. You can change this by setting the \`PORT\` environment variable.

## Testing with MCP Inspector

This project includes [MCP Inspector](https://github.com/modelcontextprotocol/inspector) as a dev dependency for testing and debugging.

First, start the server in one terminal:

\`\`\`bash
${commands.dev}
\`\`\`

Then, in another terminal, launch the inspector:

\`\`\`bash
${commands.inspect}
\`\`\`
${oauthSection}
## API Endpoints

Expand Down
40 changes: 37 additions & 3 deletions src/templates/sdk/stateless/readme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,27 @@ export function getReadmeTemplate(projectName: string, options?: TemplateOptions
const packageManager = options?.packageManager ?? 'npm';

const commands = {
npm: { install: 'npm install', dev: 'npm run dev', build: 'npm run build', start: 'npm start' },
pnpm: { install: 'pnpm install', dev: 'pnpm dev', build: 'pnpm build', start: 'pnpm start' },
yarn: { install: 'yarn', dev: 'yarn dev', build: 'yarn build', start: 'yarn start' },
npm: {
install: 'npm install',
dev: 'npm run dev',
build: 'npm run build',
start: 'npm start',
inspect: 'npm run inspect',
},
pnpm: {
install: 'pnpm install',
dev: 'pnpm dev',
build: 'pnpm build',
start: 'pnpm start',
inspect: 'pnpm inspect',
},
yarn: {
install: 'yarn',
dev: 'yarn dev',
build: 'yarn build',
start: 'yarn start',
inspect: 'yarn inspect',
},
}[packageManager];

return `# ${projectName}
Expand All @@ -33,6 +51,22 @@ ${commands.start}

The server will start on port 3000 by default. You can change this by setting the \`PORT\` environment variable.

## Testing with MCP Inspector

This project includes [MCP Inspector](https://github.com/modelcontextprotocol/inspector) as a dev dependency for testing and debugging.

First, start the server in one terminal:

\`\`\`bash
${commands.dev}
\`\`\`

Then, in another terminal, launch the inspector:

\`\`\`bash
${commands.inspect}
\`\`\`

## API Endpoints

- **POST /mcp** - Main MCP endpoint for JSON-RPC messages
Expand Down