Skip to content
decodecodeveloper docs
Studio → MCP Apps and extensions → Build MCP Apps

Deployment

Build and deploy your MCP App

This guide uses the MCP App starter at commit 3fc9bd15. An MCP App is a server and an HTML interface that you deploy, then connect to Studio.

Build

bun run build

This runs two steps:

  1. build:web — Vite builds the React app into a single-file HTML bundle (dist/client/index.html)
  2. build:server — Bun bundles api/main.bun.ts into dist/server/main.js

Deploy the server output and dist/client/index.html together on a host that runs Bun. From the project root, the built server can be started with:

NODE_ENV=production PORT=3001 bun dist/server/main.js

Configure your host's public HTTPS URL and process lifecycle. The starter does not turn a Git push into a production deployment by itself.

app.json Configuration

Update app.json with your app's details before publishing:

{
  "scopeName": "your-org",
  "name": "your-app",
  "friendlyName": "Your App Name",
  "description": "What your app does.",
  "connection": {
    "type": "HTTP",
    "url": "https://mcp.example.com/api/mcp",
    "configSchema": {
      "type": "object",
      "properties": {},
      "required": []
    }
  }
}
  • scopeName + name — unique identifier in the deco platform
  • connection.url — your deployed MCP endpoint; the starter serves /api/mcp
  • configSchema — JSON Schema for configuration options shown to users who install your app

Publishing to Deco Studio

  1. Build and deploy the app to a reachable HTTPS host.
  2. Open Studio, then Settings → Connections → Add connection → Custom Connection.
  3. Choose HTTP, paste the deployed /api/mcp URL, and configure the credentials required by your server.
  4. Attach that connection and its selected tools to an agent in Settings. Invoke a tool to open its linked MCP App interface.

app.json records the app's identity and connection details. Creating a custom connection makes it usable in your organization; publishing it to a catalog is a separate distribution workflow. See Connections.

CI/CD

GitHub Actions

The template includes a CI workflow (.github/workflows/ci.yml):

name: CI
 
on: [push, pull_request]
 
jobs:
  ci:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
 
      - uses: oven-sh/setup-bun@v2
        with:
          bun-version: latest
 
      - name: Cache Bun dependencies
        uses: actions/cache@v4
        with:
          path: ~/.bun/install/cache
          key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
          restore-keys: ${{ runner.os }}-bun-
 
      - run: bun install --frozen-lockfile
      - run: bun run ci:check
      - run: bun run check
      - run: bun run build

This runs on every push and pull request:

  • bun run ci:check — Biome lint + format check
  • bun run check — TypeScript type checking
  • bun run build — Full production build

Testing After Deploy

  1. Connect the deployed endpoint in Studio using the steps above.
  2. Call hello_world with a test name and confirm the structured greeting.
  3. Verify that the linked resource serves text/html;profile=mcp-app and the UI renders the tool result.
  4. Check the server logs and Monitor for calls routed through the connection.

For local testing from hosted Studio, use the HTTPS tunnel workflow. A local MCP client can reach http://localhost:3001/api/mcp directly; /mcp is not the starter's public endpoint.