Near Api Js
Provides API guidance and assistance for agent workflows.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add near-api-js npx -- -y @trustedskills/near-api-js
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"near-api-js": {
"command": "npx",
"args": [
"-y",
"@trustedskills/near-api-js"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
The near-api-js library enables AI agents to interact directly with the NEAR Protocol blockchain. It provides a JavaScript interface for managing accounts, signing transactions, and querying state without requiring complex low-level configuration. This tool is essential for building decentralized applications that operate on NEAR's infrastructure.
When to use it
- Deploying smart contracts or interacting with existing ones on the NEAR network.
- Managing account keys, creating new accounts, or transferring assets programmatically.
- Querying blockchain state to retrieve data stored in NEAR contracts.
- Building AI agents that require native integration with Web3 wallets and dApps.
Key capabilities
- Account management and key generation for NEAR users.
- Transaction signing and broadcasting directly from the agent.
- State access to read contract data and storage values.
- Integration with NEAR's JavaScript runtime environment.
Example prompts
- "Create a new NEAR account using near-api-js and fund it with testnet tokens."
- "Query the current balance of a specific NEAR wallet address via the API."
- "Sign a transaction to transfer 100 NEAR from my agent's account to another user."
Tips & gotchas
Ensure you are using the correct network configuration (e.g., testnet vs. mainnet) before executing any transactions, as mistakes can result in lost funds. Prerequisites include having a valid NEAR node connection and proper API keys or access credentials configured within your agent environment.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.