PortalMCP
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.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PortalMCPdeploy a simple ERC-20 token contract for my project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π PortalMCP
Universal AI gateway to Ethereum
One server. Every AI. The whole chain.
Plug any Model-Context-Protocol client β Claude, ChatGPT, Gemini, Cursor, Windsurf, Cline, custom agents β into Ethereum with natural language. Check balances, swap tokens, mint NFTs, generate and deploy smart contracts.
Quick start Β· Setup Β· Tools Β· Roadmap Β· Changelog
β¨ Why PortalMCP
Most AI-blockchain integrations lock you to one LLM or one client. PortalMCP is a spec-compliant MCP server β the same server, running locally or on your VPS, powers every MCP-capable client.
π Non-custodial β private keys never leave your machine π°οΈ Live chain context β resources stream ETH balances, tx receipts and token metadata straight into your chat π‘οΈ Safety-first β every tool declares read/destructive/idempotent hints so clients can confirm before broadcasting π§© Universal β works over both stdio and HTTP, plays with every MCP client out there
π§ Compatible clients
Client | Transport | Notes |
π£ Claude Desktop (macOS/Windows) | stdio | Drop-in config below |
π Claude.ai web + mobile | HTTP | Add as Custom Connector (Pro/Team/Enterprise) |
π» Claude Code / CLI | either | |
π§ Cursor Β· Windsurf Β· Cline Β· Continue Β· Zed AI | stdio | Native MCP |
π¬ ChatGPT (Team/Enterprise) | HTTP | MCP connector |
π οΈ ChatGPT Custom GPTs | REST | Uses bundled |
β΄οΈ Google Gemini / Vertex Agents | HTTP | MCP connector |
π LangChain Β· LlamaIndex Β· OpenAI Agents SDK | either | via their MCP adapters |
π€ Any HTTP agent | HTTP | Plain JSON-RPC + SSE on |
π― What it can do
β‘ General
Tool | Action |
| ETH balance of any address or the default wallet |
| Read-only call against any contract + ABI |
| Prepare a generic unsigned transaction |
π Smart contracts
Tool | Action |
| Claude-authored Solidity from natural language |
| solc compile β bytecode + ABI |
| Prepare deployment tx for external wallet signing |
| Deploy directly using |
πͺ ERC-20 tokens
Tool | Action |
| Generate ERC-20 Solidity |
| ERC-20 balance of any holder |
| Signed transfer or unsigned-tx prep |
πΌοΈ ERC-721 NFTs
Tool | Action |
| Generate ERC-721 Solidity |
| Prepare |
|
|
π¦ DeFi
Tool | Action |
| Generate staking Solidity |
| Prepare approve + stake txs |
| Universal Uniswap V3 swap (any ERC-20 pair) |
| Convenience alias of the above |
URI | Returns |
| Configured signer address, network, ETH balance |
| Live ETH balance for any address |
| Transaction + receipt (status, gas, block, logs, explorer URL) |
| ERC-20 metadata (name, symbol, decimals, total supply) |
/swap_tokensβ guided token-swap flow/deploy_erc20β generate β compile β deploy end-to-end
π Quick start
git clone https://github.com/PortalFnd/PortalMCP.git
cd PortalMCP/portalmcp
npm install
cp .env.example .env
# fill in .env β ANTHROPIC_API_KEY, DEPLOYER_PRIVATE_KEY,
# and ETHEREUM_RPC_URL (or a real ALCHEMY_API_KEY)
npm run build
npm run smoke # β 17 tools / 1 resource / 3 templates / 2 prompts
npm start # stdio (Claude Desktop, Cursor, β¦)
# or
npm run start:http # Streamable HTTP on http://0.0.0.0:3333/mcpπ Client setup
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"portalmcp": {
"command": "node",
"args": ["/absolute/path/to/PortalMCP/portalmcp/dist/index.js"],
"env": {
"ETHEREUM_NETWORK": "mainnet",
"ETHEREUM_RPC_URL": "https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY",
"DEPLOYER_PRIVATE_KEY": "0x...",
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}Restart Claude Desktop. 17 tools, eth:// resources, and two slash commands appear automatically.
Host the HTTP server with a public HTTPS URL (Caddy / Cloudflare Tunnel / Nginx).
Set
MCP_HTTP_TOKEN=<long-random-string>so only you can call it.In Claude.ai β Settings β Connectors β Add Custom Connector:
URL:
https://your-host.example.com/mcpAuth:
Authorization: Bearer <MCP_HTTP_TOKEN>
Works on both web and the mobile app.
All speak MCP natively. Add an entry to their MCP config pointing at:
node /absolute/path/to/PortalMCP/portalmcp/dist/index.js(Same stdio command as Claude Desktop.)
Preferred β MCP connector (ChatGPT Team/Enterprise, Gemini/Vertex Agents):
Point at https://your-host/mcp, optionally with a Bearer token.
Legacy REST (ChatGPT Custom GPT Actions or any HTTP agent):
npm run start:api
# OpenAPI spec: http://localhost:3001/openapi.json㪠Example conversations
Deploy a token from scratch
"Deploy an ERC-20 called PortalToken (PRTL) with initial supply 1,000,000."
β
eth_generate_contractβ shows code βeth_compile_contractβeth_deploy_contract_with_signerβ returns the contract address + Etherscan link.
Universal swap
"Swap 0.01 ETH for USDC."
β
eth_swap_tokens { tokenIn:"ETH", tokenOut:"USDC", amount:"0.01" }β approves (if needed) and executes via Uniswap V3.
Live on-chain context
"What's the balance of
vitalik.eth?"β client attaches the
eth://balance/0xd8dAβ¦resource straight into the conversation.
βοΈ Configuration
All via env vars (.env file or host env). Full list in .env.example.
Var | Required | Purpose |
| β |
|
| β | Full JSON-RPC URL β overrides Infura/Alchemy key setup |
| alt | Key only β PortalMCP builds the modern |
| alt | Infura project ID |
| writes |
|
| generate | For |
| β | Override default |
| β | Default |
| β | Default |
| π‘οΈ | Bearer token for the HTTP transport |
| β | Default |
π‘ Placeholder detection β any env value starting with
your_,changeme,xxx,placeholder,<β¦>is treated as unset. Stops silent misconfigurations dead.
π Networks supported
π‘οΈ Security
π« Never commit
.envβ already in.gitignore.π
DEPLOYER_PRIVATE_KEYis a loaded gun. Use a dedicated agent wallet with only funds you can lose.π°οΈ Always set
MCP_HTTP_TOKENwhen exposing HTTP beyond localhost, and put TLS (Caddy/Cloudflare) in front.π§ͺ Testnet first β use
sepoliafor development, mainnet only after you've verified the flow.π·οΈ Tool annotations let clients prompt before destructive txs β don't auto-approve them.
π Review generated Solidity β
eth_generate_contractis a starting point, not an audit.
π§βπ» Development
npm install
npm run dev # stdio, ts-node hot-reload
npm run dev:http # HTTP, ts-node
npm run build # tsc β dist/
npm run smoke # assert MCP surface is registered
npm test # JestScript | Purpose |
| stdio MCP server (prod) |
| Streamable HTTP MCP server (prod) |
| Legacy REST for ChatGPT Actions / HTTP clients |
| Registration smoke test β great for CI |
Repo layout
portalmcp/
βββ src/
β βββ index.ts # stdio entrypoint
β βββ mcp-http.ts # Streamable HTTP entrypoint
β βββ server-factory.ts # createPortalServer() β shared wiring
β βββ smoke-test.ts # CI registration check
β βββ tools/ # general Β· contracts Β· defi Β· tokens Β· nfts
β βββ blockchain/ # EthereumService Β· CompilerService
β βββ claude/ # ContractGenerator (Anthropic SDK)
β βββ contracts/ # Solidity templates
β βββ adapters/ # Legacy REST / LangChain / OpenAI adapters
βββ dist/ # tsc output
βββ .env.example
βββ package.jsonποΈ Architecture
stdio Streamable HTTP (SSE)
βββββββββββββββββββββββ βββββββββββββββββββββββββββββββ
β Claude Desktop β β Claude.ai web + mobile β
β Cursor Β· Windsurf β β ChatGPT Β· Gemini β
β Cline Β· Continue β β Custom agents β
βββββββββββ¬ββββββββββββ ββββββββββββββββ¬βββββββββββββββ
β β
β ββββββββββββββββββββββββ β
βββββββββΆβ PortalMCP server βββββββββββββββ
β (server-factory.ts) β
ββββββββββββ¬ββββββββββββ
β
ββββββββββββββββββββββββΌβββββββββββββββββββββββ
βΌ βΌ βΌ
EthereumService Uniswap V3 Anthropic
(ethers v6 + (eth_swap_tokens) (eth_generate_contract)
Alchemy/Infura/
custom RPC)πΊοΈ Roadmap highlights
Full plan in ROADMAP.md.
π€ Contributing
PRs welcome! Priority areas: more outputSchema coverage, additional tools, Docker packaging, Python client, test coverage. Open an issue first for non-trivial changes.
β Star this repo Β· π Report an issue Β· π MIT License
Built with π by the Portal Foundation
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PortalFnd/PortalMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server