This is a post from the https://blog.fka.dev/blog/2025-04-03-project-scaffolding-mcp-tools/ about Learn how to quickly scaffold new Model Context Protocol (MCP) server projects using MCP Tools' scaffolding feature, simplifying the creation of TypeScript-based MCP servers with proper configuration and structure..
Written by Fatih Kadir Akın on April 03, 2025
---
Fatih is a passionate software developer from Istanbul, Turkey, currently leading Developer Relations at Teknasyon. He has authored books on JavaScript and prompt engineering for AI tools. With a deep enthusiasm for web technologies and AI-assisted development, he actively contributes to open-source projects and builds innovative things on GitHub. Beyond coding, Fatih enjoys organizing conferences and sharing knowledge through talks. A strong advocate for open-source collaboration, he specializes in JavaScript and Ruby (particularly Ruby on Rails). He also created prompts.chat, a platform for exploring and optimizing AI prompts for LLMs.
READ THIS POST CAREFULLY WITH ALL THE CHUNKS BEFORE RESPONDING.
This post contains explanations of some concepts in given context, code examples and instructions about the topic.
When you see a code block, analyze it and be ready to apply similar patterns. Pay attention to:
1. Code blocks marked with ```language-name - these contain example code
2. Explanatory text around the code that provides context
3. Any specific instructions or notes about implementation
4. Variable names and patterns that may need to be reused
When implementing similar code (if exists), maintain consistent:
- Naming conventions
- Code style and formatting
- Error handling patterns
- Documentation approach
The goal for the reader is to understand the concepts and be able to apply them appropriately in new situations.
Written by Fatih Kadir Akın, on April 03, 2025
---
# Streamline Your MCP Development: Project Scaffolding with MCP Tools
In previous articles, we've explored various aspects of the Model Context Protocol (MCP) and how it enables LLMs like Claude to interact with external tools, resources, and prompts. Today, I want to focus on a productivity-enhancing feature of MCP Tools: **project scaffolding**.
Building a new MCP server from scratch involves several repetitive setup steps - configuring TypeScript, setting up the appropriate transport layers, implementing interfaces, and wiring everything together. MCP Tools simplifies this process with its powerful scaffolding capabilities, allowing you to create fully functional MCP server projects with just a few commands.
{% include framework/shortcodes/button.html
text="View on GitHub"
url="https://github.com/f/mcptools"
style="primary"
size="large"
icon="github"
external="true"
%}
## What is Project Scaffolding?
Project scaffolding in MCP Tools allows you to generate the complete structure and boilerplate code for a new MCP server project. This includes:
- Setting up the server with your chosen transport method (stdio or SSE)
- Configuring TypeScript with modern ES modules
- Creating skeleton implementations of tools, resources, and prompts
- Adding proper MCP interfaces and type definitions
- Automatically handling imports and initialization
This approach saves you time and ensures best practices are followed in your project structure.
## Basic Scaffolding Commands
To get started with project scaffolding, you'll need to have MCP Tools installed. If you haven't done so yet, install it with:
```bash
# Using Homebrew
brew tap f/mcptools
brew install mcp
# Or from source
go install github.com/f/mcptools/cmd/mcptools@latest
```
Once MCP Tools is installed, you can create a new project with these simple steps:
```bash
# Create and navigate to your project directory
mkdir my-mcp-server
cd my-mcp-server
# Scaffold a project with a calculate tool
mcp new tool:calculate
```
This command will create a complete project structure with a "calculate" tool implementation.
## Customizing Your Scaffolded Project
MCP Tools offers several options to customize your scaffolded project:
### Specifying Multiple Components
You can include multiple components in your scaffold by listing them in the command:
```bash
# Create a project with a tool, resource, and prompt
mcp new tool:calculate resource:file prompt:greet
```
This will generate all three component types in your project:
- A "calculate" tool that can perform calculations
- A "file" resource that can serve file content
- A "greet" prompt that provides greeting templates
### Choosing a Transport Method
MCP supports different transport methods for communication. You can specify your preferred method:
```bash
# Create a project using stdio transport (default)
mcp new tool:calculate --transport=stdio
# Create a project using SSE (Server-Sent Events) transport for HTTP
mcp new tool:calculate --transport=sse
```
The stdio transport is ideal for command-line tools and desktop integrations, while SSE is better for web-based applications.
### Selecting an SDK
Currently, MCP Tools primarily supports TypeScript for scaffolding, but you can explicitly specify it:
```bash
mcp new tool:calculate --sdk=ts
```
## Building and Running Your Project
After scaffolding, you can build and run your MCP server with these commands:
```bash
# Install dependencies
npm install
# Build the TypeScript code
npm run build
# Test the server with MCP Tools
mcp tools node build/index.js
```

## Template Storage Locations
MCP Tools looks for project templates in several locations:
1. Local `./templates/` directory in your current working directory
2. User's home directory: `~/.mcpt/templates/`
3. Next to the MCP Tools executable
This gives you flexibility to store custom templates in your project or share them across all your projects.
## Customizing Templates
Advanced users can create their own templates by:
1. Creating a directory structure matching the desired output
2. Placing the templates in one of the template storage locations
## Conclusion
Project scaffolding with MCP Tools dramatically simplifies the process of creating new MCP server projects. Instead of spending time on repetitive setup tasks, you can focus on implementing your specific business logic and functionality.
With just a few commands, you get a complete, well-structured project that follows best practices and is ready for development. This feature is particularly valuable for teams working on multiple MCP projects, ensuring consistency and reducing setup time.
Try MCP Tools project scaffolding for your next MCP server project and experience how it streamlines your development workflow!
_This article was proofread and edited with AI assistance._