Near

An MCP server for the NEAR blockchain
  • typescript

24

GitHub Stars

typescript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "nearai-near-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@nearai/near-mcp@latest",
        "run"
      ]
    }
  }
}

The NEAR MCP server lets AI assistants securely access and interact with NEAR accounts and blockchain functionality. It exposes a Model Context Protocol interface so AI models can manage accounts, check balances, sign and send transactions, create accounts, and inspect smart contracts, all while keeping private keys local to the running server.

How to use

You run the MCP server locally and connect an MCP-compatible client to it. The server exposes a set of capabilities that let your AI agent create and manage NEAR accounts, view balances and account status, sign and submit transactions, create keys, and inspect or execute smart contracts. Use an MCP-enabled client to issue high-level actions (for example: create an account, check balance, sign a transaction) without handling private keys directly in your AI model.

How to install

Prerequisites: ensure you have Node.js and npm installed on your machine.

# Install the MCP runner via the code CLI integration
npm install -g @anthropic-ai/claude-code

# Add the NEAR MCP server to Claude Code configuration
claude mcp add near-mcp npx @nearai/near-mcp@latest run

# Start using the MCP client (interactive prompt will guide you)
claude
# Alternatively, configure Claude Code with a JSON snippet
{
  "mcpServers": {
    "near-mcp": {
      "command": "npx",
      "args": ["-y", "@nearai/near-mcp@latest", "run"],
      "env": {}
    }
  }
}
# Or configure Goose (CLI tool) to run the MCP server
┌   goose-configure
│
◇  What would you like to configure?
│  Add Extension

◇  What type of extension would you like to add?
│  Command-line Extension

◇  What would you like to call this extension?
│  near-mcp

◇  What command should be run?
│  npx @nearai/near-mcp@latest run

◇  Please set the timeout for this tool (in secs):
│  60

◇  Would you like to add environment variables?
│  No

└  Added near-mcp extension
# Install globally for direct usage
npm install -g @nearai/near-mcp@latest

# Or run directly with npx
npx @nearai/near-mcp@latest run

You can also deploy the MCP server remotely on an external cloud service if desired, using the appropriate deployment instructions for that environment.

## Additional sections

Configuration and security notes: The MCP server is intended to run locally. Private keys are stored in a local keystore on the machine where the MCP server runs. Do not expose the private keys to external tooling. If you need to import a specific account into the server for experimentation, you can use dedicated tools to import a private key; understand that this temporarily exposes that key to the MCP environment.

Security considerations are important when you connect AI models to NEAR accounts. Use the built-in safeguards of the MCP runtime, and prefer running the server in a trusted, isolated environment. When you need to grant access to an account via private keys, limit the scope and duration of that access.

Tools and endpoints provided by the MCP server enable a range of actions, including managing accounts, checking balances, signing and sending transactions, creating accounts, managing access keys, and inspecting smart contracts. Each capability is exposed through the MCP interface for use by your AI agents.

Troubleshooting tips: If the MCP server fails to start, verify Node.js and npm are available, inspect logs for initialization errors, and confirm that the command you configured for your MCP client is exactly as shown in the installation snippets. Ensure the server has network access if you are using a remote deployment.

Notes: The examples above show several ways to integrate the NEAR MCP server with popular tooling. Choose the method that fits your workflow, whether you prefer using Claude Code, Goose configuration, or direct npx invocations.

## Available tools

### manage\_accounts

Create and manage NEAR accounts, including generating keys and setting access controls.

### check\_balance

Query account balances and basic status information.

### sign\_and\_send

Sign and submit transactions to the NEAR network on behalf of the user.

### create\_account

Create new NEAR accounts and set up initial access keys.

### inspect\_contracts

Inspect and interact with deployed smart contracts to read state and trigger actions.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational