Skip to main content

MCP Integration

Introduction

The Model Context Protocol (MCP) enables AI assistants to interact directly with ChainLaunch for blockchain management. This guide covers how to set up and configure MCP with various AI tools and development environments.

Overview

ChainLaunch provides an MCP server that allows AI tools to:

  • List and manage blockchain networks
  • Create and configure nodes
  • Manage cryptographic keys
  • Deploy and manage smart contracts
  • Monitor system status

MCP Overview

Key Features

  • 15 Tools: Comprehensive blockchain management operations
  • 2 Interactive Prompts: Guided workflows for complex operations
  • 1 Resource: Real-time network data streaming
  • Streamable HTTP Transport: Modern, efficient communication

Server Information

PropertyValue
Version1.0.0
Protocol Version2024-11-05
Transportstreamable-http
Librarygithub.com/mark3labs/mcp-go

Quick Start

Prerequisites

  1. ChainLaunch running and accessible
  2. An API key with the MCP role (see API Keys)
  3. Your preferred AI tool installed

Setup Steps

  1. Create an API Key: Generate an API key with the MCP role
  2. Choose Your AI Client: Select from the options below
  3. Test the Connection: Ask your AI: "What ChainLaunch MCP tools are available?"

Expected response: 15 tools and 1 resource

MCP Endpoint

http://localhost:3100/api/v1/mcp/stream

Replace localhost:3100 with your ChainLaunch server address in production.


Client Setup Instructions

CLI Tools

Claude Code (Anthropic)

Claude Code is the official CLI tool from Anthropic with native MCP support.

claude mcp add chainlaunch \
--url http://localhost:3100/api/v1/mcp/stream \
--header "Authorization: Bearer YOUR_API_KEY"

Verification:

claude mcp list

Amazon Q Developer

q mcp add chainlaunch \
--url "http://localhost:3100/api/v1/mcp/stream" \
--header "Authorization: Bearer YOUR_API_KEY"

Code Editors

VS Code

Add to your MCP settings (.vscode/settings.json or global settings):

{
"mcpServers": {
"chainlaunch": {
"command": "curl",
"args": [
"-X", "GET",
"-H", "Authorization: Bearer YOUR_API_KEY",
"http://localhost:3100/api/v1/mcp/stream"
]
}
}
}

Cursor

  1. Open SettingsMCP
  2. Click Add new server
  3. Configure:
FieldValue
Namechainlaunch
Typeurl
URLhttp://localhost:3100/api/v1/mcp/stream
HeadersAuthorization: Bearer YOUR_API_KEY

Windsurf

Add to your MCP configuration:

{
"mcpServers": {
"chainlaunch": {
"command": "npx",
"args": ["@modelcontextprotocol/server-fetch"],
"env": {
"MCP_SERVER_URL": "http://localhost:3100/api/v1/mcp/stream",
"AUTHORIZATION": "Bearer YOUR_API_KEY"
}
}
}
}

Continue.dev

Add to config.json:

{
"experimental": {
"modelContextProtocol": true
},
"mcpServers": {
"chainlaunch": {
"command": "npx",
"args": ["@modelcontextprotocol/server-fetch"],
"env": {
"MCP_SERVER_URL": "http://localhost:3100/api/v1/mcp/stream",
"AUTHORIZATION": "Bearer YOUR_API_KEY"
}
}
}
}

Zed

  1. Install the MCP extension from Extensions
  2. Add to settings.json:
{
"language_models": {
"chainlaunch": {
"mcp_servers": {
"chainlaunch": {
"command": "npx",
"args": ["@modelcontextprotocol/server-fetch"],
"env": {
"MCP_SERVER_URL": "http://localhost:3100/api/v1/mcp/stream",
"AUTHORIZATION": "Bearer YOUR_API_KEY"
}
}
}
}
}
}

AI Assistants

Claude Desktop

Add to your Claude Desktop config file:

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

