Plasma Testnet MCP Server

Plasma Testnet MCP Server

Enables AI assistants to interact with the Plasma Network blockchain testnet, supporting XPL token transfers, transaction monitoring, gas estimation, wallet balance queries, and smart contract interactions through natural language.

Category
Visit Server

README

<div align="center">

๐ŸŒ Plasma Testnet MCP Server v0.1

License: MIT Node Version Plasma Network MCP Protocol Docker Ready

Production-ready Model Context Protocol (MCP) server for Plasma Testnet

Features โ€ข Quick Start โ€ข API โ€ข Tools โ€ข Examples โ€ข Prompts โ€ข Security

</div>


๐Ÿš€ Features

๐ŸŽฏ Complete Blockchain Integration

  • Full Plasma Network testnet support with native XPL token operations
  • Real-time transaction monitoring and status tracking
  • Gas estimation and optimization for cost-effective operations
  • Multi-signature wallet support (coming soon)
  • Smart contract interaction capabilities
  • Comprehensive block explorer integration

๐Ÿง  Intelligent Transaction Engine

  • Automatic gas price calculation and optimization
  • Transaction simulation before execution
  • Nonce management and conflict resolution
  • Error recovery with automatic retry logic
  • Transaction receipt confirmation
  • Real-time network status monitoring

๐Ÿค– MCP Protocol Implementation

  • 14+ specialized tools for blockchain automation
  • Compatible with Claude Desktop and AI assistants
  • HTTP and stdio transport support
  • Zod schema validation for all parameters
  • Comprehensive error handling and logging
  • Production-tested components

๐Ÿ›๏ธ Enterprise-Ready Architecture

  • Built with Express.js for scalability
  • Ethers.js v5 for blockchain interactions
  • Full TypeScript type safety (via Zod)
  • Docker containerization support
  • Comprehensive logging and monitoring
  • Environment-based configuration

๐Ÿ“ฆ Quick Start

โœ… Prerequisites

# Required
Node.js >= 18.0.0
npm >= 9.0.0

# Optional
Docker & Docker Compose (for containerized deployment)
Private key for transaction execution

๐Ÿ“ฅ Installation

# Clone the repository
git clone https://github.com/tairon-ai/plasma-mcp.git
cd plasma-mcp

# Install dependencies
npm install

# Configure environment
cp .env.example .env
# Edit .env with your configuration

# Start the server
npm start

# Development mode
npm run dev

# MCP stdio server for Claude Desktop
npm run mcp

๐Ÿณ Docker Deployment

# Build and run with Docker Compose
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

๐Ÿค– Claude Desktop Integration

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "plasma-network": {
      "command": "node",
      "args": ["/path/to/plasma-mcp/mcp/index.js"],
      "env": {
        "RPC_URL": "https://testnet-rpc.plasma.to",
        "WALLET_PRIVATE_KEY": "your_private_key_without_0x"
      }
    }
  }
}

๐Ÿ›  Available Tools

๐Ÿฆ Blockchain Operations

Tool Description Parameters
getServiceInfo Get server capabilities and config -
getNetworkInfo Get Plasma network information -
getAccountBalance Get XPL balance for address address (optional)
sendTransaction Send custom transaction to, value, data, gasLimit, gasPrice
sendXPL Send XPL tokens to, amount
getTransactionStatus Check transaction status txHash
requestFaucet Get testnet faucet info address, faucetName
estimateGas Estimate gas for transaction from, to, value, data
getLatestBlocks Get recent blocks count
getGasPrice Get current gas price -
getTokenInfo Get token details tokenAddress
getWalletBalances Get wallet token balances walletAddress, tokens

๐Ÿ”— API Endpoints

๐ŸŒ Core Endpoints

GET  /           # Server status and info
GET  /health     # Health check
GET  /info       # Service information
GET  /mcp        # MCP server information
POST /mcp        # MCP protocol endpoint

๐Ÿ’ก Examples

๐Ÿ’ฐ Get Account Balance

// Get XPL balance
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "getAccountBalance",
    "arguments": {
      "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb9"
    }
  },
  "id": 1
}

๐Ÿ”„ Send XPL Tokens

// Send 10 XPL to address
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "sendXPL",
    "arguments": {
      "to": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb9",
      "amount": "10.0"
    }
  },
  "id": 1
}

๐Ÿ“Š Check Transaction Status

