• DEPLOY
  • EXECUTE
  • AUDIT
  • REVIEW

How to run Lit Actions in TEEs with your AI

Connect your AI to Lit Protocol to execute code in secure, isolated environments. This lets your agent handle sensitive logic without exposing it to the broader web.

Ask AI about this page

Short answer

How can I run secure code with my AI using Lit?

You give your AI the ability to trigger JavaScript execution within a Trusted Execution Environment (TEE) via Lit Protocol. This setup ensures your code runs in a private, isolated space using either inline code or IPFS IDs. You get a breakdown of the setup and execution flow below.

Execution outcomes

Where your logic lands

Once connected, your AI manages these specific states.

DEPLOY

New secure actions

Your AI registers new JavaScript logic to the protocol. This creates a new entry that can be triggered later.

EXECUTE

Isolated code runs

The agent triggers the code to run inside the TEE. The logic stays private and isolated from the rest of the system.

AUDIT

View existing actions

Your AI pulls a list of all currently registered actions. This helps you keep track of what logic is available to run.

REVIEW

Human oversight

The AI presents the code or the result to you. You decide if the execution was correct before moving to the next step.

The workflow

What your AI does when the request arrives.

The AI handles the heavy lifting of interacting with the Lit Protocol registry and the TEE.

  1. Register logic

    The agent takes your code or an IPFS ID and adds it to the protocol as a new executable action.

    add_action
  2. Check availability

    The AI looks through the existing registry to find the specific action it needs to run.

    list_actions
  3. Trigger execution

    The agent calls the specific action to start the JavaScript execution inside the TEE.

    execute_lit_action
  4. Verify results

    The AI retrieves the output from the isolated environment and presents it to you for review.

    execute_lit_action

Try it

Copy these to start.

Use these prompts to begin interacting with Lit Protocol.

Starting points

Swap out the bracketed text with your actual code snippets or IPFS hashes.

Lit Protocol Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_wXGRfiZeEjfUmz1V2chJcoQebnyRlcPTgJT2C65b/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Lit Protocol capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "lit-protocol-decentralized-access-control-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_wXGRfiZeEjfUmz1V2chJcoQebnyRlcPTgJT2C65b/mcp"
    }
  }
}
Copy into chat04
  • Add a new Lit action using this JavaScript code: [paste code here]

  • List all the Lit actions currently registered in the protocol.

  • Execute the Lit action with this IPFS ID: [paste IPFS ID]

  • Find the action named [action name] and run it.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Lit Protocol once, then ask.

Just link your account once. Your credentials stay encrypted, and you can immediately start asking your AI to manage TEE actions.

Connect Lit Protocol to your AI

FAQ

How the Lit Protocol MCP behaves

  • 01

    Can my AI delete an existing action?

    No. The current tools only allow for adding, listing, and executing actions.

  • 02

    Does the AI see the private data inside the TEE?

    No. The execution happens in an isolated environment. The AI only sees the output you permit it to see.

  • 03

    Can I run code that isn't in JavaScript?

    No. The actions are specifically designed for JavaScript execution within the TEE.

  • 04

    How does the AI know which actions are available?

    The AI uses the list tool to fetch the current registry of actions from the protocol.

  • 05

    Can the AI change the code of an action after it is added?

    No. You must add a new action if you want to change the logic.

  • More questions about Lit Protocol? See everything the Lit Protocol Connector can do

Connect Lit Protocol to Claude, Cursor, ChatGPT & more