hatchable-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| create_projectA | Create a new Hatchable project. This generates a URL slug, creates a dedicated PostgreSQL database, and returns the project ID and URLs. Call this first before writing files or creating tables. Project structureRouting precedenceMost-specific wins. For a request to
Catch-all params arrive as Static file resolution (public/)A request to
Step 4 means each folder with an Handler contractEvery file under api/ exports a default async function: req (Express-shaped)
res (Express-shaped)
SDK — import from "hatchable"That's the entire SDK. Everything else uses standard Node: DatabasePostgres. Write schema in migrations/*.sql. Files run in filename order, tracked in __hatchable_migrations so each runs once. Always use RETURNING to get inserted ids in the same round trip: Never call lastval() or LAST_INSERT_ID() — each db.query is a fresh connection, so session-local state doesn't carry across calls. Available Node.js APIs and packagesFunctions run in Node.js 20. The full hatchable SDK is always available. In addition, these packages are pre-installed and ready to import: sharp, puppeteer-core (with Chromium at /usr/bin/chromium), csv-parse, csv-stringify, xlsx, bcrypt, jsonwebtoken, uuid, date-fns, lodash, marked, sanitize-html, cheerio, xml2js, archiver, qrcode, stripe, openai. Standard Node.js APIs are available: fs, child_process, net, http, Buffer, stream, path, os, crypto, etc. External HTTP via global fetch(). Secrets via process.env (set with the set_env tool). VisibilityThree tiers — each one a step up in who the software is for:
Calling the API from public/At deploy time, Hatchable injects a tiny bootstrap into every HTML file: Use it as the base URL: Auth (optional)Enable auth in hatchable.toml to get a complete signup/login/session system with one config block. The platform auto-mounts /api/auth/* — do not write files under api/auth/ when auth is enabled. Auto-mounted endpoints:
Users live in these tables inside your project's own database: users, sessions, accounts, verifications You can extend the users table with your own columns: You CANNOT drop or rename users/sessions/accounts/verifications or create your own tables with those names — the deploy will fail with a clear error. In your API functions, auth.getUser works the same whether auth is enabled or not: OAuth providers need credentials set via DeployAfter writing files, call the |
| get_projectA | Get project details including slug, visibility, status, deployed functions, and the database schema (tables, columns, types). |
| list_projectsA | List all projects you own or collaborate on, with their visibility, tier, role, and current version. |
| deployA | Deploy the project. Runs migrations/*.sql (tracked so each runs once), runs seed.sql on first deploy, copies public/ files to the CDN, and registers api/ files as live endpoints. Increments the project version. Call this after writing all your files. To verify your functions work after deploying, use |
| write_fileA | Write or overwrite a project file. Paths are relative to the project root. Valid locations: public/** static files (HTML, CSS, JS, images, etc.) api/.js backend functions (each file is one endpoint) api/_lib/ shared helpers imported by api/ files, not routed migrations/*.sql database migrations, run in filename order seed.sql optional seed data, runs once on fresh installs hatchable.toml optional config overrides package.json dependencies (no build script yet) Files are stored but not live until you call |
| write_filesA | Write multiple project files in a single call. Same rules as write_file but batched — faster for scaffolding a new project or updating several files at once. Each entry in the files array has a path and content. All files are written atomically — if any path is invalid, none are written. |
| read_fileA | Read the content of a project file. Pass offset/limit to read a range of lines — useful for large files where the whole file would blow the context window. When either is set, the response includes cat -n style line-numbered content so subsequent patch_file calls can reference exact line numbers. |
| grepA | Regex content search across a project's files. Postgres-backed, scoped to one project, with glob filtering. Three output modes:
Default head_limit is 250 to prevent context blowups on broad patterns. Use glob to narrow by path (e.g. 'api//*.js', 'public//.html'). Regex uses Postgres syntax (~ / ~). Invalid or catastrophic patterns error out via a 2s statement timeout — simplify the pattern if that happens. |
| list_filesB | List all files in a project with their paths, sizes, and hashes. |
| patch_fileA | Apply a targeted edit to an existing project file without rewriting the entire file. Finds the first occurrence of The old_string must match exactly (including whitespace). If it's not found, the tool returns an error. To insert at a specific position, use a nearby string as old_string and include it in new_string with your addition. |
| delete_fileA | Delete a project file. Takes effect after the next deploy. |
| execute_sqlA | Run SQL against the project's dedicated PostgreSQL database. Supports: CREATE TABLE, ALTER TABLE, DROP TABLE, INSERT, SELECT, UPDATE, DELETE.
Use parameterized queries for safety: pass values in the Return format:
|
| get_schemaA | Return the database schema for the project's PostgreSQL database: tables, columns (with types), and indexes. |
| set_envA | Set environment variables for a project. Available in functions via process.env.KEY. Keys containing SECRET, PASSWORD, TOKEN, API_KEY, or PRIVATE are automatically marked as secrets. |
| set_visibilityA | Change a project's visibility.
|
| run_functionA | Execute a deployed function and return the real response. Use this to test your API endpoints. Returns: { status, headers, body, logs, error, duration_ms } Example: run_function({ project_id: 1, path: "/api/users", method: "GET" }) Example: run_function({ project_id: 1, path: "/api/users", method: "POST", body: { name: "Alice" } }) IMPORTANT: Always run_function on your API endpoints after writing them. Inspect the response body field names and types. Then write your frontend to match those exact names. |
| view_logsA | View function execution logs with rich filtering. Each entry includes status_code, duration_ms, log_output (captured console.log), error (if any), and a derived Filter by any combination of function_name, route, method, status_code (exact or 4xx/5xx wildcards), level, time range (since/until — ISO or relative like '1h'/'30m'/'7d'), full-text query across log_output and error, or specific request_id. Use this to debug production issues: e.g. |
| list_deploymentsA | List deployments for a project in reverse-chronological order. Each entry includes version, status, deployed_at, description, and summary counts (files, functions). Use this to understand recent deploy history, identify a known-good version for rollback, or debug a regression by comparing two versions. |
| list_functionsA | List every deployed API function for a project: route, method, runtime tier, cron schedule (if any), and 24-hour invocation and error counts. This is the 'what routes did I ship' introspection tool. Call it after a fork, after picking up an unfamiliar project, or to verify a deploy registered the endpoints you expected. Much cheaper than reading every api/ file with read_file. |
| get_deploymentA | Detail view of one deployment by version number — returns the full file manifest (paths, hashes, sizes) and function list captured when that version shipped. Use it with list_deployments to audit or compare what changed between versions. |
| list_cron_jobsA | List every scheduled (cron) function in a project with its cron expression, 7-day run count, error count, and last_run_at timestamp. Use this to verify a cron job is actually firing without tailing logs manually. |
| list_envA | List environment variable keys for a project. Only key names and an is_secret flag are returned — values are never exposed through this tool. Use process.env.KEY inside a deployed function to read the actual value. |
| delete_envA | Delete one or more environment variables by key. Pass |
| update_projectA | Update project metadata: name, tagline, description, category. Only the fields you pass are touched. For visibility changes use set_visibility; slug and tier are immutable. |
| import_file_from_urlA | Fetch a remote URL and save the response body as a project file — server-side, so the bytes never pass through your context window. Useful for seed data, vendor libs, and asset migration. Capped at 10 MB and 10s timeout. Private/loopback addresses are rejected. Path must live under public/, api/, or migrations/, or be one of seed.sql / hatchable.toml / package.json. |
| search_documentationA | Search Hatchable's own documentation for platform behavior — routing, the SDK surface, deploy semantics, auth config, runtime limits. Call this instead of guessing when you're unsure how a Hatchable feature works. Ranks results by term frequency across headed sections. Returns source file, section heading, and a snippet around the hit. |
| dry_run_deployA | Run every deploy-time validator against the project's current files without actually deploying. Returns Errors catch: package.json build scripts, reserved table names in migrations, auth route collisions, usage cap breaches. Warnings catch known runtime footguns that type-check but silently misbehave — most notably |
| upload_fileA | Multipart file upload for content that exceeds a single model response's output token cap (big SPA bundles, large seed data, inline vendor libs). Flow: first call with chunk_index=0 and NO upload_id — response returns an upload_id. Subsequent calls pass that upload_id with chunk_index=1, 2, 3…. Last call sets final=true to atomically concatenate and commit as one ProjectFile. Chunks are staged in Redis with a 10-minute TTL. chunk_index overwrites (safe to retry). Max chunk size: 64 KB. Max assembled file: 20 MB. |
| list_pending_uploadsA | Show multipart uploads currently staged for this project that haven't yet been committed. Use this to recover from a disconnect — find the upload_id and resume from the next chunk_index. Uploads expire 10 minutes after the last chunk was added. |
| run_codeA | Execute arbitrary JS in the project's isolate runtime with the same bindings a deployed function gets: Use this as a REPL: probe the database, verify a computation, test an API shape before committing it to a file. Nothing is persisted — the snippet runs once and disappears. Caps: 5s default timeout (max 30s), 256 KB max source length. Example:
run_code({ project_id, code: |
| fork_projectA | Fork a public project into your account. Copies all code and database schema (no data). The fork starts as a personal project you can modify freely. This is the recommended way to start from an existing app: fork it, then modify the code. |
| search_projectsA | Search the public Hatchable project directory — other people's projects that you can view or fork. Use this to find existing apps to fork-and-modify as a starting point. Note: this searches the public marketplace. To search inside your own project's files, use the |
| setup_accountA | Associate an email and handle with your account. Step 1: Call with just email — sends a 6-digit verification code. Step 2: Call with email + code + handle — verifies and completes setup. This lets you log in to the console and sets your permanent @handle. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| deploy-card |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Woobox/hatchable-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server