NEAR Server
БесплатноНе проверенThe NEAR MCP Server enables AI agents to interact with the NEAR Protocol blockchain, providing smart contract interaction, transaction handling, and event liste
Описание
The NEAR MCP Server enables AI agents to interact with the NEAR Protocol blockchain, providing smart contract interaction, transaction handling, and event listening with AI-driven processing.
README
📖 Overview
The NEAR MCP Server enables AI agents to interact with the NEAR Protocol blockchain. This server provides smart contract interaction, transaction handling, and event listening capabilities with AI-driven processing.
By implementing the Model Context Protocol (MCP), this server allows Large Language Models (LLMs) to monitor blockchain events, process them with AI intelligence, and respond back to smart contracts, bridging the gap between AI and decentralized applications.
✨ Features
- Event Watching: Monitor NEAR smart contracts for specific events in real-time.
- AI-Driven Processing: Automatically process blockchain events with AI and send responses back to contracts.
- Subscription Management: Manage multiple event subscriptions with detailed statistics.
- Flexible Configuration: Customizable polling intervals, response methods, and network settings.
📦 Installation
🚀 Using npx (Recommended)
To use this server without installing it globally:
npx @iqai/mcp-near
🔧 Build from Source
git clone https://github.com/IQAIcom/mcp-near.git
cd mcp-near
pnpm install
pnpm run build
⚡ Running with an MCP Client
Add the following configuration to your MCP client settings (e.g., claude_desktop_config.json).
📋 Minimal Configuration
{
"mcpServers": {
"near": {
"command": "npx",
"args": ["-y", "@iqai/mcp-near"],
"env": {
"ACCOUNT_ID": "your-account.near",
"ACCOUNT_KEY": "ed25519:your_private_key_here"
}
}
}
}
⚙️ Advanced Configuration (Local Build)
{
"mcpServers": {
"near": {
"command": "node",
"args": ["/absolute/path/to/mcp-near/dist/index.js"],
"env": {
"ACCOUNT_ID": "your-account.near",
"ACCOUNT_KEY": "ed25519:your_private_key_here",
"NEAR_NETWORK_ID": "mainnet",
"NEAR_NODE_URL": "https://rpc.mainnet.near.org"
}
}
}
}
🔐 Configuration (Environment Variables)
| Variable | Required | Description | Default |
|---|---|---|---|
ACCOUNT_ID |
Yes | Your NEAR account ID for authentication | - |
ACCOUNT_KEY |
Yes | Private key for your NEAR account (ed25519: or secp256k1: format) | - |
NEAR_NETWORK_ID |
No | NEAR network ("mainnet", "testnet", "betanet") | mainnet |
NEAR_NODE_URL |
No | Custom NEAR RPC endpoint | - |
NEAR_GAS_LIMIT |
No | Gas limit for transactions | - |
💡 Usage Examples
🔔 Event Watching
- "Watch for 'run_agent' events on contract oracle.near"
- "Start monitoring price_request events on my-contract.testnet"
- "Set up a listener for transfer events with 5-second polling"
📊 Subscription Management
- "List all my active event subscriptions"
- "Show statistics for my event watchers"
- "Stop watching events on contract oracle.near"
🤖 AI-Driven Workflows
- "Process incoming oracle requests and respond with AI analysis"
- "Monitor for user queries and provide intelligent responses"
🛠️ MCP Tools
👨💻 Development
🏗️ Build Project
pnpm run build
👁️ Development Mode (Watch)
pnpm run watch
✅ Linting & Formatting
pnpm run lint
pnpm run format
🧪 Running Tests
pnpm test
📁 Project Structure
src/tools/: Individual tool definitionssrc/services/: Event watcher, auth manager, and business logicsrc/types.ts: TypeScript type definitionssrc/index.ts: Server entry point
🔄 AI-Driven Event Processing Workflow
The server enables an "AI in the loop" workflow:
- 🔗 Smart contract transaction triggers an event and pauses execution
- 🤖 MCP server detects the event and requests AI processing from the client
- 🧠 AI client processes the event data and provides intelligent response
- ↩️ Server sends AI response back to blockchain via transaction
- ✅ Original smart contract resumes with the AI-provided data
📚 Resources
⚠️ Disclaimer
This project interacts with the NEAR blockchain and requires private keys for transaction signing. Users should exercise caution, secure their credentials, and verify all transactions independently. Blockchain operations involve risk and may incur gas fees.
📄 License
Установить NEAR Server в Claude Desktop, Claude Code, Cursor
unyly install near-mcp-serverСтавит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.
Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh
Или настроить вручную
Выполни в терминале:
claude mcp add near-mcp-server -- npx -y @iqai/mcp-nearFAQ
NEAR Server MCP бесплатный?
Да, NEAR Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для NEAR Server?
Нет, NEAR Server работает без API-ключей и переменных окружения.
NEAR Server — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить NEAR Server в Claude Desktop, Claude Code или Cursor?
Открой NEAR Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare NEAR Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
