# klever-io/mcp-klever-vm [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/klever-io/mcp-klever-vm  
**GitHub Stars:** 31  
**npm Downloads (last month):** 231  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/klever-io-mcp-klever-vm

## Description
Klever blockchain MCP server for smart contract development, on-chain data exploration, account and asset queries, transaction analysis, and contract deployment tooling.

## Tools
Capabilities this server exposes over MCP:

- **query_context** — Search the Klever VM knowledge base for smart contract development context. Returns structured JSON with matching entries, scores, and pagination. Use this for precise filtering by type or tags; use search_documentation for human-readable "how do I..." answers.
- **get_context** — Retrieve a single knowledge base entry by its unique ID. Returns the full entry including content, metadata, tags, and related context IDs. Use this after query_context or find_similar to get complete details for a specific entry.
- **find_similar** — Find knowledge base entries similar to a given entry by comparing tags and content. Returns related contexts ranked by similarity score. Useful for discovering related patterns, examples, or documentation after finding one relevant entry.
- **get_knowledge_stats** — Get summary statistics of the Klever VM knowledge base. Returns total entry count, counts broken down by context type (code_example, best_practice, security_tip, etc.), and a sample entry title for each type. Useful for understanding what knowledge is available before querying.
- **enhance_with_context** — Augment a natural-language query with relevant Klever VM knowledge base context. Extracts Klever-specific keywords, finds matching entries, and returns the original query combined with relevant code examples and documentation in markdown. Use this to enrich a user prompt before answering Klever development questions.
- **search_documentation** — Search Klever VM documentation and knowledge base. Returns human-readable markdown with titles, descriptions, and code snippets. Optimized for "how do I..." questions. Use this instead of query_context when you need formatted developer documentation.
- **analyze_contract** — Analyze Klever smart contract Rust source code for common issues. Checks for missing imports, missing #[klever_sc::contract] macro, missing endpoint annotations, payable handlers without call_value usage, storage mappers without #[storage_mapper], and missing event definitions. Returns findings with severity (error/warning/info) and links to relevant knowledge base entries.
- **get_balance** — Get the KLV or KDA token balance for a Klever blockchain address. Returns the balance in the smallest unit (for KLV: 1 KLV = 1,000,000 units with 6 decimal places). Optionally specify an asset ID to query a specific KDA token balance instead of KLV.
- **get_account** — Get full account details for a Klever blockchain address including nonce, balance, frozen balance, allowance, and permissions. Use this when you need comprehensive account state beyond just the balance.
- **get_asset_info** — Get complete properties and configuration for any asset on the Klever blockchain (KLV, KFI, KDA tokens, NFT collections). Returns supply info, permissions (CanMint, CanBurn, etc.), roles, precision, and metadata. Note: string fields like ID, Name, Ticker are base64-encoded in the raw response.
- **query_sc** — Execute a read-only query against a Klever smart contract (VM view call). Returns the contract function result as base64-encoded return data. Arguments must be base64-encoded. Use this to read contract state without modifying it.
- **get_transaction** — Get transaction details by hash from the Klever blockchain. Returns sender, receiver, status, block info, contracts, and receipts. Uses the API proxy for indexed data.
- **get_block** — Get block information from the Klever blockchain by nonce (block number). If no nonce is provided, returns the latest block. Returns hash, timestamp, proposer, number of transactions, and other block metadata.
- **list_validators** — List active validators on the Klever blockchain network. Returns validator addresses, names, commission rates, delegation info, and staking amounts.
- **send_transfer** — Build an unsigned KLV or KDA token transfer transaction on the Klever blockchain. Returns the unsigned transaction data and hash for client-side signing. The MCP server NEVER handles private keys — signing must be done externally.
- **deploy_sc** — Build an unsigned smart contract deployment transaction for the Klever blockchain. Provide either wasmPath (preferred — reads the file server-side) or wasmHex. Returns the unsigned transaction for client-side signing. The MCP server NEVER handles private keys.
- **invoke_sc** — Build an unsigned smart contract invocation transaction on the Klever blockchain. Calls a state-changing endpoint on a deployed contract. Returns the unsigned transaction for client-side signing. For read-only calls, use query_sc instead.
- **freeze_klv** — Build an unsigned Freeze KLV transaction on the Klever blockchain. Freezing KLV provides energy/bandwidth for network operations and enables staking rewards. Returns the unsigned transaction for client-side signing.
- **add_context** — Add a new knowledge entry to the Klever VM context store. Use this to save code examples, best practices, security tips, or documentation that can later be retrieved via query_context or search_documentation. Returns the generated ID of the new entry.
- **init_klever_project** — Scaffold a new Klever smart contract project using the SDK. Creates the Rust project structure via `ksc new` and generates automation scripts (build, deploy, upgrade, query, test, interact). Requires Klever SDK installed at ~/klever-sdk/. Run check_sdk_status first to verify.
- **add_helper_scripts** — Add build, deploy, upgrade, query, test, and interact automation scripts to an existing Klever smart contract project. Creates a scripts/ directory with bash scripts and updates .gitignore. Run this from the project root directory (where Cargo.toml is located).
- **check_sdk_status** — Check whether the Klever SDK is installed and report the status of each component. Returns JSON with installation state and versions for: ksc (smart contract compiler), koperator (blockchain CLI), VM library (libvmexeccapi), and wallet key file. Run this before init_klever_project or install_klever_sdk to verify prerequisites.
- **install_klever_sdk** — Download and install Klever SDK tools to ~/klever-sdk/. Fetches the latest versions from the Klever CDN, installs binaries, and downloads required VM library dependencies. Supports macOS (arm64/amd64) and Linux. Run check_sdk_status first to see what is already installed.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-klever-vm": {
    "command": "npx",
    "args": ["-y","@klever/mcp-server"]
  }
}
```

## Documentation

## What klever-io/mcp-klever-vm MCP server does

The klever-io/mcp-klever-vm MCP server provides development and blockchain tools for the Klever network. Its knowledge-base tools search, retrieve, rank, and augment Klever VM guidance, including code examples, best practices, security tips, scripts, and documentation. Developers can use `search_documentation` for formatted answers to implementation questions, or use `query_context`, `get_context`, and `find_similar` when they need structured entries and related material.

The server also inspects and interacts with Klever data. It can return KLV or KDA balances, account state, asset configuration, transaction details, block information, and active validators. `query_sc` performs read-only smart contract calls and returns base64-encoded results. `analyze_contract` checks Rust source for several common Klever contract problems, including missing macros, endpoint annotations, storage mapper attributes, payable-handler usage, and event definitions.

Transaction-building tools cover transfers, contract deployment, contract invocation, and KLV freezing. These tools produce unsigned transaction data; signing remains an external client responsibility.

## How it works

The server can operate as an MCP stdio process, an HTTP service, or a public hosted service. Local MCP clients can launch the npm package with `npx`, while the hosted endpoint is available at `https://mcp.klever.org/mcp`. In local deployments, knowledge is loaded into memory by default. Redis can be selected when context should persist across restarts.

