MCP ExplorerExplorer

Vara Mcp

@HAPPYS1NGHon a year ago
1 MIT
FreeCommunity
AI Systems
Vara MCP Server provides onchain tools for AI apps to interact with the Vara Network.

Overview

What is Vara Mcp

Vara MCP is a Model Context Protocol server that provides onchain tools for AI applications, enabling them to interact with the Vara Network.

Use cases

Use cases include integrating with AI applications like Claude Desktop and Cursor, developing blockchain tools, and enhancing data retrieval processes.

How to use

To use Vara MCP, clone the repository, install dependencies, configure your Subscan API credentials in a .env file, and integrate it with applications like Claude Desktop.

Key features

Key features include the ability to retrieve block details and extend the capabilities of any MCP client with various tools.

Where to use

Vara MCP can be used in AI applications, blockchain development, and any context where interaction with the Vara Network is required.

Content

Vara MCP Server

A Model Context Protocol (MCP) server that provides onchain tools for AI applications like Claude Desktop and Cursor, allowing them to interact with the Vara Network.

Overview

This MCP server extends any MCP client’s capabilities by providing tools to do anything on Vara:

  • Retrieve block details

Project Structure

The Vara MCP server follows this structure for tools:

src/
├── tools/
│   ├── index.ts (exports toolsets)
│   ├── [TOOL_NAME]/ <-------------------------- ADD DIR HERE
│   │   ├── index.ts (defines and exports tools)
│   │   ├── schemas.ts (defines input schema)
│   │   └── handlers.ts (implements tool functionality)
│   └── utils/ (shared tool utilities)

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • Subscan API credentials

Installation

Install from Source

  1. Clone this repository:

    git clone https://github.com/HAPPYS1NGH/vara-mcp.git
    cd vara-mcp
    
  2. Install dependencies:

    npm install
    
  3. Build the project:

    npm run build
    

Configuration

Create a .env file with your credentials:

# Subscan API credentials
# You can obtain these from the Subscan Developer Portal: https://api.subscan.io/
SUBSCAN_API_URL=your_subscan_api_url
API_KEY=your_api_key

Testing

Test the MCP server to verify it’s working correctly:

npm test

This script will verify that your MCP server is working correctly by testing the connection and available tools.

Integration with Claude Desktop

To add this MCP server to Claude Desktop:

  1. Create or edit the Claude Desktop configuration file at:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json

You can easily access this file via the Claude Desktop app by navigating to Claude > Settings > Developer > Edit Config.

  1. Add the following configuration:

    {
      "mcpServers": {
        "vara-mcp": {
          "command": "npx",
          "args": [
            "<your_repo_build_path>/index.js"
          ],
          "env": {
            "SUBSCAN_API_URL": "your_subscan_api_url",
            "API_KEY": "your_api_key"
          },
          "disabled": false,
          "autoApprove": []
        }
      }
    }
  2. Restart Claude Desktop for the changes to take effect.

Available Tools

get-block

Retrieves the block details for a given block number.

Example query to Claude:

“What’s block number 21189359?”

Security Considerations

  • The configuration file contains sensitive information (API keys and seed phrases). Ensure it’s properly secured and not shared.
  • Consider using environment variables or a secure credential manager instead of hardcoding sensitive information.

Troubleshooting

If you encounter issues:

  1. Check that your Subscan API credentials are correct
  2. Check the Claude Desktop logs for any error messages

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.
Please make sure your code follows the existing style and includes appropriate tests.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers