Getting Started
For Developers
Set up your development environment and build your first MCP App
Prerequisites
Create Your First MCP App
npm create deco@latest
cd <your-app-name>
bun install
Start Development
bun run dev
This starts two processes concurrently:
- API server on port 3001 with hot reload (
bun run --hot api/main.ts) - Web UI in watch mode (
vite build --watch)
Your MCP endpoint is available at http://localhost:3001/api/mcp .
Project Overview
├── api/ # MCP server with tools and resources
│ ├── main.ts # Server entry point
│ ├── tools/ # Tool definitions
│ ├── resources/# MCP App resources (serve HTML UIs)
│ └── types/ # StateSchema + Env type
├── web/ # React UI for each tool (MCP Apps)
│ ├── app.tsx # React entry point
│ ├── context.tsx # MCP state management
│ ├── router.tsx # Tool-based routing
│ └── tools/ # One folder per tool UI
├── app.json # Deco mesh configuration
└── .mcp.json # Local MCP server config
Test Your MCP Server
- Go to admin.decocms.com
- Add Integration → Custom Integration
- Paste
http://localhost:3001/api/mcp - Test the
hello_worldtool that comes with the template
Deploy
bun run build
This builds both the web UI (single-file HTML) and the server bundle. See the Deployment guide for publishing to deco mesh.
Get Help
- Discord: decocms.com/discord
- Non-developer? See For AI Builders for the no-code workflow.
Found an error or want to improve this page?
Edit this page