Preview. The Allternit Apps SDK packages and the allternit CLI are not published to npm yet, so the install commands on this page do not work outside the Allternit repository today. To build an MCP App now, follow the Quickstart, which uses the open MCP SDK directly. Your app will not need changes to adopt the SDK later.
This quickstart builds a weather app with the Apps SDK. One file defines three layers:
  • Server: get_temperature, a data tool with no UI, and show_weather, a render tool.
  • View: a detail card from the view kit, shown in chat when show_weather runs.
  • Look pack: the design tokens the card reads.
The SDK sits on the open MCP Apps standard. The app it builds is an ordinary MCP server, so it works in any host that supports MCP Apps. Prefer to write every line yourself? See the same app without the SDK.
This server has no authentication so the example stays short. A server that reads or changes user data must require OAuth. See Authentication.

1. Create the app

The scaffold is five files. server.ts is the whole app.

2. Read the server

server.ts
Things to notice:
  • appTool will not build a tool unless you state readOnlyHint and destructiveHint. Permission prompts and directory review depend on them.
  • view: card ties show_weather to the View. The SDK sets _meta.ui.resourceUri (and the older flat key) for you.
  • The render tool returns content (text the model reads) and structuredContent (data the View reads).
  • The View has no network access. view() declares an empty CSP unless you add domains.

3. Run it

allternit dev starts the server on port 3000 and prints the MCP URL, the manifest URL and the command to add it as a connector.

4. Test it

allternit test runs the same rules directory review runs (annotations, descriptions, CSP), then starts the server and checks what a real MCP client sees: the tools, the ui:// resource and its MIME type. It exits non-zero on errors.

5. Make the server reachable and connect it

Allternit connects to your server from its own infrastructure, so the URL must be public and use https. Connector URLs that resolve to loopback, private, or link-local addresses are refused. During development, expose your local port through a tunnel. Then add the server as a connector. This request uses the connector API:
If you run your own Allternit API for development, set ALLTERNIT_MCP_ALLOW_PRIVATE_CONNECTORS=1 on it to allow connectors that resolve to a local address.

6. See it render

Start a chat and ask: “Show me the weather in Tokyo.” The model calls show_weather, and the card appears in the conversation, styled by your look pack. If it does not, see Troubleshooting.

7. Package it

This writes weather.zip in the layout Package your plugin describes.

Next steps