Getting Started

For Developers

Set up your development environment and build your first MCP App

Prerequisites

  • Bun v1.1+ (bun.sh)
  • Git
  • Code editor (Cursor recommended)
  • TypeScript basics (docs)

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

  1. Go to admin.decocms.com
  2. Add IntegrationCustom Integration
  3. Paste http://localhost:3001/api/mcp
  4. Test the hello_world tool 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

Found an error or want to improve this page?

Edit this page