Pick your app

The examples below will be updated with your app ID.

Introduction

Using Superlayer with LLMs

You can supercharge your Superlayer experience by using it with LLMs. Just add our Superlayer rules and you're off to the races!

#Superlayer Skill

The fastest way to add rules to your LLM tool is to add the Superlayer skill.

npx skills add superlayer/skills

This will give your agent the context it needs to work with Superlayer.

You can verify you set up the rules correctly by asking your LLM "How do you make queries and transactions in Superlayer?" If everything is set up correctly, you should see a response with information about db.useQuery and db.transact.

If you'd prefer to manually install the rules instead, see the section below.

#Superlayer Rules

We've created a set of rules to help LLMs understand how Superlayer works. If you start a new project with @superlayer/create-app you'll get these rules automatically. If you have an existing project you can add the rules manually.

Save these rules at the root of your project as:

  • CLAUDE.md for Claude Code
  • GEMINI.md for Gemini
  • AGENTS.md for Codex, Cursor, Windsurf, Zed, and other tools

You may need to restart your editor for the rules to take effect.

#Markdown Docs and llms.txt

You can attach .md to the end of any doc page URL to get raw Markdown. This can be helpful to paste into your LLM if you're stuck on particular functionality. For example, here are the recommended docs for adding auth.

We recommend starting with the rules files above and adding more docs as needed. If you want though you can get all our docs at once in markdown format via llms-full.txt

#Superlayer MCP Server

We built @superlayer/mcp to enable creating, managing, and updating your Superlayer apps. Combine the MCP with our rules file to build full-stack apps directly in your editor.

The easiest way to get started is to use our hosted remote MCP server. Use the instructions below to add the Superlayer MCP server to your favorite LLM editor or tool.

When you add the MCP server, you'll be sent through an OAuth flow to grant access to your Superlayer Account.

#Cursor

Install MCP Server

Or edit your ~/.cursor/mcp.json directly:

{
"mcpServers": {
"superlayer": {
"url": "https://mcp.interfacedb.com/mcp"
}
}
}

#Claude Code

If you're on a paid Claude plan, you can add the server via the command line:

claude mcp add superlayer -s user -t http https://mcp.interfacedb.com/mcp

Now you can run claude to start Claude Code and then run /mcp to see your list of MCP servers. superlayer should be listed there. Select it and go through the auth flow to enable the Superlayer MCP server in your Claude Code sessions!

#Codex

If you're on a paid OpenAI plan, you can add the server via the command line:

Edit your ~/.codex/config.toml to include the rmcp_client feature:

[features]
rmcp_client = true

Tell Codex to add the MCP server:

codex mcp add superlayer --url "https://mcp.interfacedb.com/mcp"

This should load a browser to authenticate with Superlayer.

Now run codex to start Codex. You can run /mcp to see Superlayer in your list.

#Gemini

If you're on a paid Google AI plan, you can add the server via the command line:

gemini mcp add --transport http superlayer https://mcp.interfacedb.com/mcp

This should load a browser to authenticate with Superlayer.

Now run gemini to start Gemini. You can run /mcp to see Superlayer in your list.

#Windsurf

You can add the Superlayer MCP server through the Windsurf UI:

  1. Open Windsurf Settings.
  2. Under Cascade, you'll find Model Context Protocol Servers.
  3. Select Add Server and paste the relevant snippet for your OS.

Alternatively, you can directly edit your ~/.codeium/windsurf/mcp_config.json:

macOS/Linux

{
"mcpServers": {
"superlayer": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.interfacedb.com/sse"]
}
}
}

Windows

{
"mcpServers": {
"superlayer": {
"command": "cmd",
"args": ["/c", "npx", "-y", "mcp-remote", "https://mcp.interfacedb.com/sse"]
}
}
}

Windows WSL

{
"mcpServers": {
"superlayer": {
"command": "wsl",
"args": ["npx", "-y", "mcp-remote", "https://mcp.interfacedb.com/sse"]
}
}
}

