프로토타입 · 미리 보기: 공식 레지스트리의 모든 서버를 담고 있으며 30분마다 동기화해요. Google로 로그인하면 리뷰를 쓸 수 있어요.프로토타입 · 30분마다 업데이트
PopNx MCPAI를 쓰는 사람을 위한 MCP 서버 · 쉬운 말로 설명해요

MCP Klever Vm

제작자: klever-io버전 1.3.0i★ 31i컴퓨터 또는 클라우드
레지스트리 이름io.github.klever-io/mcp-klever-vm

설치 방법

What it does

MCP server for Klever blockchain smart contract development.

  • Connects 컴퓨터 또는 클라우드
  • Account or key No key needed
  • Category 암호화폐 및 블록체인

설치

쓰고 있는 AI 앱을 고른 다음 설정을 복사하세요.

검사 5/5 통과 · 내가 묻는 내용은 제작자 서버(mcp.klever.org)를 거쳐요 · ✓ 명령 확인 2026년 11월 13일

먼저: 어떤 AI를 쓰시나요?

쓰는 앱을 고르면 아래에 단계가 나옵니다.

Claude에 연결할 수 있어요 · 약 2분

키 필요 없음, 설치 필요 없음 · claude.ai나 데스크톱 앱에서 한 번 설정하면 채팅에서 쓸 수 있어요 · 무료 계정은 1개까지 · Team/Enterprise는 소유자(Owner)가 추가

  1. Claude의 Connectors 페이지 열기

    CustomizeConnectors

    CustomizeConnectors1Add2https://…3Add4
  2. “Add” → “Custom” → “Web”를 누르고 이 2칸 채우기

    여기서 복사해 Claude의 같은 이름 칸에 붙여 넣고 Continue를 누르세요

    Name · 이름MCP Klever Vm
    Remote MCP server URL · 주소https://mcp.klever.org/mcp

    Claude가 찾은 로그인 설정 화면에서 Continue를 누르고 · Authentication은 제작자 안내대로(Sign in now, Sign in when needed, No sign in) 고른 뒤 Add를 누르세요

  3. 채팅에서 켜기

    +ConnectorsMCP Klever Vm

  4. 해 보기

    MCP Klever Vm을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐

    ✓ Claude가 MCP Klever Vm을 쓰고 있다고 하거나 답에 MCP Klever Vm 도구 이름이 나오면 연결된 거예요

메뉴 이름은 2026년 11월 11일에 Anthropic 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요

ChatGPT 연결은 요금제에 따라 달라요

전체 MCP: 웹 ChatGPT Business, Enterprise, Edu · Pro: 읽기/가져오기 권한으로 연결, 데이터를 바꾸는 도구는 안 될 수 있어요 · Plus: 공식 문서 미확인, 플러그인 화면에 사용자 지정 MCP 추가 항목이 보이면 시도해 볼 수 있어요 · 웹만

  1. 웹 ChatGPT에서 MCP 추가 페이지 열기

    Plugins+Add custom MCP server

    ChatGPTPlugins1+2https://…3Create4
  2. 이름과 주소 입력

    이름을 넣고 Connection에 주소를 붙여 넣은 뒤 경고에 체크하고 Create as a plugin을 누르세요

    Name · 이름MCP Klever Vm
    Connection · 주소https://mcp.klever.org/mcp
  3. 채팅에서 MCP Klever Vm 고르기

    새 채팅을 열고 입력 전에 플러그인 목록에서 MCP Klever Vm을 고르세요

  4. 해 보기

    MCP Klever Vm을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐

    ✓ ChatGPT가 MCP Klever Vm을 쓰고 있다고 하거나 답에 MCP Klever Vm 도구 이름이 나오면 연결된 거예요

메뉴 이름은 2026년 11월 11일에 OpenAI 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요

Claude Code에 연결할 수 있어요 · 약 2분

