Supports Alchemy as an Ethereum node provider for connecting to and interacting with Ethereum networks.
Provides comprehensive Ethereum blockchain operations including contract generation and deployment, ERC-20 token creation and transfers, NFT minting and management, DeFi staking, DEX token swaps, and general blockchain interactions like balance checking and transaction sending.
Provides OpenSea links for minted NFTs to view and manage NFT collections on the OpenSea marketplace.
PortalMCP - Universal AI Gateway to Ethereum
A multi-platform AI integration layer for Ethereum blockchain. Works with Claude, ChatGPT, Gemini, LLaMA, Mistral, and any LangChain-supported model. Deploy contracts, swap tokens, mint NFTs, and more - all through natural language.
π Supported AI Platforms
Platform | Integration | Status |
Claude Desktop | Native MCP | β Full Support |
ChatGPT | REST API / Custom GPT | β Full Support |
Cursor | Native MCP | β Full Support |
Windsurf | Native MCP | β Full Support |
OpenAI API | Function Calling | β Full Support |
Google Gemini | LangChain | β Full Support |
Mistral | LangChain | β Full Support |
Ollama | LangChain | β Full Support |
Any LLM | REST API | β Full Support |
Architecture Overview
PortalMCP bridges the gap between AI and blockchain, allowing you to perform complex Ethereum operations through simple natural language requests with ANY AI model.
Features
Contract Generation & Deployment
Generate Solidity code via Claude
Compile Solidity to bytecode
Deploy to network (user signs via wallet)
Token Operations (ERC-20)
Full ERC-20 creation flow
Check token balances
Transfer tokens
NFT Operations
Deploy NFT contracts
Mint NFTs
Check NFT ownership
DeFi Operations
Simple staking contracts
Stake tokens
DEX interactions
General Blockchain
Get ETH balance
Call any contract function
Send transactions
Installation
Prerequisites
Node.js v16 or higher
npm or yarn
An Ethereum wallet (MetaMask recommended)
Access to Claude API
Setup
Clone the repository
git clone https://github.com/PortalFnd/portalmcp.git cd portalmcpInstall dependencies
npm installCreate a
.envfile based on.env.examplecp .env.example .envAdd your API keys to the
.envfileANTHROPIC_API_KEY=your_claude_api_key INFURA_API_KEY=your_infura_key # or ALCHEMY_API_KEY=your_alchemy_keyBuild the project
npm run buildStart the MCP server
npm start
Quick Start by Platform
π£ Claude Desktop (Native MCP)
Add to claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS):
π’ ChatGPT (Custom GPT)
Start the REST API server:
npm run start:apiCreate a Custom GPT in ChatGPT
Add an Action with the OpenAPI spec from
http://localhost:3001/openapi.jsonFor production, deploy to a public URL and use that instead
π΅ OpenAI Assistants API
π‘ LangChain (Any LLM Provider)
π REST API (Universal)
Note: Replace paths and keys with your actual values. For testnet development, change
ETHEREUM_NETWORKtosepolia.
Example Conversations
Creating a Token
User: "Create an ERC-20 token called 'MyToken' with symbol 'MTK' and supply of 1 million"
Claude (using MCP tools):
Uses
eth_generate_contractto create Solidity codeShows you the code for review
Uses
eth_deploy_contractafter your approvalReturns contract address and details
Checking Balances
User: "What's my USDC balance on Ethereum?"
Claude: Uses eth_get_token_balance and responds: "Your USDC balance is 1,250.50 USDC"
NFT Creation
User: "Deploy an NFT collection called 'Digital Art' and mint token #1 to my address"
Claude:
Uses
eth_create_nft_collectionUses
eth_mint_nftProvides transaction hashes and opensea links
Security Model
Non-custodial: Never handle private keys
User approval: All transactions require user wallet signature
Code review: Show generated contracts before deployment
Network isolation: Support testnets for development
Available MCP Tools
Contract Operations
eth_generate_contract- Generate Solidity code via Claudeeth_compile_contract- Compile Solidity to bytecodeeth_deploy_contract- Deploy to network
Token Operations
eth_create_token- Create ERC-20 tokeneth_get_token_balance- Check token balanceeth_transfer_token- Transfer tokens
NFT Operations
eth_create_nft_collection- Create NFT collectioneth_mint_nft- Mint NFTeth_get_nft_owner- Check NFT ownership
DeFi Operations
eth_create_staking_contract- Create staking contracteth_stake_tokens- Stake tokenseth_swap_tokens- Swap tokens on DEX
General Operations
eth_get_balance- Get ETH balanceeth_call_contract- Call contract functioneth_send_transaction- Send transaction
Security
β οΈ Important Security Notes:
Never commit your - It contains sensitive API keys and private keys
Use testnets first - Always test on Sepolia before mainnet
Review transactions - Always review transaction details before signing
Private key safety - The
DEPLOYER_PRIVATE_KEYgives full control over that wallet
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT