# ThirdWeb MCP

> ThirdWeb MCP lets your AI agent manage user identities and interact with smart contracts across multiple blockchains. Handle everything from OAuth sign-ins and passkey verification to reading contract data or executing complex token swaps, all through natural language prompts.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** web3, smart-contracts, wallet-management, authentication, ethereum

## Description

You can build Web3 features directly into your applications without writing a single blockchain interaction line. This MCP connects your agent to identity services and smart contracts across chains like Solana and Ethereum. Need to know if a user exists? You can use the `get_user_details` tool to search for profiles by email or address. When a new user signs up, you can start that process using `initiate_auth`, which supports social logins, email, and passkeys. Once authenticated, your agent can manage the wallet lifecycle—for example, creating a fresh wallet with `pregenerate_wallet`. Beyond identity, this MCP lets your agent interact with contracts. You can execute complex read-only calls to check data using `read_contract`, or you can trigger state changes, like sending tokens or executing swaps across chains. By connecting via Vinkius, you give your agent access to a full range of blockchain and identity operations, letting you focus on the application logic instead of the underlying protocols.

## Tools

### broadcast_solana_transaction
Sends a transaction signal to the Solana blockchain.

### complete_auth
Validates a code or challenge and finishes a user login process.

### create_solana_wallet
Generates a brand new digital wallet address on Solana.

### deploy_contract
Puts a smart contract onto the blockchain using bytecode and ABI definitions.

### execute_solana_swap
Trades one digital token for another on the Solana main network.

### fetch_with_payment
Runs a request against an external API that requires payment credentials.

### get_payment_requirements
Determines what is needed to pay for access to a specific resource.

### get_solana_balance
Checks the current balance of any specified Solana wallet.

### get_solana_swap_quote
Calculates how much one token will convert to another on Solana before a swap happens.

### get_transaction_status
Retrieves the current status (success, failed, pending) of a broadcasted transaction.

### get_user_details
Searches and retrieves existing user profiles based on criteria like address or email.

### get_wallet_me
Pulls the specific details of the user who is currently logged in through the agent.

### initiate_auth
Starts a new authentication process using email, phone number, or passkey methods.

### link_profile
Connects multiple separate social media accounts to one master wallet address.

### list_solana_wallets
Returns a list of known Solana wallet addresses for management purposes.

### list_transactions
Fetches a history listing of recent transactions associated with an address.

### pregenerate_wallet
Creates and saves a new wallet for a user before they ever log into the application.

### query_events
Retrieves all historical events that occurred from a specific contract.

### query_transactions
Fetches a detailed transaction log for a given smart contract address.

### read_contract
Runs one or more read-only calls on a contract, allowing you to view data without changing anything.

### send_raw_transactions
Broadcasts highly encoded transactions that bypass standard function calls.

### send_solana_tokens
Sends a specified amount of Solana tokens to another wallet address.

### settle_payment
Completes the payment process by writing the required data directly onto the blockchain.

### sign_solana_message
Creates a verifiable signature for a message on the Solana network.

### sign_solana_transaction
Signs a transaction payload to authorize its execution on Solana.

### social_auth
Handles standard OAuth procedures for logging in via major social media providers.

### unlink_profile
Separates a linked social identity from an existing wallet address.

### verify_payment
Confirms that a signed payment payload is valid and correctly formatted.

### write_contract
Executes one or more calls that modify the state of a contract, making changes permanent on-chain.

## Prompt Examples

**Prompt:** 
```
Read the total supply of the contract 0x123... on chain 1.
```

**Response:** 
```
I've executed the `read_contract` call. The total supply for the contract on Ethereum (Chain ID: 1) is 1,000,000 tokens.
```

**Prompt:** 
```
Start an email authentication for dev@example.com.
```

**Response:** 
```
I've triggered `initiate_auth` via email for dev@example.com. The user should receive a verification code shortly. Please provide the code to `complete_auth` when ready.
```

**Prompt:** 
```
Search for user details associated with address 0xAbc123...
```