Knowledge entries can be added and later searched through MCP. The server also includes project-oriented tools: `init_klever_project` scaffolds a Rust contract project, `add_helper_scripts` adds automation scripts to an existing project, and SDK status or installation tools manage the Klever development prerequisites.

## Setup and configuration

The klever-io/mcp-klever-vm MCP server can be started locally with `npx -y @klever/mcp-server`. Source-based setup uses `pnpm install`, followed by `pnpm run build`; MCP mode is started with `MODE=mcp pnpm start`. Claude Desktop and Cursor configurations use the same stdio command and package arguments.

Configuration includes `MODE`, `PORT`, and `STORAGE_TYPE`. Memory storage supports a `MEMORY_MAX_SIZE` limit. Redis storage uses `REDIS_URL` and requires the knowledge-base ingestion step before startup. Public deployments can also configure CORS, request rate limits, and request body size. Contract transaction workflows require the Klever SDK tools, which can be installed into `~/klever-sdk/` using the included SDK installer.

## Tools and capabilities

- Search and enrich Klever VM development context.
- Inspect accounts, balances, assets, transactions, blocks, and validators.
- Query read-only contract state and analyze Rust contract source.
- Build unsigned transfers, deployments, invocations, and freeze transactions.
- Create projects, add helper scripts, and check or install SDK components.

## Limitations and notes

The klever-io/mcp-klever-vm MCP server does not sign transactions or handle private keys. Contract invocation and deployment therefore require an external signing workflow. Read-only `query_sc` calls should be used instead of state-changing invocation when no transaction is needed.

The public hosted mode exposes only a read-only subset of the tools. In that mode, context creation and shell-based project tools are disabled. Memory storage is not persistent, whereas Redis storage is intended for data that must survive restarts. Raw asset response fields such as IDs, names, and tickers may be base64-encoded, and contract call arguments and return data use base64 encoding.

_Full upstream README: https://allmcps.com/mcp/klever-io-mcp-klever-vm/readme_