#Zed

Open your Zed settings and add the following:

{
"context_servers": {
"superlayer": {
"command": {
"path": "npx",
"args": ["-y", "mcp-remote", "https://mcp.interfacedb.com/mcp"],
"env": {}
},
"settings": {}
}
}
}

#Other Tools

For other tools that support MCP servers, you can configure Superlayer using either our streamable HTTP endpoint (recommended if your tool supports it):

https://mcp.interfacedb.com/mcp

or our SSE endpoint:

https://mcp.interfacedb.com/sse

#Local MCP server

We recommend using our hosted MCP server, but we also support running @superlayer/mcp locally via stdio. This will avoid OAuth but requires you to manage your personal access token.

#Get your Personal Access Token

If you haven't already, make sure to get a personal access token from your Superlayer dashboard

Once you have your token, you can set up the local Superlayer MCP server in your favorite editor with MCP support.

#Cursor/Windsurf/Cline

You can set up the Superlayer MCP server in Cursor, Windsurf, or Cline by adding the following configuration to your MCP settings:

macOS/Linux

{
"mcpServers": {
"superlayer": {
"command": "npx",
"args": ["-y", "@superlayer/mcp", "--token", "<token>"]
}
}
}

Windows

{
"mcpServers": {
"superlayer": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@superlayer/mcp", "--token", "<token>"]
}
}
}

Windows WSL

{
"mcpServers": {
"superlayer": {
"command": "wsl",
"args": ["npx", "-y", "@superlayer/mcp", "--token", "<token>"]
}
}
}

Replace <token> with your personal access token. Save the file and reload the editor! You should now see the Superlayer MCP server active and enabled!

#Zed

Open your Zed settings and add the following:

{
"context_servers": {
"superlayer": {
"command": {
"path": "npx",
"args": ["-y", "@superlayer/mcp", "--token", "<token>"],
"env": {}
},
"settings": {}
}
}
}

Replace <token> with your personal access token. Save the file and reload the editor. You should now see the Superlayer MCP server active and enabled!

#Claude Desktop

You can set up the Superlayer MCP server in Claude Desktop by following these steps:

  1. Open the file ~/Library/Application Support/Claude/claude_desktop_config.json
  2. Add the following configuration to the claude_desktop_config.json file:
{
"mcpServers": {
"superlayer": {
"command": "npx",
"args": ["-y", "@superlayer/mcp", "--token", "<token>"]
}
}
}

Replace <token> with your personal access token. Save the file and restart Claude Desktop. You should now see the Superlayer MCP server active and enabled!

#MCP Tools

Below is a list of the current tools we expose:

  • learn Fetch rules files if needed to help the LLM understand Superlayer.
  • get-schema Retrieves the schema for a specific app.
  • get-perms Retrieves permission rules for an app.
  • push-schema Applies schema changes to an app.
  • push-perms Updates permission rules for an app.

If you are an LLM trying to learn how to develop with Superlayer, here are all of the links to the docs:

Getting started w/ ReactGetting started w/ React NativeGetting started w/ Vanilla JSGetting started w/ SolidJSGetting started w/ SvelteGetting started w/ VueGetting started w/ TanStack StartGetting started w/ PythonCreate Superlayer AppConnecting to SuperlayerRecommended WorkflowUsing LLMsInitModeling dataWriting dataReading dataInfinite QueriesSuperlayer on the backendPatternsAuthMagic codesGuest AuthGoogle OAuthSign In with AppleGitHub OAuthLinkedIn OAuthClerkFirebase AuthPermissionsRate LimitsManaging usersPresence, Cursors, and ActivitySuperlayer CLIDevtoolPlatform APIExplorer ComponentCustom emailsApp teamsStorageStreamsWebhooksBackupsStripe PaymentsAdmin HTTP API(Experimental) Next.js SSROverviewVPSAWSMigrate from Superlayer Cloud
Using Superlayer with LLMs