PORTAL MCP

PortalMCP
What It Is
PortalMCP is a Model Context Protocol server that exposes smart contract tooling to Claude and other LLMs. Users describe what they want in natural language. Claude calls MCP endpoints to generate Solidity, compile it, and prepare deployment transactions. The user signs with their own wallet.
No private keys are stored or transmitted. All contract interactions require explicit user signature.
The Problem
Smart contract development requires:
- Solidity proficiency
- Familiarity with compilation toolchains (Hardhat, Foundry)
- Understanding of deployment scripts and gas estimation
- Manual transaction construction
Most users cannot deploy a token or NFT collection without significant technical setup.
The Solution
PortalMCP abstracts the development stack into MCP tool calls:
- User prompts Claude: "Deploy an ERC-20 token called TestToken with 1M supply"
- Claude calls
eth_generate_contractto produce Solidity - Claude calls
eth_compile_contractto get ABI and bytecode - Claude calls
eth_deploy_contractto prepare the deployment transaction - User signs the transaction in their wallet
- Contract is deployed
The same flow works for NFT collections, staking contracts, and custom Solidity.
Available Tools
Contract Pipeline
| Tool | Function |
|------|----------|
| eth_generate_contract | Generate Solidity from specification |
| eth_compile_contract | Compile to ABI + bytecode |
| eth_deploy_contract | Prepare deployment transaction |
| eth_call_contract | Read contract state |
| eth_send_transaction | Prepare write transaction |
Token Operations
| Tool | Function |
|------|----------|
| eth_create_token | Generate ERC-20 contract |
| eth_get_token_balance | Query token balance |
| eth_transfer_token | Prepare transfer transaction |
NFT Operations
| Tool | Function |
|------|----------|
| eth_create_nft_collection | Generate ERC-721 contract |
| eth_mint_nft | Prepare mint transaction |
| eth_get_nft_owner | Query NFT ownership |
DeFi Operations
| Tool | Function |
|------|----------|
| eth_create_staking_contract | Generate staking contract |
| eth_stake_tokens | Prepare stake transaction |
| eth_swap_tokens | Prepare swap via DEX |
Frontend
| Tool | Function |
|------|----------|
| generate_frontend | Create React UI for contract |
| deploy_dapp | Deploy frontend to hosting |
Security Model
PortalMCP is a tool server. It does not:
- Store private keys
- Sign transactions
- Hold custody of assets
- Execute transactions without user approval
All transactions are prepared and returned to the user for signing. Pre-signature simulation runs before any state-changing call.
Supported Networks
- Ethereum Mainnet
- Sepolia Testnet
- Base
- Arbitrum
- Optimism
- Polygon
Network selection via --network flag at server startup.
Development Status
| Milestone | Target | Status |
|---|---|---|
| Core tooling (ERC-20, NFT) | Q2 2025 | Complete |
| Frontend generator | Q3 2025 | Complete |
| Agent autonomy and looping | Q3 2025 | Planned |
| dApp templates | Q4 2025 | Planned |
| Multi-agent coordination | Q1 2026 | Planned |
Technology Stack
- FastAPI + Node.js for MCP endpoints
- Solidity compilation via Foundry
- Ethers.js for transaction preparation
- Claude API for natural language processing
Installation
Requirements
- Node.js v16+
- Ethereum wallet
- Claude API access
Setup
git clone https://github.com/portal-foundation/portalmcp.git
cd portalmcp
npm install
cp .env.example .env
# Add ANTHROPIC_API_KEY and INFURA_API_KEY to .env
npm run build
npm startClaude Configuration
Add to claude_desktop_config.json:
{
"mcpServers": {
"portalmcp": {
"command": "node",
"args": ["path/to/portalmcp/dist/index.js", "--network", "sepolia"]
}
}
}