# Lit Protocol MCP for AI Agents AI Agent Connect

> Lit Protocol MCP for AI Agents. Manage decentralized access control, Programmable Key Pairs (PKPs), and execute immutable Lit Actions within TEEs. This Connector lets your agent handle identity groups and secure execution logic directly.

## Overview
- **Category:** security-compliance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_wXGRfiZeEjfUmz1V2chJcoQebnyRlcPTgJT2C65b/ai-agent-connect
- **Tags:** web3, decentralized-auth, pkp, tee, lit-actions, access-control

## Description

This Connector connects your agent to Lit Protocol to handle decentralized identity and access control. Instead of manually juggling keys and permission sets, you can let your agent organize Programmable Key Pairs (PKPs) into specific groups and manage who gets access to what. It handles the heavy lifting of creating accounts and verifying them, while also managing scoped usage keys so you don't have to worry about over-privileged permissions. If you need to run code securely, this Connector lets your agent register and execute immutable JavaScript programs inside Trusted Execution Environments (TEEs). It's a way to move from manual Web3 security hurdles to a system where your agent handles the logic of decentralized permissions. You'll find this helpful when building dApps that need granular control without the usual friction. It's one of the many specialized tools available in the Vinkius catalog that makes interacting with complex protocols actually feel like a conversation. You can move beyond the headache of manual permission mapping and start focusing on your dApp's core logic. Whether you're setting up a new permission schema or need to quickly deploy a secure action, your agent handles the specific Lit Protocol calls for you. This means you get to maintain high security standards without the tedious work of manual configuration.

## Tools

### confirm_payment
Use confirm_payment to finalize your credit top-up after a successful payment. This ensures your account balance updates correctly.

### get_billing_balance
Use get_billing_balance to check your current credit balance. Use this to see how many Lit Actions you can still run.

### create_account
Use create_account to create a new account on the Lit Protocol. This is the first step to managing your decentralized identity.

### create_payment_intent
Use create_payment_intent to start a Stripe payment for at least $5.00. This helps you manage your Lit Protocol credits.

### create_wallet
Use create_wallet to request a new PKP for your account. You can use these as distributed identities for your dApp.

### execute_lit_action
Use execute_lit_action to run a Lit Action using either provided code or an IPFS ID. This executes your logic inside a TEE.

### list_actions
Use list_actions to view all currently registered actions. This helps you see what logic is available for execution.

### list_api_keys
Use list_api_keys to see a list of your usage keys and their metadata. This is useful for auditing your scoped permissions.

### list_wallets
Use list_wallets to see all PKPs owned by your account. This lets you manage your distributed identities in one place.

### remove_group
Use remove_group to delete an existing access group. Use this to clean up old permission schemas.

### remove_pkp_from_group
Use remove_pkp_from_group to remove a specific PKP from a group. This is how you revoke a wallet's access to a specific set of actions.

### remove_usage_api_key
Use remove_usage_api_key to delete a specific usage key. This helps you remove old or unused scoped permissions.

### update_usage_api_key
Use update_usage_api_key to change the permissions for an existing usage key. Use this to adjust what your agent can do.

### add_action_to_group
Use add_action_to_group to add an IPFS CID to a specific group. This links decentralized logic to a specific set of identities.

### add_action
Use add_action to register a new standalone action with a name and CID. This makes your logic available for execution.

### add_group
Use add_group to create a new access group. Use this to define a new set of permissions for your dApp.

### add_pkp_to_group
Use add_pkp_to_group to add a PKP to a specific group. This grants a specific wallet access to the group's actions.

### add_usage_api_key
Use add_usage_api_key to create a new scoped usage key. This lets you limit what your agent can do for specific tasks.

### check_account_exists
Use check_account_exists to verify if an account is active for your API key. Use this to ensure your connection is valid.

### list_groups
Use list_groups to view all your created access groups. This helps you manage your entire decentralized access schema.

## Prompt Examples

**Prompt:** 
```
Can you show me all the wallets I have and tell me which ones are in a group?
```

**Response:** 
```
I've retrieved your PKP wallets. Here is the current status:

| Wallet ID | Address | Group Membership |
| :--- | :--- | :--- |
| PKP #1 | 0x71C... | Admin Group |
| PKP #2 | 0x3A2... | Beta Testers |

Would you like to move any wallets to a different group or check their specific permissions?
```

**Prompt:** 
```
Register a new action for signing and put it in the Admin group.
```

**Response:** 
```
I've successfully registered the new signing action and linked it to your Admin group.

* **Action Name**: SignMessage
* **Status**: Registered in TEE
* **Assigned Group**: Admin

Your agent can now execute this action using any PKP that belongs to the Admin group.
```

**Prompt:** 
```
How much credit do I have left for Lit Actions?
```

**Response:** 
```
You have a remaining balance of **$42.50** in your Lit Protocol account.

This is enough for approximately 1,200 more Lit Action executions at the standard rate. Would you like me to initiate a top-up?
```

## Capabilities

### Create decentralized identities
Generate new PKPs for your account to act as distributed identities.

### Manage access groups
Organize PKPs and actions into specific permission sets.

### Execute secure code
Run JavaScript programs inside Trusted Execution Environments (TEEs).

### Control usage permissions
Create and update scoped usage keys to limit agent actions.

### Monitor account status
Check your current billing balance and verify account existence.

## Use Cases

### Creating a new permission group
A developer needs to set up a new Admin role. They ask the agent to use add_group to create it and then add_pkp_to_group to grant access to specific wallets.

### Running secure logic
A user wants to execute a signing script in a TEE. The agent uses add_action to register the code and execute_lit_action to run it securely.

### Auditing API keys
A security engineer needs to check permissions. They ask the agent to use list_api_keys to see all current scopes and update_usage_api_key to restrict one.

### Managing wallet identities
A dApp builder wants to see all active identities. The agent uses list_wallets to pull a list of all PKPs owned by the account.

## Benefits

- Manage PKPs with create_wallet and list_wallets to keep your distributed identities organized.
- Control permissions with add_group and add_pkp_to_group to define exactly who can access your dApp logic.
- Run secure code with execute_lit_action to perform tasks inside Trusted Execution Environments (TEEs).
- Secure your API keys with add_usage_api_key and update_usage_api_key to limit what your agent can do.
- Monitor your account with get_billing_balance and check_account_exists to stay on top of your Lit Protocol status.

## How It Works

The bottom line is you get a way to manage complex Web3 permissions using natural language.

1. Subscribe to the Connector and provide your Lit Protocol API Key.
2. Tell your agent to create a new group or register a Lit Action.
3. Get a confirmation that the decentralized identity or action is live.

## Frequently Asked Questions

**What does the Lit Protocol MCP do for my Web3 dApp?**
It allows your agent to manage decentralized identities and permissions. You can create access groups, manage wallets, and run secure code in TEEs without manual configuration.

**Can I use Lit Protocol MCP to manage my PKPs?**
Yes, your agent can list, create, and organize your Programmable Key Pairs (PKPs) into different groups to control who can perform specific actions.

**How does Lit Protocol MCP handle secure code execution?**
It lets your agent register JavaScript programs as Lit Actions and execute them inside Trusted Execution Environments (TEEs) for secure, private computation.

**Can my AI agent manage access groups with Lit Protocol MCP?**
Absolutely. Your agent can create new groups, add or remove wallets from those groups, and map specific actions to them to manage your security schema.

**Is the Lit Protocol MCP good for security audits?**
It's ideal for security engineers because it provides a way to query all usage keys and permission mappings in plain language, making it easier to audit your dApp's security.

**How do I use Lit Protocol MCP to manage my billing?**
Your agent can check your current credit balance and even initiate Stripe payment intents to top up your account, keeping your Lit Protocol usage active.

**Can I execute custom JavaScript code securely within a TEE?**
Yes! Use the `execute_lit_action` tool. You can provide either inline JavaScript code or an IPFS CID to run immutable programs inside Lit's Trusted Execution Environments.

**How do I see all the decentralized wallets (PKPs) associated with my account?**
Simply use the `list_wallets` tool. It will return all Programmable Key Pairs (PKPs) owned by your account, including their IDs and addresses.

**Is it possible to organize access control by grouping different identities?**
Absolutely. You can use `add_group` to create a new group and then `add_pkp_to_group` to manage which decentralized identities belong to that specific access schema.