키 필요 없음, 설치 필요 없음

  1. 터미널 열기

    Mac: Command+스페이스를 누르고 Terminal 입력 · Windows: PowerShell 열기

  2. 이 명령을 붙여 넣고 Enter

    claude mcp add --transport http --scope user klever-vm https://mcp.klever.org/mcp
  3. Claude Code에서 /mcp 입력

    MCP Klever Vm이 목록에 있고 연결됨으로 보이면 돼요

  4. 해 보기

    MCP Klever Vm을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐

    ✓ Claude Code가 MCP Klever Vm을 쓰고 있다고 하거나 답에 MCP Klever Vm 도구 이름이 나오면 연결된 거예요

메뉴 이름은 2026년 11월 11일에 Anthropic 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요

Cursor에 연결할 수 있어요 · 약 2분

키 필요 없음, 설치 필요 없음

  1. 이 버튼으로 Cursor 열기

    Cursor에서 열기

    Cursor가 설치를 확인하면 Install을 누르세요

  2. Cursor에서 AI 채팅을 Agent 모드로 열기

  3. 해 보기

    MCP Klever Vm을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐

    ✓ Cursor가 MCP Klever Vm을 쓰고 있다고 하거나 답에 MCP Klever Vm 도구 이름이 나오면 연결된 거예요

메뉴 이름은 2026년 11월 11일에 Cursor 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요

VS Code에 연결할 수 있어요 · 약 2분

키 필요 없음, 설치 필요 없음

  1. 이 버튼으로 VS Code 열기

    VS Code에서 열기

    VS Code가 설치를 확인하면 Install을 누르세요

  2. VS Code에서 AI 채팅을 Agent 모드로 열기

  3. 해 보기

    MCP Klever Vm을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐

    ✓ VS Code가 MCP Klever Vm을 쓰고 있다고 하거나 답에 MCP Klever Vm 도구 이름이 나오면 연결된 거예요

메뉴 이름은 2026년 11월 11일에 VS Code 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요

Windsurf, Zed, Gemini CLI 같은 다른 MCP 앱은 추가 방법이 저마다 달라요. 앱 목록에서 확인하세요

MCP를 쓰는 앱 모두 보기 →

웹으로 연결하는 앱용 주소

주소https://mcp.klever.org/mcp

JSON 설정은 아래 “개발자용”에 있어요

막혔나요? MCP Klever Vm을 쓰는 사람에게 물어보세요💬 토론 →
개발자용: 터미널 명령과 JSON 설정

웹으로 연결

Claude Code

claude mcp add --transport http --scope user klever-vm https://mcp.klever.org/mcp

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "klever-vm": {
      "url": "https://mcp.klever.org/mcp"
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "klever-vm": {
      "type": "http",
      "url": "https://mcp.klever.org/mcp"
    }
  }
}

컴퓨터에 설치

Claude Code

claude mcp add --scope user klever-vm -- npx -y @klever/mcp-server

Claude Desktop (claude_desktop_config.json)

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

Cursor (~/.cursor/mcp.json)

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

VS Code (mcp.json)

{
  "servers": {
    "klever-vm": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@klever/mcp-server"
      ]
    }
  }
}

이 설정은 제작자의 레지스트리 정보로 만들었어요. README와 다르면 README를 따르세요.

한눈에 보기

주간 다운로드i
88/주
연결 방식
컴퓨터 또는 클라우드
전송 방식
stdio, streamable-http
최신 버전i
1.3.0
레지스트리 공개i
2026년 3월 20일
코드 마지막 변경i
2026년 5월 19일
제작자
klever-io
패키지
npm: @klever/mcp-server
레지스트리 상태
활성

어떤 앱에서 쓸 수 있나요

이 서버의 연결 방식과 각 앱의 공식 문서를 바탕으로 했어요. 2026년 11월 10일 확인.

인터넷으로 연결하는 앱

ClaudeChatGPTGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatOpen WebUIRaycast

내 컴퓨터에서 실행하는 앱

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

모든 앱과 장단점 →

할 수 있는 일

