Skip to main content
Glama

GenLayer MCP Server

License: MIT Node.js Version TypeScript

A comprehensive MCP (Model Context Protocol) server for generating sophisticated GenLayer Intelligent Contracts with AI-native blockchain capabilities.

โš ๏ธ Disclaimer

This project was created as an experimental proof-of-concept to test the capabilities of combining Goose and Claude Code. This has been vibecoded, so be aware of that. Errors or inconsistencies may occur.

Related MCP server: Tyra Advanced Memory MCP Server

๐ŸŒŸ Overview

GenLayer is the first AI-native blockchain that enables Intelligent Contracts - smart contracts that can:

  • ๐Ÿง  Process natural language instructions and human-readable requirements

  • ๐ŸŒ Access real-time web data without external oracles

  • ๐Ÿค– Handle non-deterministic operations through Optimistic Democracy consensus

  • ๐Ÿ” Leverage Large Language Models (LLMs) for complex reasoning and decision-making

  • ๐Ÿ“Š Perform semantic search with built-in vector stores

  • โš–๏ธ Reach consensus on AI outputs using the Equivalence Principle

This MCP server provides tools for generating various types of GenLayer Intelligent Contractsโ€”ranging from basic storage contracts to sophisticated prediction markets, AI-powered oracles, and moreโ€”and is designed to make the developer experience easier and more streamlined when building, testing, and deploying intelligent contracts.

๐Ÿš€ Installation & Usage

Quick Setup with Claude Code

Add the MCP server (no installation needed): Simply run this command in Claude Code:

claude mcp add genlayer -- npx -y genlayer-mcp

Alternative IDE Setup

For other IDEs that support MCP:

Use directly with npx (no installation required): Add to your MCP configuration:

{
  "mcpServers": {
    "genlayer": {
      "command": "npx",
      "args": ["-y", "genlayer-mcp"]
    }
  }
}

๐ŸŒ GenLayer Resources

Documentation

Tools & Platforms

Community

Examples & Tutorials

๐Ÿ› ๏ธ Development

We welcome contributions! Here's how to get started:

Development Setup

# Clone the repository
git clone https://github.com/albert-mr/genlayer-mcp-server.git
cd genlayer-mcp-server

# Install dependencies
npm install

# Run in development mode with auto-reload
npm run dev

# Run tests during development
npm run test:watch

# Type checking
npm run lint

# Full validation
npm run validate

๐Ÿ“„ License

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

Community & Support


Built with โค๏ธ for the GenLayer ecosystem

This is not an official GenLayer repository. It is a community-maintained project.

Available Tools

16 tools
add_equivalence_principleC

Add Equivalence Principle validation to a contract method for handling non-deterministic operations

Inputs: contract_code (required), method_name (required), validation_type (required), tolerance.

add_web_data_accessB

Add web data access capabilities to an existing contract

Inputs: contract_code (required), url_template (required), data_processing_logic (required).

create_prediction_marketB

Create an advanced prediction market contract with AI-powered resolution using multiple web sources and sophisticated betting mechanisms

Inputs: market_name (required), description (required), resolution_criteria (required), web_sources, +2 more.

create_vector_storeB

Create a GenLayer Vector Store contract for semantic search capabilities

Inputs: store_name (required), description (required), metadata_fields.

explain_genlayer_conceptsB

Get detailed explanations of GenLayer concepts, features, and best practices for Intelligent Contract development

Inputs: concept (required), include_examples, detail_level.

explain_genlayer_typesA

Get comprehensive explanations and examples of GenLayer's type system including primitive types, collection types, storage restrictions, and best practices

Inputs: type_category (required), include_examples, include_comparisons.

explain_storage_patternsB

Explain GenLayer storage patterns, persistent data handling, TreeMap/DynArray usage, and storage optimization techniques

Inputs: storage_topic (required), include_examples, complexity_level.

fetch_latest_api_docsA

Fetch the latest GenLayer API documentation from the official source. Use this to get up-to-date information about GenLayer types, decorators, web access methods, LLM integration, consensus mechanisms, and more.

Inputs: topic.

generate_contract_interaction_examplesB

Generate examples for reading from and writing to GenLayer contracts using various methods (CLI, GenLayerJS, Python SDK)

Inputs: interaction_method (required), contract_type, example_operations, include_error_handling.

generate_contract_templateB

Generate a contract from predefined templates for common use cases like DAO governance, content moderation, or sentiment tracking

Inputs: template_type (required), contract_name (required), custom_parameters.

generate_debugging_guideB

Generate debugging strategies and tools for GenLayer contracts including logging, error handling, and testing approaches

Inputs: debug_topic (required), include_code_examples, include_troubleshooting.

generate_deployment_scriptB

Generate deployment scripts for GenLayer contracts supporting different networks (localnet, studionet, testnet) with configuration options

Inputs: script_type (required), contract_path (required), network_target, constructor_args, +1 more.

generate_genlayerjs_integrationC

Generate GenLayerJS integration code for frontend applications including contract interaction, transaction handling, and event monitoring

Inputs: integration_type (required), framework, contract_methods, network_config.

generate_intelligent_contractB

Generate a comprehensive GenLayer Intelligent Contract with advanced features including LLM integration, web data access, and proper GenLayer syntax

Inputs: contract_name (required), requirements (required), use_llm, web_access, +2 more.

generate_project_boilerplateB

Generate a complete GenLayer project structure with contracts, tests, deployment scripts, and frontend integration

Inputs: project_name (required), project_type, include_frontend, frontend_framework, +3 more.

generate_testing_frameworkC

Generate comprehensive testing setups for GenLayer contracts including unit tests, integration tests, and end-to-end testing strategies

Inputs: test_framework (required), test_types, contract_features, mock_external_services.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    A3.6/5.0

    Scored across 16 tools

    Disambiguation5/5

    Each tool targets a distinct aspect of GenLayer development: adding specific features, creating specific contract types, generating code/documentation, or explaining concepts. There is no overlap between tools like `generate_intelligent_contract` and `generate_contract_template` as they differ in scope and output.

    Naming Consistency5/5

    All tool names follow a consistent `verb_noun` pattern in snake_case (e.g., `create_prediction_market`, `generate_deployment_script`). The verbs are appropriate and uniform, making the set predictable and easy to navigate.

    Tool Count5/5

    With 16 tools, the server covers the full development lifecycle for GenLayer contractsโ€”creation, modification, learning, documentation, deployment, testing, and integrationโ€”without being overwhelming or sparse.

    Completeness5/5

    The tool surface addresses all key stages of contract development: creating contracts (templates, intelligent contracts), adding features, learning concepts, obtaining docs, generating deployment/testing/integration code, and debugging. No obvious gaps exist for the stated purpose.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers