Catuaba logo

Catuaba

Community
dayvsonlima

🍷 Build full-stack Go web apps in minutes, not days. Rails-like CLI with Gin, GORM, Templ, HTMX, Tailwind CSS, and built-in AI integration (MCP).

Publisherdayvsonlima
Repositorycatuaba
LanguageGo
Forks
2
Stars
19
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Catuaba exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    19 stars and 2 forks from the linked repository.


Go is fast, simple, and deploys as a single binary. But starting a web project from scratch means wiring up routers, ORMs, templates, auth, CSRF, sessions, migrations, Docker... hours of boilerplate before you write your first feature.

Catuaba fixes that. One command gives you a production-ready app. Another gives you a full CRUD with views, API, and database — in seconds.

bash
catuaba new blog --db postgres --auth
cd blog
catuaba g scaffold Post title:string content:text published:boolean
make dev

That's it. You now have a running blog with:

  • Landing page styled with Tailwind CSS
  • Full CRUD for Posts — HTML views and JSON API
  • User registration and login with bcrypt + sessions
  • Database migrations, CSRF protection, flash messages
  • Hot-reload in development (Templ + Tailwind + wgo)
  • Docker-ready for production

Why Catuaba?

You wantCatuaba gives you
Start a project fastcatuaba new myapp — full app in 3 seconds
CRUD without boilerplatecatuaba g scaffold — model, views, API, routes, migration
Type-safe HTMLTempl — compiled templates, IDE autocomplete, no interface{}
Interactivity without JS frameworksHTMX + Alpine.js — 31kb total
Production CSSTailwind CSS — standalone binary, no Node.js
Auth that just works--auth — login, register, logout, sessions, bcrypt
AI-powered developmentBuilt-in MCP server — Claude/Cursor understand your project
Deploy anywhereSingle binary + Docker. That's Go.

The Stack

LayerTechnology
HTTPGin
ORMGORM — Postgres, MySQL, SQLite
ViewsTempl — type-safe, compiled HTML
InteractivityHTMX + Alpine.js
CSSTailwind CSS
SessionsSCS
MigrationsRaw SQL (up/down) via golang-migrate

Install

Binary (recommended)

macOS (Apple Silicon)

bash
curl -L https://github.com/dayvsonlima/catuaba/releases/latest/download/catuaba-darwin-arm64.tar.gz | tar xz
sudo mv catuaba /usr/local/bin/

macOS (Intel)

bash
curl -L https://github.com/dayvsonlima/catuaba/releases/latest/download/catuaba-darwin-amd64.tar.gz | tar xz
sudo mv catuaba /usr/local/bin/

Linux

bash
curl -L https://github.com/dayvsonlima/catuaba/releases/latest/download/catuaba-linux-amd64.tar.gz | tar xz
sudo mv catuaba /usr/local/bin/

Windows — download from releases, extract, add to PATH.

From source

bash
go install github.com/dayvsonlima/catuaba@latest

Prerequisites

  • Go 1.22+
  • Templ — go install github.com/a-h/templ/cmd/templ@latest
  • wgo (hot-reload) — go install github.com/bokwoon95/wgo@latest
  • A database: PostgreSQL, MySQL, or SQLite

Getting Started

1. Create your app

bash
catuaba new myapp --db postgres
cd myapp
go mod tidy

Flags:

  • --db postgres|mysql|sqlite (default: postgres)
  • --auth — adds login, register, logout

2. Generate a resource

bash
catuaba g scaffold Post title:string content:text published:boolean

This creates everything:

WhatWhere
Modelapp/models/post.go
Migrationdatabase/migrations/*_create_posts.{up,down}.sql
HTML handlersapp/controllers/posts/ (index, show, new, create, edit, update, delete)
Templ viewsapp/views/posts/ (index, show, form)
RoutesAuto-injected into config/routes.go

3. Start developing

bash
make dev

Open http://localhost:8080 — done.

Three watchers run in parallel:

  • Templ — recompiles .templ files on save
  • Tailwind — rebuilds CSS on save
  • wgo — rebuilds and restarts the Go server

Generators

All generators run inside your project directory with catuaba g <generator>.

Full-stack scaffold

bash
catuaba g scaffold Product name:string price:float description:text active:boolean

Creates model + migration + HTML handlers + Templ views + JSON API + routes. This is the fastest way to build features.

HTML routes:

MethodPathDescription
GET/productsList with pagination
GET/products/newNew form
POST/productsCreate
GET/products/:idDetail view
GET/products/:id/editEdit form
POST/products/:idUpdate
POST/products/:id/deleteDelete

JSON API routes:

MethodPath
GET/api/products
POST/api/products
GET/api/products/:id
PUT/PATCH/api/products/:id
DELETE/api/products/:id

API only

bash
catuaba g api Order total:float status:string

Same as scaffold but without HTML views — JSON API only.

Model

bash
catuaba g model Category name:string description:text

Creates model + SQL migration.

Other generators

bash
catuaba g controller Auth login logout           # Controller with methods
catuaba g middleware RateLimit                    # Middleware
catuaba g service EmailSender                    # Service layer
catuaba g seed Posts                             # Database seed
catuaba g migration add_category_id_to_posts     # Empty SQL migration
catuaba g view about                             # Templ page

Field types

TypeGoSQLHTML
stringstringVARCHAR(255)text input
textstringTEXTtextarea
integerintINTEGERnumber input
floatfloat64REALnumber input
booleanboolBOOLEANcheckbox
datetimetime.TimeTIMESTAMPdatetime-local

Commands

CommandDescription
catuaba new <name>Create application
catuaba g scaffold <name> [fields...]Full-stack CRUD
catuaba g api <name> [fields...]JSON API
catuaba g model <name> [fields...]Model + migration
catuaba g controller <name> [methods...]Controller
catuaba g middleware <name>Middleware
catuaba g service <name>Service
catuaba g seed <name>Database seed
catuaba g migration <name>SQL migration
catuaba g view <name>Templ view page
catuaba serverStart server
catuaba routesList all routes
catuaba db migrateRun pending migrations
catuaba db rollbackRollback last migration
catuaba db statusMigration status
catuaba install <plugin>Install plugin
catuaba mcpStart MCP server

Documentation

For detailed guides on each part of the framework:

  • Models — GORM models, field types, relationships, migrations, querying
  • Controllers — HTML handlers vs JSON API, form binding, route patterns
  • Views — Templ templates, layouts, components, HTMX, Alpine.js, Tailwind CSS
  • Middleware — Built-in stack, CSRF, sessions, flash messages, auth, custom middleware

External references:


Project Structure

myapp/
├── application.go              # Entrypoint: middleware stack, routes, graceful shutdown
├── Makefile                    # dev, build, test, docker
├── Dockerfile                  # Multi-stage production build
├── docker-compose.yml          # App + database
├── .env                        # Environment variables
├── config/
│   ├── config.go               # Env vars → AppConfig struct
│   └── routes.go               # Routes (auto-managed by generators)
├── database/
│   ├── connection.go           # GORM connection + migration runner
│   └── migrations/             # SQL files (up/down)
├── app/
│   ├── models/                 # GORM models
│   ├── controllers/
│   │   ├── home.go             # Home page
│   │   ├── {resource}/         # HTML handlers (scaffold)
│   │   └── api/{resource}/     # JSON handlers (api/scaffold)
│   └── views/
│       ├── layouts/base.templ  # HTML5 layout: head, nav, flash, footer
│       ├── components/         # Reusable: nav, flash, pagination, form fields
│       ├── pages/              # Static pages: home, 404
│       └── {resource}/         # CRUD views: index, show, form
├── middleware/                  # Full stack (see below)
└── static/css/                 # Tailwind source + compiled output

Middleware

Every app comes with a production-ready middleware stack — no configuration needed:

MiddlewareWhat it does
HealthGET /health returns 200
RequestIDX-Request-ID on every response
LoggerStructured JSON: method, path, status, latency
RecoveryCatches panics → 500
SecureHeadersHSTS, X-Frame-Options, CSP
CORSConfigurable via CORS_ALLOWED_ORIGIN
RateLimitToken bucket: 10 req/s, burst 40
SessionSCS cookie sessions
CSRFAuto token validation (skips /api/ routes)
FlashFlash messages: success, error, warning

Authentication

bash
catuaba new myapp --db postgres --auth

Generates a complete auth system:

  • GET /register — registration form
  • POST /register — create account
  • GET /login — login form
  • POST /login — authenticate
  • POST /logout — destroy session
  • RequireAuth() middleware — protects routes, redirects to /login

Passwords are hashed with bcrypt. Sessions use SCS (cookie-based, OWASP-compliant).


Database

Drivers

DriverFlagExample
PostgreSQL--db postgresDefault. Docker Compose included
MySQL--db mysqlDocker Compose included
SQLite--db sqliteZero config, file-based

Migrations

Raw SQL, versioned, up/down:

bash
# Auto-generated with models and scaffolds
database/migrations/20240101120000_create_posts.up.sql
database/migrations/20240101120000_create_posts.down.sql

# Manual migration
catuaba g migration add_slug_to_posts

# Run / rollback / check
catuaba db migrate
catuaba db rollback
catuaba db status

MCP Server (AI Integration)

Catuaba ships with a built-in MCP server. AI coding assistants (Claude Code, Cursor, Windsurf) can understand your project structure and generate code — without reading every file.

Setup

Every generated app includes a .mcp.json file — just open the project in Claude Code or Cursor and the MCP server is auto-discovered.

For manual setup, add to your .mcp.json or claude_desktop_config.json:

json
{
  "mcpServers": {
    "catuaba": {
      "command": "catuaba",
      "args": ["mcp"]
    }
  }
}

What the AI gets

Resources — your project as compact JSON:

ResourceReturns
catuaba://project/overviewModule, Go version, DB, port, plugins, directories
catuaba://project/modelsAll models with fields, types, tags
catuaba://project/routesAll routes: method, path, handler
catuaba://project/controllersAll controllers and functions
catuaba://project/middlewareAll middleware functions
catuaba://project/envEnv var names (no values)

Tools — generate code through the AI:

ToolWhat it does
generate_scaffoldFull CRUD: model + handlers + views + API + routes
generate_modelModel + SQL migration
get_modelInspect model details
get_routesList routes (filterable by prefix)
get_logsRecent app logs (filterable by level/path)
run_commandRun any catuaba generate subcommand
install_pluginInstall a plugin

Every generated app also includes a CLAUDE.md with framework conventions, so AI assistants follow the right patterns automatically.


Plugins

Extend Catuaba with plugins:

bash
catuaba install stripe-payments             # From registry
catuaba install https://github.com/user/my-plugin  # From git
catuaba install ./local-plugin              # From local path

catuaba plugin list                         # Browse registry
catuaba plugin info stripe-payments         # Details

Plugins are defined by a plugin.yaml manifest and can add files, inject routes, add imports, insert struct fields, and set environment variables.


Deploy

Docker (recommended)

bash
docker compose up -d --build

The generated Dockerfile is a multi-stage build:

  1. Installs Templ + builds templates
  2. Builds Tailwind CSS (minified)
  3. Compiles Go binary with -ldflags="-w -s"
  4. Runs on alpine:3.19 (~15MB image)

Manual

bash
make build
./bin/myapp

Development

Make targets

bash
make dev          # Hot-reload (templ + tailwind + wgo)
make build        # Production binary
make test         # go test ./...
make tidy         # go mod tidy
make docker-up    # Docker Compose up
make docker-down  # Docker Compose down

Contributing

Contributions are welcome!

bash
git clone https://github.com/dayvsonlima/catuaba.git
cd catuaba
go mod tidy
go test -v ./...
  1. Fork the repo
  2. Create your branch (git checkout -b feature/my-feature)
  3. Run tests (go test ./...)
  4. Submit a PR

License

MIT License — see LICENSE for details.

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "dayvsonlima-catuaba": {
      "command": "npx",
      "args": [
        "-y",
        "catuaba"
      ]
    }
  }
}

Use Catuaba MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Catuaba is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Catuaba as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Catuaba MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "dayvsonlima-catuaba": {
      "command": "npx",
      "args": [
        "-y",
        "catuaba"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Catuaba MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Catuaba MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Catuaba to help me with this task?
Catuaba
Sure. I read it.
Here is what I found using Catuaba.

Frequently asked questions

What is the Catuaba MCP server used for?

Catuaba is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Catuaba MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Catuaba with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Catuaba MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Catuaba connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Catuaba MCP to TypingMind?

Catuaba runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Catuaba MCP provide in TypingMind?

Catuaba exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Catuaba MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Catuaba requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