@agentailor/create-mcp-server 0.5.0 → 0.5.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
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @agentailor/create-mcp-server
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@agentailor/create-mcp-server)
|
|
4
|
+
[](https://github.com/agentailor/create-mcp-server/actions/workflows/test.yml)
|
|
5
|
+
[](https://www.npmjs.com/package/@agentailor/create-mcp-server)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://nodejs.org/)
|
|
8
|
+
[](https://github.com/agentailor/create-mcp-server/pulls)
|
|
9
|
+
|
|
3
10
|
Scaffold production-ready MCP servers in seconds.
|
|
4
11
|
|
|
5
12
|
## Quick Start
|
|
@@ -119,6 +126,25 @@ my-mcp-server/
|
|
|
119
126
|
- `npm run dev` — build and start the server
|
|
120
127
|
- `npm run inspect` — open MCP Inspector (update URL in `package.json` if needed)
|
|
121
128
|
|
|
129
|
+
## Learning Resources
|
|
130
|
+
|
|
131
|
+
| Guide | Description |
|
|
132
|
+
|-------|-------------|
|
|
133
|
+
| [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. |
|
|
134
|
+
| [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. |
|
|
135
|
+
| [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. |
|
|
136
|
+
| [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. |
|
|
137
|
+
|
|
138
|
+
## Need help building MCP servers or agent infrastructure?
|
|
139
|
+
|
|
140
|
+
I help teams design and ship production-ready AI agent systems (MCP, LangGraph, RAG, memory, performance).
|
|
141
|
+
|
|
142
|
+
If you’re building something serious on top of this:
|
|
143
|
+
|
|
144
|
+
→ [DM me on LinkedIn](https://www.linkedin.com/in/ali-ibrahim-junior/)
|
|
145
|
+
|
|
146
|
+
Happy to jump on a short call.
|
|
147
|
+
|
|
122
148
|
## What is MCP?
|
|
123
149
|
|
|
124
150
|
The [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) is an open protocol that enables AI assistants to interact with external tools, data sources, and services.
|
|
@@ -5,15 +5,15 @@ export function getPackageJsonTemplate(projectName, options) {
|
|
|
5
5
|
let devDependencies;
|
|
6
6
|
const commonDevDependencies = {
|
|
7
7
|
typescript: '^5.9.3',
|
|
8
|
-
'@modelcontextprotocol/inspector': '^0.
|
|
9
|
-
'@types/node': '^25.0
|
|
8
|
+
'@modelcontextprotocol/inspector': '^0.20.0',
|
|
9
|
+
'@types/node': '^25.3.0',
|
|
10
10
|
};
|
|
11
|
-
const zodDependency = { zod: '^4.3.
|
|
12
|
-
const dotEnvDependency = { dotenv: '^17.
|
|
11
|
+
const zodDependency = { zod: '^4.3.6' };
|
|
12
|
+
const dotEnvDependency = { dotenv: '^17.3.1' };
|
|
13
13
|
if (framework === 'fastmcp') {
|
|
14
14
|
// FastMCP dependencies - simpler setup
|
|
15
15
|
dependencies = {
|
|
16
|
-
fastmcp: '^3.
|
|
16
|
+
fastmcp: '^3.33.0',
|
|
17
17
|
...zodDependency,
|
|
18
18
|
...dotEnvDependency,
|
|
19
19
|
};
|
|
@@ -24,7 +24,7 @@ export function getPackageJsonTemplate(projectName, options) {
|
|
|
24
24
|
else {
|
|
25
25
|
// Official SDK dependencies
|
|
26
26
|
dependencies = {
|
|
27
|
-
'@modelcontextprotocol/sdk': '^1.
|
|
27
|
+
'@modelcontextprotocol/sdk': '^1.26.0',
|
|
28
28
|
express: '^5.2.1',
|
|
29
29
|
...zodDependency,
|
|
30
30
|
...dotEnvDependency,
|
|
@@ -2,9 +2,27 @@ export function getReadmeTemplate(projectName, options) {
|
|
|
2
2
|
const packageManager = options?.packageManager ?? 'npm';
|
|
3
3
|
const stateless = options?.stateless ?? false;
|
|
4
4
|
const commands = {
|
|
5
|
-
npm: {
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
npm: {
|
|
6
|
+
install: 'npm install',
|
|
7
|
+
dev: 'npm run dev',
|
|
8
|
+
build: 'npm run build',
|
|
9
|
+
start: 'npm start',
|
|
10
|
+
inspect: 'npm run inspect',
|
|
11
|
+
},
|
|
12
|
+
pnpm: {
|
|
13
|
+
install: 'pnpm install',
|
|
14
|
+
dev: 'pnpm dev',
|
|
15
|
+
build: 'pnpm build',
|
|
16
|
+
start: 'pnpm start',
|
|
17
|
+
inspect: 'pnpm inspect',
|
|
18
|
+
},
|
|
19
|
+
yarn: {
|
|
20
|
+
install: 'yarn',
|
|
21
|
+
dev: 'yarn dev',
|
|
22
|
+
build: 'yarn build',
|
|
23
|
+
start: 'yarn start',
|
|
24
|
+
inspect: 'yarn inspect',
|
|
25
|
+
},
|
|
8
26
|
};
|
|
9
27
|
const cmd = commands[packageManager];
|
|
10
28
|
const modeDescription = stateless
|
|
@@ -34,6 +52,22 @@ ${cmd.start}
|
|
|
34
52
|
|
|
35
53
|
The server will start on port 3000 by default. You can change this by setting the \`PORT\` environment variable.
|
|
36
54
|
|
|
55
|
+
## Testing with MCP Inspector
|
|
56
|
+
|
|
57
|
+
This project includes [MCP Inspector](https://github.com/modelcontextprotocol/inspector) as a dev dependency for testing and debugging.
|
|
58
|
+
|
|
59
|
+
First, start the server in one terminal:
|
|
60
|
+
|
|
61
|
+
\`\`\`bash
|
|
62
|
+
${cmd.dev}
|
|
63
|
+
\`\`\`
|
|
64
|
+
|
|
65
|
+
Then, in another terminal, launch the inspector:
|
|
66
|
+
|
|
67
|
+
\`\`\`bash
|
|
68
|
+
${cmd.inspect}
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
37
71
|
## API Endpoints
|
|
38
72
|
|
|
39
73
|
- **POST /mcp** - Main MCP endpoint for JSON-RPC messages
|
|
@@ -2,9 +2,27 @@ export function getReadmeTemplate(projectName, options) {
|
|
|
2
2
|
const withOAuth = options?.withOAuth ?? false;
|
|
3
3
|
const packageManager = options?.packageManager ?? 'npm';
|
|
4
4
|
const commands = {
|
|
5
|
-
npm: {
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
npm: {
|
|
6
|
+
install: 'npm install',
|
|
7
|
+
dev: 'npm run dev',
|
|
8
|
+
build: 'npm run build',
|
|
9
|
+
start: 'npm start',
|
|
10
|
+
inspect: 'npm run inspect',
|
|
11
|
+
},
|
|
12
|
+
pnpm: {
|
|
13
|
+
install: 'pnpm install',
|
|
14
|
+
dev: 'pnpm dev',
|
|
15
|
+
build: 'pnpm build',
|
|
16
|
+
start: 'pnpm start',
|
|
17
|
+
inspect: 'pnpm inspect',
|
|
18
|
+
},
|
|
19
|
+
yarn: {
|
|
20
|
+
install: 'yarn',
|
|
21
|
+
dev: 'yarn dev',
|
|
22
|
+
build: 'yarn build',
|
|
23
|
+
start: 'yarn start',
|
|
24
|
+
inspect: 'yarn inspect',
|
|
25
|
+
},
|
|
8
26
|
}[packageManager];
|
|
9
27
|
const description = withOAuth
|
|
10
28
|
? 'A stateful streamable HTTP MCP (Model Context Protocol) server with session management and OAuth authentication.'
|
|
@@ -116,6 +134,22 @@ ${commands.start}
|
|
|
116
134
|
\`\`\`
|
|
117
135
|
|
|
118
136
|
The server will start on port 3000 by default. You can change this by setting the \`PORT\` environment variable.
|
|
137
|
+
|
|
138
|
+
## Testing with MCP Inspector
|
|
139
|
+
|
|
140
|
+
This project includes [MCP Inspector](https://github.com/modelcontextprotocol/inspector) as a dev dependency for testing and debugging.
|
|
141
|
+
|
|
142
|
+
First, start the server in one terminal:
|
|
143
|
+
|
|
144
|
+
\`\`\`bash
|
|
145
|
+
${commands.dev}
|
|
146
|
+
\`\`\`
|
|
147
|
+
|
|
148
|
+
Then, in another terminal, launch the inspector:
|
|
149
|
+
|
|
150
|
+
\`\`\`bash
|
|
151
|
+
${commands.inspect}
|
|
152
|
+
\`\`\`
|
|
119
153
|
${oauthSection}
|
|
120
154
|
## API Endpoints
|
|
121
155
|
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
export function getReadmeTemplate(projectName, options) {
|
|
2
2
|
const packageManager = options?.packageManager ?? 'npm';
|
|
3
3
|
const commands = {
|
|
4
|
-
npm: {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
npm: {
|
|
5
|
+
install: 'npm install',
|
|
6
|
+
dev: 'npm run dev',
|
|
7
|
+
build: 'npm run build',
|
|
8
|
+
start: 'npm start',
|
|
9
|
+
inspect: 'npm run inspect',
|
|
10
|
+
},
|
|
11
|
+
pnpm: {
|
|
12
|
+
install: 'pnpm install',
|
|
13
|
+
dev: 'pnpm dev',
|
|
14
|
+
build: 'pnpm build',
|
|
15
|
+
start: 'pnpm start',
|
|
16
|
+
inspect: 'pnpm inspect',
|
|
17
|
+
},
|
|
18
|
+
yarn: {
|
|
19
|
+
install: 'yarn',
|
|
20
|
+
dev: 'yarn dev',
|
|
21
|
+
build: 'yarn build',
|
|
22
|
+
start: 'yarn start',
|
|
23
|
+
inspect: 'yarn inspect',
|
|
24
|
+
},
|
|
7
25
|
}[packageManager];
|
|
8
26
|
return `# ${projectName}
|
|
9
27
|
|
|
@@ -29,6 +47,22 @@ ${commands.start}
|
|
|
29
47
|
|
|
30
48
|
The server will start on port 3000 by default. You can change this by setting the \`PORT\` environment variable.
|
|
31
49
|
|
|
50
|
+
## Testing with MCP Inspector
|
|
51
|
+
|
|
52
|
+
This project includes [MCP Inspector](https://github.com/modelcontextprotocol/inspector) as a dev dependency for testing and debugging.
|
|
53
|
+
|
|
54
|
+
First, start the server in one terminal:
|
|
55
|
+
|
|
56
|
+
\`\`\`bash
|
|
57
|
+
${commands.dev}
|
|
58
|
+
\`\`\`
|
|
59
|
+
|
|
60
|
+
Then, in another terminal, launch the inspector:
|
|
61
|
+
|
|
62
|
+
\`\`\`bash
|
|
63
|
+
${commands.inspect}
|
|
64
|
+
\`\`\`
|
|
65
|
+
|
|
32
66
|
## API Endpoints
|
|
33
67
|
|
|
34
68
|
- **POST /mcp** - Main MCP endpoint for JSON-RPC messages
|