도구 이름과 설명은 서버가 2026년 11월 13일에 알려 준 그대로예요. 우리가 아니라 제작자가 쓴 글이고, 일반 텍스트로만 보여 드려요.

  • 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 a

  • 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. R

  • 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

  • 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.

  • 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. NOT

  • 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). NOTE: In public pr

기본 점검i

누구나 볼 수 있는 정보를 점검했고, 코드는 읽지 않았어요. 해당하지 않는 항목은 개수에서 뺐어요. · 2026년 11월 13일 점검

  • ✓ 통과

    제작자와 저장소 일치

    레지스트리 이름이 GitHub 계정 klever-io 기준으로 확인되었고, 이 계정이 저장소를 소유하고 있어요

  • ✓ 통과

    계속 관리되고 있음

    코드 마지막 변경: 6개월 전

  • ✓ 통과

    라이선스 있음

    MIT 사용

  • ✓ 통과

    엔드포인트 응답

    193ms 만에 응답(HTTP 200)

  • – 해당 없음

    OAuth로 로그인

    로그인 필요 없음

  • ✓ 통과

    도구 설명에 숨겨진 지시 없음

    도구 설명 16개를 읽었고, AI에게 보내는 숨겨진 지시는 없었어요

토론

질문하고, 팁을 나누고, 안 되는 점을 알려 주세요. "도움이 됨"이 많은 순서예요.

아직 글이 없어요. 처음으로 질문하거나 공유해 보세요.

이곳의 글은 사용자가 쓴 것으로, PopNx 팀의 글이 아니에요.

Google로 로그인하고 글쓰기

사용자 리뷰

아직 리뷰가 없어요

Google로 로그인하고 리뷰 쓰기

암호화폐 및 블록체인 카테고리의 다른 서버와 비교i

  • 이 카테고리의 다른 서버 1671개 중 98%보다 스타가 많아요
  • 이 카테고리의 다른 서버 1671개 중 8%보다 최근에 레지스트리에 공개됐어요
  • 기본 점검 결과가 이 카테고리의 다른 서버 1671개 중 100%와 같거나 더 좋아요

레지스트리에서 이 카테고리의 활성 서버 전체와 비교했어요. 스타는 게시자가 저장소를 소유한 경우에만 세요.

자주 묻는 질문

MCP Klever Vm, 안전한가요?

해당하는 기본 점검 5개 중 5개를 통과했어요. 코드는 읽지 않았어요. 키나 토큰을 넣기 전에 서버가 어떤 권한을 요구하는지 확인하고, 꼭 필요한 권한만 있는 키를 쓰세요.

어떤 키나 코드가 필요한가요?

레지스트리에 필수 키가 나와 있지 않아요. 다만 처음 쓸 때 로그인을 요구하는 서버도 있어요.

내 컴퓨터에서 실행되나요, 클라우드에서 실행되나요?

둘 다 가능해요. 내 컴퓨터에 설치해도 되고, 클라우드 버전에 연결해도 돼요.

아직 관리되고 있나요?

GitHub 저장소는 마지막으로 6개월 전 변경됐고, 최신 버전(1.3.0)은 8개월 전 레지스트리에 올라왔어요.

어떤 앱에서 쓸 수 있나요?

Claude Desktop, Claude Code, Cursor, VS Code처럼 MCP를 지원하는 앱에서 쓸 수 있어요. URL로 연결되므로 원격 MCP를 받는 앱에서도 쓸 수 있어요. 예: 웹 ChatGPT(Business 이상은 전체 MCP, Pro는 읽기 전용).

대신 쓸 수 있는 건 뭐가 있나요?

같은 카테고리에는: Solana MCP by Vybe, Oracle3 prediction-market arbitrage checks, Polymarket Paper Trader

같은 카테고리의 다른 것

같은 카테고리에서 다른 제작자가 만든 서버예요. 스타 순으로 정렬했어요.

