GenHTTP Lambda Docs

Building apps

Connect an agent over MCP

Connect Claude Code, Cursor, VS Code, Claude or any other MCP client to your installation, what to ask for, how agents work on apps, and every tool they get.

Your installation has a Model Context Protocol endpoint at /mcp. An agent connected to it gets the platform as tools: it creates apps, writes and checks their code, tries changes in drafts, puts them online and reads their logs, records and visitors.

Connect#

The address is the installation’s public address followed by /mcp - https://lambda.example.com/mcp, or http://localhost:8080/mcp on your own machine. No key is needed to connect: each app’s editor key, which the agent passes with every call, is what authorizes it.

Claude Code

Run this once in a terminal. From then on, Claude Code can create and change apps from any project.

Shell

claude mcp add --transport http genhttp https://lambda.example.com/mcp

Cursor

Add this to the MCP settings of Cursor, or to ~/.cursor/mcp.json, and reload.

JSON

{
  "mcpServers": {
    "genhttp": { "url": "https://lambda.example.com/mcp" }
  }
}

VS Code

Save this as .vscode/mcp.json in your project, then start the server from the MCP view of Copilot Chat.

JSON

{
  "servers": {
    "genhttp": { "type": "http", "url": "https://lambda.example.com/mcp" }
  }
}

Claude

In Claude on the web or the desktop, open Settings, then Connectors, choose Add custom connector, and paste the address. Claude connects from the internet, so the installation needs a public HTTPS address.

Others

Codex, Windsurf, Zed and most other agents can add a remote MCP server (streamable HTTP) in their settings. Give them the address.

The installation’s Publish page (/ship) shows the same, with its own address filled in.

What to ask#

Talk about the app, not the platform. Some examples:

You want Say something like
a new app Build a guestbook, with a page where I approve the entries.
to publish what you built locally Publish this app on GenHTTP Lambda and send me the link.
a change Here is the editor link of the guestbook: … Let people add a photo to their entry.
to look first … Leave the change in a draft, I want to try it before it goes online.
an answer How many people visited the guestbook last week? Did anything fail?
a key The app needs the API key of our weather service - which name should I enter it under?

The agent answers a new app with its address and its editor link. Keep the link, and include it when you ask for the next change: the agent remembers nothing between conversations, and the link is the only way back in.

How agents work#

The endpoint tells every agent the same rules when it connects, and its first call is platform_guide, the platform’s guide for agents. It opens with whom the apps built here are for - you and the people around you, or colleagues at work where the operator says the installation is an organization’s (see Settings). From there:

  • A new app - create_lambda, then write_code with deploy: true, documentation and tests in the same save.
  • An app that exists - read_lambda (its documentation first), create_feature, changes with change_code and the feature, tried at the feature’s preview address, its tests run there, then merge_feature with deploy: true - or the preview handed to you to try.
  • Data - records in the database, uploads in the workspace, keys as secrets whose values you enter in the editor.
  • Failures - read_logs shows requests, output and stack traces; a deployment that does not compile returns the compiler’s messages, and whatever was online stays online.

Every save carries a one-line change and the specification - what you asked for and why, in your words. They are what the history shows you, and what the next agent reads.

The tools#

Tool Does
platform_guide the guide for agents: how apps are built here, read first
list_demos the demos, to read before writing something similar
create_lambda creates an app, empty or as a copy of a demo; returns its address and editor key
update_lambda sets whether its editor opens in the simple or the full view
read_lambda its state, documentation, history, drafts, data and files
write_code saves every file, as a new version or into a draft
change_code changes some files, or a passage within one
check_code compiles without saving
deploy puts a version online, or a draft’s preview
create_feature, update_feature starts a draft; renames it or moves its base
merge_feature, delete_feature puts a draft’s files into the next version; discards a draft
read_logs requests, output and errors of the app or a draft’s preview
enable_data switches on the database, the workspace or secrets
read_database tables and rows, read only
upload_file, list_files, delete_file the workspace
list_secrets, set_secret, delete_secret secrets by name; a value only when you hand it over
request_connectivity asks the operator to let the code connect to other servers
analytics who visits; switches counting on when you ask
open_source publishes its code under a license - only when you ask

Each tool describes itself, its arguments and how it may refuse to the agent; the REST API offers the same operations, and one more: listing an app on the showcase. Its picture is too large for a tool call, so an agent that can make HTTP requests sends it to the API from a file, as the guide shows it, and one that cannot asks you to list the app in the editor.

Rules of your own#

The operator can add a section to the guide every agent reads first: the architecture you prefer, the language of the apps, the colours of your organisation, data they must not keep. It is written in the admin panel under Guide. See The admin panel.

Good to know#

  • Give agents the editor link, nobody else. It grants full control of that one app. Agents never need the values of your secrets.
  • Browser-based MCP clients can only use the endpoint from origins listed in LAMBDA_MCP_ORIGINS. Agents that speak HTTP directly are not affected.
  • For whoever runs the installation, what the admin panel does is on an endpoint of its own, /admin/mcp, behind the admin token - no agent here is shown it. See Your own agent. Until 0.8.0, customize_installation was a tool here, with the token as an argument; it moved there.
  • Apps can offer tools too. An app may serve an MCP endpoint of its own, for agents to use what it does - demo-crud shows how. See App code.