{
"mcpServers": {
"chainlaunch": {
"command": "npx",
"args": ["@modelcontextprotocol/server-fetch"],
"env": {
"MCP_SERVER_URL": "http://localhost:3100/api/v1/mcp/stream",
"AUTHORIZATION": "Bearer YOUR_API_KEY"
}
}
}
}

Goose

  1. Open Advanced settingsExtensions
  2. Configure:
FieldValue
NameChainLaunch
TypeHTTP
URLhttp://localhost:3100/api/v1/mcp/stream
HeadersAuthorization: Bearer YOUR_API_KEY

Gemini CLI

Add to settings.json:

{
"mcpServers": {
"chainlaunch": {
"command": "npx",
"args": ["@modelcontextprotocol/server-fetch"],
"env": {
"MCP_SERVER_URL": "http://localhost:3100/api/v1/mcp/stream",
"AUTHORIZATION": "Bearer YOUR_API_KEY"
}
}
}
}

Development Tools

Cline/Clineage

Install from VS Code marketplace, then configure:

{
"mcpServers": {
"chainlaunch": {
"command": "npx",
"args": ["@modelcontextprotocol/server-fetch"],
"env": {
"MCP_SERVER_URL": "http://localhost:3100/api/v1/mcp/stream",
"AUTHORIZATION": "Bearer YOUR_API_KEY"
}
}
}
}

LM Studio

  1. Go to ProgramInstall
  2. Edit mcp.json:
{
"chainlaunch": {
"command": "npx",
"args": ["@modelcontextprotocol/server-fetch"],
"env": {
"MCP_SERVER_URL": "http://localhost:3100/api/v1/mcp/stream",
"AUTHORIZATION": "Bearer YOUR_API_KEY"
}
}
}

OpenCode

Add to ~/.config/opencode/opencode.json:

{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"chainlaunch": {
"type": "remote",
"url": "http://localhost:3100/api/v1/mcp/stream",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
},
"enabled": true
}
}
}

Desktop & Mobile Apps

BoltAI

  1. Open SettingsMCP Servers
  2. Configure:
FieldValue
NameChainLaunch
Server URLhttp://localhost:3100/api/v1/mcp/stream
API KeyYOUR_API_KEY

Perplexity Desktop

  1. Open Pro featuresIntegrations
  2. Configure:
FieldValue
Integration TypeMCP Server
Endpointhttp://localhost:3100/api/v1/mcp/stream
Auth TokenYOUR_API_KEY

IDEs & Enterprise

JetBrains AI Assistant

  1. Open AI Assistant settingsMCP
  2. Configure:
FieldValue
Server URLhttp://localhost:3100/api/v1/mcp/stream
Auth HeaderAuthorization: Bearer YOUR_API_KEY
TransportHTTP

Visual Studio 2022

  1. Open GitHub CopilotMCP servers
  2. Configure:
FieldValue
Namechainlaunch
Endpointhttp://localhost:3100/api/v1/mcp/stream
HeadersAuthorization: Bearer YOUR_API_KEY

Warp Terminal

  1. Open AI settingsMCP integration
  2. Configure:
FieldValue
Serverchainlaunch
URLhttp://localhost:3100/api/v1/mcp/stream
AuthBearer YOUR_API_KEY

Direct HTTP Integration

For custom integrations or unsupported clients:

PropertyValue
Endpointhttp://localhost:3100/api/v1/mcp/stream
MethodGET/POST
HeadersAuthorization: Bearer YOUR_API_KEY
Content-Typeapplication/json

Available Tools

ChainLaunch MCP provides 15 tools for blockchain management:

MCP Tools

Network Management

ToolDescriptionParameters
networks_listList all blockchain networkslimit, offset, platform
networks_join_peerJoin a peer node to a Fabric networknetwork_id, peer_id
networks_join_ordererJoin an orderer node to a Fabric networknetwork_id, orderer_id

Node Management

ToolDescriptionParameters
nodes_listList blockchain nodeslimit, offset, network_id, platform
fabric_create_peerCreate a new Fabric peer nodename, msp_id, organization_id, external_endpoint
fabric_create_ordererCreate a new Fabric orderer nodename, msp_id, organization_id, external_endpoint
fabric_join_nodeJoin a node to a Fabric networknetwork_id, node_id, role