카드 보는 법:↓ 주간 다운로드i★ GitHub 스타i세 기둥: 리뷰 · 점검 · 사용 정도i업데이트 = 최신 버전을 레지스트리에 공개한 날i

Solana MCP by Vybe

Solana MCP developer toolkit: wallets, trades, markets, PnL, transfers, onchain, swaps & API tools.

제작자: vybenetwork성장 중★ 2.7천 저장소 전체의 별6개월 전 업데이트

클라우드에서 실행

Oracle3 prediction-market arbitrage checks

Kalshi and Polymarket data, venue fees, no-arbitrage checks and paper execution for AI agents.

제작자: YichengYang-Ethan성장 중↓ 35/주★ 56943일 전 업데이트

내 컴퓨터에서 실행

Polymarket Paper Trader

Polymarket paper trading for AI agents: $10k paper money, real order books, official fees.

제작자: agent-next성장 중↓ 226/주★ 50728일 전 업데이트

내 컴퓨터에서 실행

제작자의 README

README 열기

제작자의 저장소에서 쓰인 그대로 가져왔어요. PopNx MCP가 검토하거나 보증한 내용이 아니에요. HTML, 이미지, 스크립트는 제거했어요. 링크를 누르면 이 사이트를 벗어나요.

Klever MCP Server

A Model Context Protocol (MCP) server tailored for Klever blockchain smart contract development. This server maintains and serves contextual knowledge including code patterns, best practices, and runtime behavior for developers working with the Klever VM SDK.

Features

  • 🚀 Triple Mode Operation: Run as HTTP API server, MCP stdio server, or public hosted MCP server
  • 💾 Flexible Storage: In-memory or Redis backend support
  • 🔍 Smart Context Retrieval: Query by type, tags, or contract type
  • 📝 Automatic Pattern Extraction: Parse Klever contracts to extract examples and patterns
  • 🎯 Relevance Ranking: Intelligent scoring and ranking of context
  • 🔄 Live Updates: Add and update context in real-time
  • 🛡️ Type Safety: Full TypeScript with Zod validation
  • 📚 Comprehensive Knowledge Base: Pre-loaded with Klever VM patterns, best practices, and examples
  • 🔧 Contract Validation: Automatic detection of common issues and anti-patterns
  • 🚀 Deployment Scripts: Ready-to-use scripts for contract deployment, upgrade, and querying

Quick Start

Install and run instantly via npx — no cloning required:

npx -y @klever/mcp-server

Or connect to the hosted public server:

claude mcp add -t http klever-vm https://mcp.klever.org/mcp

See MCP Client Integration for client-specific configuration.

Architecture

mcp-klever-vm/

├── src/ │ ├── api/ # HTTP API routes with validation │ ├── context/ # Context management service layer │ ├── mcp/ # MCP protocol server implementation │ ├── parsers/ # Klever contract parser and validator │ ├── storage/ # Storage backends (memory/Redis) │ │ ├── memory.ts # In-memory storage with size limits │ │ └── redis.ts # Redis storage with optimized queries │ ├── types/ # TypeScript type definitions │ ├── utils/ # Utilities and ingestion tools │ └── knowledge/ # Modular knowledge base (95+ entries) │ ├── core/ # Core concepts and imports │ ├── storage/ # Storage patterns and mappers │ ├── events/ # Event handling and rules │ ├── tokens/ # Token operations and decimals │ ├── modules/ # Built-in modules (admin, pause) │ ├── tools/ # CLI tools (koperator, ksc) │ ├── scripts/ # Helper scripts │ ├── examples/ # Complete contract examples │ ├── errors/ # Error patterns │ ├── best-practices/ # Optimization and validation │ └── documentation/ # API reference ├── tests/ # Test files └── docs/ # Documentation

Key Improvements Made
  1. Storage Layer
  • Added memory limits to prevent OOM in InMemoryStorage
  • Optimized Redis queries to avoid O(N) KEYS command
  • Added atomic transactions for Redis operations
  • Improved error handling and validation
  1. API Security
  • Added input validation for all endpoints
  • Batch operation size limits
  • Proper error responses without leaking internals
  • Environment-aware error messages
  1. Type Safety
  • Centralized schema validation
  • Proper TypeScript interfaces for options
  • Runtime validation of stored data
  1. Performance
  • Batch operations using Redis MGET
  • Index-based queries instead of full scans
  • Optimized count operations

Installation

  1. Clone the repository:
git clone https://github.com/klever-io/mcp-klever-vm.git

cd mcp-klever-vm

  1. Install dependencies:
pnpm install
  1. Copy environment configuration:
cp .env.example .env
  1. Install Klever SDK tools (required for transactions):
chmod +x scripts/install-sdk.sh && ./scripts/install-sdk.sh
  1. Build the project:
pnpm run build

Configuration

Edit .env file to configure the server:

# Server Mode (http, mcp, or public)

MODE=http

HTTP Server Port (only for http mode)

PORT=3000

Storage Backend (memory or redis)

STORAGE_TYPE=memory

Maximum contexts for in-memory storage (default: 10000)

MEMORY_MAX_SIZE=10000

Redis URL (only if STORAGE_TYPE=redis)

REDIS_URL=redis://localhost:6379

Node environment (development or production)

NODE_ENV=development

MCP Client Integration

Claude Code
# Add via npx (recommended)

claude mcp add klever-vm -- npx -y @klever/mcp-server

Or connect to the public hosted server

claude mcp add -t http klever-vm https://mcp.klever.org/mcp

Claude Desktop

Add to your claude_desktop_config.json:

