near-protocol-interface
A secure interface adhering to the Model Context Protocol (MCP) specification for managing NEAR digital assets and invoking decentralized application logic. This utility allows AI entities to conduct operations such as querying account holdings, cryptographically signing requisite transfers, and provisioning new NEAR network identifiers on behalf of authorized principals.
Author

nearai
Quick Info
Actions
Tags
NEAR Context Adapter
This software package represents a server implementation compliant with the Model Context Protocol (MCP) standards, specifically tailored for interaction with the NEAR distributed ledger technology (DLT). It furnishes AI agents and Large Language Models with a secure gateway to execute NEAR ledger operations and manage associated user accounts.
Initial Setup Guide
To rapidly instantiate the near-mcp server using the claude command-line utility:
npm install -g @anthropic-ai/claude-code claude mcp add near-mcp npx @nearai/near-mcp@latest run claude
Alternatively, remote deployment of the MCP host is achievable via Phala Cloud; refer to the documentation found here.
Installation Procedure
near-mcp is fundamentally designed for integration with an MCP-compatible consuming client. Comprehensive details are available within the primary MCP documentation.
Integrating with the claude CLI tool:
bash claude mcp add near-mcp npx @nearai/near-mcp@latest run
Configuration for the Claude desktop application via JSON manifest:
{ "mcpServers": { "near-mcp": { "command": "npx", "args": ["-y", "@nearai/near-mcp@latest", "run"], "env": {} } } }
Configuration steps for the goose orchestration utility:
┌ goose-configure │ ◇ What configuration subject applies? │ Add Extension │ ◇ What extension category? │ Command-line Extension │ ◇ What identifier should the extension possess? │ near-mcp │ ◇ What executable instruction should be invoked? │ npx @nearai/near-mcp@latest run │ ◇ Specify the operational timeout for this utility (in seconds): │ 60 │ ◇ Are environment variables to be supplied? │ No │ └ Extension 'near-mcp' successfully registered
Alternatively, direct global installation or invocation via npx is supported:
bash
Global installation
npm install -g @nearai/near-mcp@latest
Direct invocation via npx
npx @nearai/near-mcp@latest run
Available Functionalities
Consult TOOLS.md for a comprehensive inventory of supported operations and parameter definitions.
AI Model Interoperability
This module is engineered for utilization alongside artificial intelligence systems that conform to the Model Context Protocol. It facilitates AI assistants in the following capacities:
- Administration of NEAR accounts on behalf of end-users.
- Verification of current account balances and network status.
- Digitally signing and broadcasting transactional data.
- Provisioning new on-chain identities and managing associated cryptographic credentials.
- Inspection and execution of deployed smart contract routines.
Security Posture
- This specific MCP instance is intended exclusively for local execution environments. Confidential private keys are stored within an unencrypted repository co-located with the MCP host process.
- The controlling AI models must be architecturally prevented from viewing account credentials, with one specific exception: the
import_accountfunction permits the model to integrate an account via a provided private key, necessitating the user to supply this secret information directly to the model.
Community Engagement
We actively solicit contributions to the NEAR MCP host software! Please review the guidelines outlined in CONTRIBUTING.md for detailed submission protocols.
Defect Reporting
Should you identify a software defect or propose an enhancement, kindly initiate a new issue within the official GitHub repository.