**Response:** 
```
Using `get_user_details`, I found that this address is linked to User ID 'user_987' with the verified email 'admin@web3app.com'.
```

## Capabilities

### Manage User Authentication
Your agent can start user sign-ins using email, social media OAuth flows, or physical passkeys.

### Query On-Chain Data
Fetch historical contract events and read specific data points from any supported blockchain through multicalls.

### Execute Transactions
Initiate state changes like deploying contracts, sending tokens, or executing token swaps across mainnets.

### Handle Wallet Lifecycles
Your agent can create new wallets before a user signs up and retrieve details for authenticated users.

### Track Transaction Status
Check the status of any broadcasted transaction to ensure it completed successfully on-chain.

## Use Cases

### Onboarding a new user who only has an email.
A developer asks the agent to onboard a user. The agent first uses `initiate_auth` via email, prompts for the code, and then completes the login using `complete_auth`. This handles the entire secure identity flow in three steps.

### Checking if a token transfer was successful.
A product manager needs to validate an asset movement. They ask the agent to get the transaction status using `get_transaction_status` and then confirm the balance change with `get_solana_balance`. This confirms both execution and outcome.

### Building a smart contract audit tool.
An engineer wants to see exactly what happened last week. They ask the agent to query historical data using `query_events` or get detailed transaction logs with `query_transactions`, providing them with full context for debugging.

### Preparing a user profile before signup.
A backend service needs to guarantee that every new user has an address. Instead of waiting for the sign-up, it proactively calls `pregenerate_wallet` and then uses `get_user_details` to confirm the structure is ready.

## Benefits

- Identity management becomes conversational. You use `initiate_auth` to start a sign-up, and your agent handles the multi-step process (email code, social OAuth) without you needing separate authentication endpoints.
- Data querying is instant. Instead of building complex RPC calls for every piece of info, simply ask your agent to read contract data using `read_contract` or query history with `query_events`. The results come back immediately.
- Wallet setup and management are streamlined. You can pre-register users with `pregenerate_wallet`, so the wallet exists before they ever hit 'sign up.'
- Cross-chain operations simplify. Need to move assets? Your agent handles calculating quotes via `get_solana_swap_quote` and executing trades using `execute_solana_swap` across different chains.
- Your code stays clean. By routing complex logic—like a full token transfer, requiring signing with `sign_solana_transaction` and then calling `send_solana_tokens`—through the MCP, your application remains simple.

## How It Works

The bottom line is: you use natural language to trigger complex, multi-step actions across multiple blockchains without writing low-level code.

1. First, subscribe to this MCP and provide your specific API keys and secrets.
2. Next, link your agent to the Vinkius catalog. This gives your AI client access to all available Web3 tools.
3. Finally, ask your agent to perform a task—like 'check the balance of wallet X' or 'authenticate user Y'. The MCP translates that request into blockchain calls.

## Frequently Asked Questions

**How do I start user authentication with ThirdWeb MCP?**
You initiate the process using `initiate_auth`. This tool supports various methods like email, phone numbers, and social logins (via `social_auth`). You must follow up by completing the login flow using `complete_auth`.

**What is the difference between reading and writing contracts with ThirdWeb MCP?**
Use `read_contract` when you only need to view data, like checking a total supply. If you need to change anything—send tokens or update a record—you must use `write_contract`.

**How do I transfer Solana tokens using ThirdWeb MCP?**
First, check the current balance with `get_solana_balance`. Then, you can calculate the exchange rate with `get_solana_swap_quote`, and finally execute the transfer by calling `send_solana_tokens`.

**Can ThirdWeb MCP manage user profiles across different social networks?**
Yes. You use `link_profile` to tie multiple social identities (via `social_auth`) to a single wallet address, ensuring your user profile is comprehensive even if they use different logins.

**What should I do if a transaction fails?**
Always check the status after broadcasting with `get_transaction_status`. This tool tells you exactly why the transaction failed or if it's still pending confirmation on the chain.