Content
[](https://www.npmjs.com/package/create-ts-mcp-server)
# MCP Server Scaffolding Tool
A command - line tool for quickly creating standardized MCP (Model Context Protocol) servers using Node.js
## Quick Start
```bash
npx @ad/create-mcp-server te your-mcp-server-name
```
## ✨Features
🛠️ Interactive Configuration - Provides a user - friendly command - line interactive interface
📦 Multi - level API Support - Supports both High - Level and Low - Level API development
⚡ Rapid Generation - Fast project generation based on a template engine
🔧 Intelligent Configuration - Automatically generates package.json and TypeScript configurations
🚀 Usage Guide
### Create a Project
```bash
# by npx
npx @ad/create-mcp-server your-server-name
# or by npm
npm install -g @ad/create-mcp-server
create-mcp-server your-server-name
```
### command
```bash
cd your-server-name
npm install # install dependencies
npm run build # build project
```
### Directory Structure
The typical project structure generated is as follows:
```
your-server-name/
├── src/
│ ├── index.ts # Service entry file
├── test/
├── package.json
└── tsconfig.json
```
## 📚 API Level Explanation
### High-Level API
Use cases: Rapid development of standard services Features:
Pre-configured common middleware
Automatic error handling
Standardized routing configuration
Out-of-the-box RESTful support
Example:
```typescript
// Quickly create a service instance
server.tool(
"calculate-bmi",
{
weightKg: z.number(),
heightM: z.number()
},
async ({ weightKg, heightM }) => ({
content: [{
type: "text",
text: String(weightKg / (heightM * heightM))
}]
})
);
```
### Low-Level API
Use cases: Scenarios requiring deep customization Features:
Full control over the request lifecycle
Manual management of the middleware chain
Custom protocol handling
Low-level performance optimization
Example:
```typescript
server.setRequestHandler(CallToolRequestSchema, async (request) => {
switch (request.params.name) {
case "create_note": {
const title = String(request.params.arguments?.title);
const content = String(request.params.arguments?.content);
if (!title || !content) {
throw new Error("Title and content are required");
}
const id = String(Object.keys(notes).length + 1);
notes[id] = { title, content };
return {
content: [{
type: "text",
text: `Created note ${id}: ${title}`
}]
};
}
default:
throw new Error("Unknown tool");
}
});
```
You Might Also Like
Ollama
Ollama enables easy access to large language models on various platforms.

n8n
n8n is a secure workflow automation platform for technical teams with 400+...
OpenWebUI
Open WebUI is an extensible web interface for customizable applications.

Dify
Dify is a platform for AI workflows, enabling file uploads and self-hosting.

Zed
Zed is a high-performance multiplayer code editor from the creators of Atom.
MarkItDown MCP
markitdown-mcp is a lightweight MCP server for converting various URIs to Markdown.