Key Management

ToolDescriptionParameters
keys_listList cryptographic keyslimit, offset
keys_createCreate a new cryptographic keyname, algorithm, key_size

Organization Management

ToolDescriptionParameters
fabric_create_orgCreate a new Fabric organizationname, msp_id, organization_type
fabric_add_org_to_networkAdd organization to running networknetwork_id, organization_id

Testnet Creation

ToolDescriptionParameters
testnet_create_fabricCreate a Fabric testnetname, channel_name, consensus_type, peer_orgs_count, orderer_orgs_count, peers_per_org, mode
testnet_create_besuCreate a Besu testnet with validatorsname, nodes, prefix, version, provider_id, mode, initial_balances

System

ToolDescriptionParameters
settings_listList system settingsNone
system_infoGet system information and statusNone

Interactive Prompts

ChainLaunch MCP provides guided workflows for complex operations:

MCP Prompts

PromptDescription
network_configGenerate blockchain network configuration
deploy_contractGenerate smart contract deployment instructions

Available Resources

Subscribe to real-time data streams:

MCP Resources

ResourceURITypeDescription
Networkschainlaunch://networksapplication/jsonLive blockchain networks data

Authentication

MCP requires authentication using API keys. The following roles are supported:

RoleAccess Level
ADMINFull access to all MCP tools
OPERATORCreate/manage networks and nodes
VIEWERRead-only access
MCPSpecialized access for AI agents (recommended)

Tip: Use the MCP role for AI integrations. It provides the optimal permission set for AI agent operations.

Creating an MCP API Key

  1. Navigate to SettingsAPI Keys
  2. Click Create API Key
  3. Select the MCP role
  4. Copy the generated key immediately (it won't be shown again)

For detailed instructions, see API Keys.


Example Usage

Once connected, you can interact with ChainLaunch through natural language:

List Networks

"Show me all the blockchain networks"

Create a Fabric Testnet

"Create a Fabric testnet with 2 peer organizations and 3 orderers using etcdraft consensus"

Get System Status

"What's the current system status?"

Create a Key

"Create a new ECDSA key named 'production-key'"

Deploy Besu Network

"Create a Besu testnet with 4 validators"


Troubleshooting

Connection Issues

IssueSolution
Connection refusedVerify ChainLaunch is running and accessible
401 UnauthorizedCheck your API key is valid and has the correct role
403 ForbiddenEnsure your API key has MCP or sufficient permissions
Timeout errorsCheck network connectivity; increase timeout settings

Common Problems

"MCP server not found"

  • Verify the endpoint URL is correct
  • Ensure ChainLaunch is running on the expected port
  • Check firewall settings

"Authentication failed"

  • Regenerate your API key
  • Verify the key hasn't expired
  • Ensure the Authorization header format is correct: Bearer YOUR_API_KEY

"Tool not available"

  • Check your API key has sufficient permissions
  • Verify ChainLaunch version supports the requested tool
  • Try refreshing the MCP connection

Testing the Connection

Use curl to verify the MCP endpoint is accessible:

curl -X GET "http://localhost:3100/api/v1/mcp/stream" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"

A successful response indicates the MCP server is working correctly.


Best Practices

Security

  1. Use dedicated API keys: Create separate keys for each AI tool
  2. Use the MCP role: It provides appropriate permissions for AI operations
  3. Set expiration dates: Rotate keys regularly
  4. Monitor usage: Review API key activity in Audit Logs

Performance

  1. Use specific queries: Be precise in your requests to reduce response time
  2. Leverage prompts: Use interactive prompts for complex multi-step operations
  3. Cache responses: For read-heavy operations, implement caching in your workflow

Development

  1. Start with Viewer role: Test with read-only access before enabling write operations
  2. Use testnet tools: Create testnets for development and testing
  3. Review tool parameters: Check required vs optional parameters before calling tools

Additional Resources