// Check transaction by hash
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "getTransactionStatus",
    "arguments": {
      "txHash": "0x123...abc"
    }
  },
  "id": 1
}

๐Ÿค– Prompts

๐Ÿ’ฌ Example Prompts for Claude, ChatGPT, or Other AI Assistants

These prompts demonstrate how to interact with the MCP server through natural language when integrated with AI assistants:

๐Ÿ’ฑ Token Operations

"What's my XPL balance?"

"Send 5 XPL to 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb9"

"Check the status of transaction 0x123...abc"

"Estimate gas for sending 100 XPL to this address"

๐Ÿ“Š Network Analysis

"Show me the current gas price on Plasma Network"

"Get the latest 5 blocks from the network"

"What's the current network status?"

"Show me network information including block height"

๐Ÿ’ผ Wallet Management

"Get my wallet nonce and balance"

"Show all token balances in my wallet"

"Request testnet XPL from the faucet"

"Calculate the cost of a transaction with current gas prices"

๐Ÿ”ง Smart Contract Interaction

"Get information about token at address 0x..."

"Send a custom transaction with data payload"

"Estimate gas for a contract interaction"

"Check if a transaction was successful"

๐Ÿ”ง Integration Tips for AI Assistants

When using these prompts with the MCP server:

  1. Always specify addresses in full format (0x...)
  2. Use decimal amounts for XPL (e.g., "10.5" not "10500000000000000000")
  3. Check gas prices before large transactions
  4. Verify balances before attempting transfers
  5. Monitor transaction status after sending

๐Ÿงช Testing

๐Ÿ” API Testing with cURL

# Check server health
curl http://localhost:8080/health

# Get MCP server info
curl http://localhost:8080/mcp

# Get service information
curl http://localhost:8080/info

# Execute a tool
curl -X POST http://localhost:8080/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "getNetworkInfo",
      "arguments": {}
    },
    "id": 1
  }'

๐Ÿ”’ Security

๐Ÿ” Best Practices

  • Private Key Management: Never commit private keys. Use environment variables
  • Transaction Validation: All parameters are validated with Zod schemas
  • Gas Limits: Automatic gas estimation with safety margins
  • Error Handling: Comprehensive error handling for all operations
  • Access Control: Implement authentication for production deployments
  • Monitoring: Use block explorer to track all transactions

๐Ÿ›ก๏ธ Security Features

  • Zod schema validation for all inputs
  • Automatic gas estimation with buffer
  • Transaction simulation capabilities
  • Private key encryption support
  • Rate limiting ready
  • Comprehensive audit logging

๐Ÿ“Š Supported Networks & Tokens

๐ŸŒ Network

  • Plasma Testnet (Chain ID: 9746)
  • RPC: https://testnet-rpc.plasma.to
  • Explorer: Plasma Explorer

๐Ÿช™ Native Token

  • XPL: Native Plasma Network token
  • Decimals: 18
  • Used for gas fees and transfers

๐Ÿ“œ Future Contracts (Pending Deployment)

  • DEX Router: Decentralized exchange routing
  • Token Factory: ERC20 token deployment
  • Liquidity Pools: Automated market making

๐Ÿš€ Deployment

๐Ÿญ Production Deployment

# Build for production
npm run build

# Start production server
NODE_ENV=production npm start

# With PM2
pm2 start server.js --name plasma-mcp

# With Docker
docker build -t plasma-mcp .
docker run -d -p 8080:8080 --env-file .env plasma-mcp

๐Ÿ”‘ Environment Variables

# Required for transactions
WALLET_PRIVATE_KEY=your_private_key_without_0x

# Network configuration
RPC_URL=https://testnet-rpc.plasma.to

# Optional
PORT=8080
NODE_ENV=production

๐Ÿ“ˆ Performance

  • Response Time: <100ms for read operations
  • Transaction Speed: ~2-5s on Plasma Network
  • Throughput: 100+ requests per second
  • Gas Optimization: Automatic gas price calculation
  • Caching: Optimized for repeated queries

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

# Fork and clone
git fork https://github.com/tairon-ai/plasma-mcp
git clone https://github.com/tairon-ai/plasma-mcp

# Create feature branch
git checkout -b feature/amazing-feature

# Make changes and test
npm test

# Commit and push
git commit -m 'feat: add amazing feature'
git push origin feature/amazing-feature

# Open Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments


<div align="center">

Built by Tairon.ai team with help from Claude

</div>

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured