PortalMCP
🌐 PortalMCP
イーサリアムへのユニバーサルAIゲートウェイ
1つのサーバー。すべてのAI。チェーン全体を操作。
Claude、ChatGPT、Gemini、Cursor、Windsurf、Cline、カスタムエージェントなど、あらゆるModel-Context-Protocol(MCP)クライアントを自然言語でイーサリアムに接続します。残高確認、トークンのスワップ、NFTのミント、スマートコントラクトの生成とデプロイが可能です。
クイックスタート · セットアップ · ツール · ロードマップ · 変更履歴
✨ PortalMCPを選ぶ理由
ほとんどのAIとブロックチェーンの統合は、特定のLLMやクライアントに縛られます。PortalMCPは仕様に準拠したMCPサーバーであり、ローカルまたはVPS上で実行することで、MCP対応のあらゆるクライアントを強化します。
🔐 非カストディアル — 秘密鍵は決してマシンから離れません 🛰️ ライブチェーンコンテキスト — ETH残高、取引レシート、トークンメタデータをチャットに直接ストリーミングします 🛡️ 安全性重視 — すべてのツールが読み取り/破壊的/冪等性のヒントを宣言するため、クライアントはブロードキャスト前に確認できます 🧩 ユニバーサル — stdioとHTTPの両方で動作し、すべてのMCPクライアントと連携します
Related MCP server: MCP Crypto Wallet EVM
🧭 対応クライアント
クライアント | トランスポート | 備考 |
🟣 Claude Desktop (macOS/Windows) | stdio | 下記の設定を参照 |
🌐 Claude.ai web + mobile | HTTP | カスタムコネクタとして追加 (Pro/Team/Enterprise) |
💻 Claude Code / CLI | いずれか | |
🧠 Cursor · Windsurf · Cline · Continue · Zed AI | stdio | ネイティブMCP |
💬 ChatGPT (Team/Enterprise) | HTTP | MCPコネクタ |
🛠️ ChatGPT Custom GPTs | REST | バンドルされた |
✴️ Google Gemini / Vertex Agents | HTTP | MCPコネクタ |
🐍 LangChain · LlamaIndex · OpenAI Agents SDK | いずれか | MCPアダプター経由 |
🤖 任意のHTTPエージェント | HTTP |
|
🎯 できること
⚡ 一般
ツール | アクション |
| アドレスまたはデフォルトウォレットのETH残高 |
| 任意のコントラクトとABIに対する読み取り専用呼び出し |
| 未署名の汎用トランザクションの準備 |
📜 スマートコントラクト
ツール | アクション |
| 自然言語からClaudeが作成したSolidityコード |
| solcコンパイル → バイトコード + ABI |
| 外部ウォレット署名用のデプロイトランザクション準備 |
|
|
🪙 ERC-20トークン
ツール | アクション |
| ERC-20 Solidityの生成 |
| 任意の保有者のERC-20残高 |
| 署名済み転送または未署名トランザクションの準備 |
🖼️ ERC-721 NFT
ツール | アクション |
| ERC-721 Solidityの生成 |
|
|
|
|
🏦 DeFi
ツール | アクション |
| ステーキング用Solidityの生成 |
| 承認 + ステーキングトランザクションの準備 |
| ユニバーサルUniswap V3スワップ (任意のERC-20ペア) |
| 上記の便利なエイリアス |
URI | 戻り値 |
| 設定された署名者アドレス、ネットワーク、ETH残高 |
| 任意アドレスのライブETH残高 |
| トランザクション + レシート (ステータス、ガス、ブロック、ログ、エクスプローラーURL) |
| ERC-20メタデータ (名前、シンボル、小数点、総供給量) |
/swap_tokens— ガイド付きトークンスワップフロー/deploy_erc20— 生成 → コンパイル → デプロイのエンドツーエンド実行
🚀 クイックスタート
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🔌 クライアントセットアップ
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) または %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-..."
}
}
}
}Claude Desktopを再起動します。17個のツール、eth://リソース、および2つのスラッシュコマンドが自動的に表示されます。
パブリックHTTPS URL(Caddy / Cloudflare Tunnel / Nginx)を使用してHTTPサーバーをホストします。
MCP_HTTP_TOKEN=<長いランダム文字列>を設定し、自分だけが呼び出せるようにします。Claude.ai → 設定 → コネクタ → カスタムコネクタを追加:
URL:
https://your-host.example.com/mcp認証:
Authorization: Bearer <MCP_HTTP_TOKEN>
Webおよびモバイルアプリの両方で動作します。
すべてMCPをネイティブにサポートしています。MCP設定に以下を指すエントリを追加してください:
node /absolute/path/to/PortalMCP/portalmcp/dist/index.js(Claude Desktopと同じstdioコマンドです。)
推奨 — MCPコネクタ (ChatGPT Team/Enterprise, Gemini/Vertex Agents):
https://your-host/mcp を指定し、必要に応じてBearerトークンを使用します。
レガシーREST (ChatGPT Custom GPT Actionsまたは任意のHTTPエージェント):
npm run start:api
# OpenAPI spec: http://localhost:3001/openapi.json💬 会話例
ゼロからトークンをデプロイ
「初期供給量1,000,000のPortalToken (PRTL) というERC-20をデプロイして。」
→
eth_generate_contract→ コードを表示 →eth_compile_contract→eth_deploy_contract_with_signer→ コントラクトアドレスとEtherscanリンクを返します。
ユニバーサルスワップ
「0.01 ETHをUSDCにスワップして。」
→
eth_swap_tokens { tokenIn:"ETH", tokenOut:"USDC", amount:"0.01" }— (必要な場合)承認を行い、Uniswap V3経由で実行します。
ライブオンチェーンコンテキスト
「
vitalik.ethの残高は?」→ クライアントが
eth://balance/0xd8dA…リソースを会話に直接添付します。
⚙️ 設定
すべて環境変数(.envファイルまたはホスト環境)経由で行います。完全なリストは .env.example にあります。
変数 | 必須 | 目的 |
| – |
|
| ⭐ | 完全なJSON-RPC URL — Infura/Alchemyキー設定を上書き |
| 代替 | キーのみ — PortalMCPが最新の |
| 代替 | InfuraプロジェクトID |
| 書き込み |
|
| 生成 |
|
| – | デフォルトの |
| – | デフォルト |
| – | デフォルト |
| 🛡️ | HTTPトランスポート用のBearerトークン |
| – | デフォルト |
💡 プレースホルダー検出 —
your_,changeme,xxx,placeholder,<…>で始まる環境変数の値は未設定として扱われます。誤設定を未然に防ぎます。
🌍 対応ネットワーク
🛡️ セキュリティ
🚫
.envをコミットしない — すでに.gitignoreに含まれています。🔑
DEPLOYER_PRIVATE_KEYは危険です。 失っても良い資金のみを入れた専用のエージェントウォレットを使用してください。🛰️ HTTPをローカル以外に公開する場合は必ず
MCP_HTTP_TOKENを設定し、TLS (Caddy/Cloudflare) を前段に置いてください。🧪 テストネット優先 — 開発には
sepoliaを使用し、フローを確認した後にのみメインネットを使用してください。🏷️ ツールのアノテーションにより、破壊的なトランザクションの前にクライアントが確認を求めます。自動承認はしないでください。
👀 生成されたSolidityを確認する —
eth_generate_contractは出発点であり、監査済みではありません。
🧑💻 開発
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 # Jestスクリプト | 目的 |
| stdio MCPサーバー (本番) |
| ストリーミング可能なHTTP MCPサーバー (本番) |
| ChatGPT Actions / HTTPクライアント用レガシーREST |
| 登録スモークテスト — CIに最適 |
リポジトリ構成
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🏗️ アーキテクチャ
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.md を参照してください。
🤝 貢献
プルリクエストを歓迎します!優先分野:outputSchemaの網羅、追加ツール、Dockerパッケージング、Pythonクライアント、テストカバレッジ。重要な変更を行う前に、まずIssueを作成してください。
⭐ このリポジトリにスターを付ける · 🐛 Issueを報告する · 📜 MITライセンス
Built with 💜 by the Portal Foundation
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceA comprehensive server that enables AI agents to interact with multiple EVM-compatible blockchain networks through a unified interface, supporting ENS resolution, token operations, and smart contract interactions.25134MIT
- AlicenseBqualityDmaintenanceProvides Claude with access to Ethereum and EVM-compatible blockchain operations, enabling wallet management, transaction handling, contract interactions, and blockchain queries through natural language.358710MIT
- AlicenseNot gradedqualityDmaintenanceA powerful toolkit that enables seamless interaction with EVM-compatible networks through natural language processing and AI assistance, allowing users to manage wallets, launch tokens, and interact with blockchain networks.20MIT
- AlicenseCqualityCmaintenanceEnables AI agents to interact with any EVM-compatible blockchain through natural language, supporting token swaps, cross-chain bridges, staking, lending, governance, gas optimization, and portfolio tracking across networks like Ethereum, BSC, Polygon, Arbitrum, and more.1006339Inno Setup
Related MCP Connectors
Provide AI agents and automation tools with contextual access to blockchain data including balance…
Non-custodial DeFi for AI agents: swaps, concentrated liquidity (V3/V4) zaps + ranges, 5 EVM chains
Token swaps and honeypot/rug checks for AI agents on 8 chains, paid per-call in USDC via x402.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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