How it works
02One file. Live in a minute.
An app is a single JavaScript file that exports fetch for web requests and tools for an MCP server. The platform serves your tools at /mcp, handles login, and gives your code a database, files and jobs through one object called ctx.
- Describe it
Paste our prompt into Claude or ChatGPT and say what you want. Or start from a template.
- Paste it
Create a project in the dashboard, pick the building blocks, paste the file and press Deploy.
- Share the address
Your app lives at your-name.commitd.ai. Your MCP server at /mcp. Connect it to any assistant.
app.jstools · resources · fetch
export default {
// MCP tools, served at /mcp
tools: {
'order_status': {
description: 'Look up the status of an order',
input: { type: 'object',
properties: { number: { type: 'string' } },
required: ['number'] },
async run(input, ctx) {
const user = ctx.auth.require();
const [o] = await ctx.db.query(
'SELECT * FROM orders WHERE number = ? AND email = ?',
input.number, user.email);
return o ?? 'No order with that number.';
},
},
},
// Read-only documents the assistant may open
resources: {
'returns-policy': { mimeType: 'text/markdown',
async read(ctx) { return await ctx.kv.get('policy'); } },
},
// Optional: a normal web page too
async fetch(req, ctx) {
return new Response('Hello');
},
};