{

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

For detailed setup, see the Claude Desktop Installation Guide.

Cursor

Add to your Cursor MCP settings (.cursor/mcp.json):

{

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

VS Code (GitHub Copilot)

Add to .vscode/mcp.json in your project:

{

"servers": { "klever-vm": { "type": "stdio", "command": "npx", "args": ["-y", "@klever/mcp-server"] } } }

For detailed setup, see the VS Code Installation Guide.

Public MCP Server

The Klever MCP Server can be hosted as a public shared service, allowing any developer to connect without running it locally.

Connecting to the Public Server
# Add permanently (user-level)

claude mcp add -t http klever-vm https://mcp.klever.org/mcp

Add for current project only

claude mcp add -t http -s project klever-vm https://mcp.klever.org/mcp

Available Tools (Public Mode)

The public server exposes a read-only subset of tools for security:

ToolDescription
query_contextSearch the Klever VM knowledge base
get_contextRetrieve a specific context by ID
find_similarFind contexts similar to a given context
get_knowledge_statsGet knowledge base statistics
enhance_with_contextEnhance queries with relevant Klever VM context

Write operations (add_context) and shell-based tools (init_klever_project, add_helper_scripts) are disabled in public mode.

Self-Hosting with Docker
# Build and run

docker build -t mcp-klever-vm . docker run -p 3000:3000 mcp-klever-vm

Or using docker compose

docker compose up -d

Then connect:

claude mcp add -t http klever-vm-local http://localhost:3000/mcp
Self-Hosting without Docker
pnpm install

pnpm run build pnpm run start:public

Environment Variables (Public Mode)
VariableDefaultDescription
MODEhttpSet to public for hosted mode
PORT3000Server port
CORS_ORIGINS_(unset)_Comma-separated allowed origins. Unset or * allows all origins
RATE_LIMIT_MCP60MCP endpoint requests/min per IP
RATE_LIMIT_API30API endpoint requests/min per IP
BODY_SIZE_LIMIT1mbMax request body size
Deployment Notes

For production at mcp.klever.org:

  • Deploy Docker container behind a reverse proxy (nginx/Caddy/cloud LB) for TLS termination
  • Ensure proxy passes mcp-session-id header and supports SSE (disable response buffering)
  • Single instance is sufficient as the server is read-only with an in-memory knowledge base
  • Consider Cloudflare for DDoS protection (SSE is supported)

Usage

Knowledge Base Loading

The server automatically loads the Klever knowledge base based on your storage type:

Memory Storage (Default)
  • Knowledge is automatically loaded when the server starts
  • No need to run pnpm run ingest separately
  • Data exists only while server is running
  • Best for development and testing
Redis Storage
# First, ingest the knowledge base (one time)

pnpm run ingest

Then start the server

pnpm run dev

- Knowledge persists in Redis database
  • Survives server restarts
  • Best for production use

This will load:

  • Smart contract templates and examples
  • Annotation rules and best practices
  • Storage mapper patterns and comparisons
  • Deployment and query scripts
  • Common errors and solutions
  • Testing patterns
  • API reference documentation
Running as HTTP Server
# Development mode

pnpm run dev

Production mode

pnpm run build && pnpm start

The HTTP API will be available at http://localhost:3000/api

Running as MCP Server
MODE=mcp pnpm start

Use with any MCP-compatible client.

API Endpoints
POST /api/context

Ingest new context into the system.

{

"type": "code_example", "content": "contract code here", "metadata": { "title": "Token Contract Example", "description": "ERC20-like token implementation", "tags": ["token", "fungible"], "contractType": "token" } }

GET /api/context/:id

Retrieve specific context by ID.

POST /api/context/query

Query contexts with filters.

{

"query": "transfer", "types": ["code_example", "best_practice"], "tags": ["token"], "contractType": "token", "limit": 10, "offset": 0 }

PUT /api/context/:id

Update existing context.

DELETE /api/context/:id

Delete context.

GET /api/context/:id/similar

Find similar contexts.

POST /api/context/batch

Batch ingest multiple contexts.

MCP Tools

When running as MCP server, the following tools are available:

  • query_context: Search for relevant Klever development context
  • add_context: Add new context to the knowledge base
  • get_context: Retrieve specific context by ID
  • find_similar: Find contexts similar to a given context
  • get_knowledge_stats: Get statistics about the knowledge base
  • init_klever_project: Initialize a new Klever smart contract project with helper scripts
  • enhance_with_context: Automatically enhance queries with relevant Klever VM context

Context Types

  • code_example: Working code snippets and examples (Rust smart contract code)
  • best_practice: Recommended patterns and practices
  • security_tip: Security considerations and warnings
  • optimization: Performance optimization techniques
  • documentation: General documentation and guides
  • error_pattern: Common errors and solutions
  • deployment_tool: Deployment scripts and utilities (bash scripts, tools)
  • runtime_behavior: Runtime behavior explanations

Pre-loaded Knowledge Base

The MCP server includes a comprehensive knowledge base with 95+ entries organized into 11 categories:

Critical Patterns
  • Payment handling and token operations
  • Decimal conversions and calculations
  • Event emission and parameter rules
  • CLI tool usage and best practices
Contract Patterns & Examples
  • Basic contract structure templates
  • Complete lottery game implementation
  • Staking contract with rewards
  • Cross-contract communication patterns
  • Remote storage access patterns
  • Token mapper helper modules
Development Tools
  • Koperator: Complete CLI reference with argument encoding
  • KSC: Build commands and project setup
  • Deployment, upgrade, and query scripts
  • Interactive contract management tools
  • Common utilities library (bech32, network management)
Storage & Optimization
  • Storage mapper selection guide with performance comparisons
  • Namespace organization patterns
  • View endpoints for efficient queries
  • Gas optimization techniques
  • OptionalValue vs Option patterns
Best Practices & Security
  • Input validation patterns
  • Error handling strategies
  • Admin and pause module usage
  • Access control patterns
  • Common mistakes and solutions

Ingesting Contracts

Use the built-in ingestion utilities to parse and import Klever contracts:

import { StorageFactory } from './storage/index.js';

import { ContextService } from './context/service.js'; import { ContractIngester } from './ut

앞부분만 보여 드려요. 나머지는 저장소에서 읽어 보세요