# Chromia MCP Server · Chromia Docs (concept)

> A Model Context Protocol (MCP) server that provides access to Chromia blockchain infrastructure and deployed dapps through the Chromia Explorer.

Source: https://docs.chromia.com/build/clients/mcp-server/

# Chromia MCP Server

On this page

* [Overview](#overview)
* [Documentation Tools](#documentation-tools)
* [Setup](#setup)
* [Production/Remote Server](#productionremote-server)
* [Local Server](#local-server)
* [Claude Rell LSP Integration](#claude-rell-lsp-integration)
* [Installation](#installation)
* [Configuration](#configuration)
* [Usage Examples](#usage-examples)
* [Basic Network Statistics](#basic-network-statistics)
* [Advanced Blockchain Querying](#advanced-blockchain-querying)
* [Rell Query Translation to SQL and vice versa](#rell-query-translation-to-sql-and-vice-versa)
* [Networks](#networks)

A Model Context Protocol (MCP) server that provides access to Chromia blockchain infrastructure and deployed dapps
through the Chromia Explorer.

## Overview

The MCP Server enables AI assistants to query and analyze Chromia blockchain data, including:

* Network statistics and analytics
* Blockchain information and metadata
* Transaction data and analysis
* Asset information and distribution
* Account activity and analytics
* Node performance monitoring
* dapp development and deployment information
* Documentation retrieval and search

## Documentation Tools

The server includes **RAG-powered (Retrieval-Augmented Generation) semantic documentation search** that uses vector
embeddings to find relevant documentation based on meaning, not just keywords. The AI assistant will automatically use
semantic search to find and return the most relevant documentation sections.

## Setup

### Production/Remote Server

Use the following JSON configuration to connect to the production MCP server:

JSON

```
{
  "mcpServers": {
    "chromia-mcp": {
      "url": "https://mcp.chromia.dev"
    }
  }
}
```

**Cursor/Windsurf IDEs:**

* Open Cursor settings and navigate to **MCP & Integration** → **MCP TOOLS**
* Add the JSON configuration above

**Claude Desktop:**

* Edit your Claude Desktop configuration file:
  + **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
  + **Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
* Add the JSON configuration above

**JetBrains AI Assistant:**

* Go to Settings → Tools → AI Assistant → MCP
* Click on `+` to open the add dialog
* In the dropdown switch from "Command" to "As JSON" and paste the JSON configuration above

**ChatGPT:**

* Enable developer mode: Go to Settings → Apps → Advanced → Developer mode
* Import Chromia MCP:
  + Open Workspace settings → Apps → Create
  + Enter the following:
    - MCP Server URL: `https://mcp.chromia.dev`
    - Authentication: No authentication
  + Click Create
  + In app details, new tool lists and descriptions from the MCP server will be shown

### Local Server

To be able to use the MCP server locally, you need to build and run it from the source code.

1. **Clone the chromia-mcp repository:**

   Clone the [chromia-mcp repository](https://gitlab.com/chromaway/core-tools/chromia-mcp):

   Terminal

   ```
   git clone https://gitlab.com/chromaway/core-tools/chromia-mcp.git
   cd chromia-mcp
   ```
2. **Run the application:**

   Run the application using gradle in SSE mode:

   Terminal

   ```
   ./gradlew :app:runSse
   ```

   This will start the MCP server in SSE mode on `127.0.0.1:3001` by default.
3. **Configure your AI assistant:**

   Use the following JSON configuration to connect to the local MCP server:

   JSON

   ```
   {
     "mcpServers": {
       "chromia-mcp": {
         "url": "http://127.0.0.1:3001"
       }
     }
   }
   ```

   **Cursor/Windsurf IDEs:**

   * Open Cursor settings and navigate to **MCP & Integration** → **MCP TOOLS**
   * Add the JSON configuration above

   **Claude Desktop:**

   * Edit your Claude Desktop configuration file:
     + **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
     + **Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
   * Add the JSON configuration above

   **JetBrains AI Assistant:**

   * Go to Settings → Tools → AI Assistant → MCP
   * Click on `+` to open the add dialog
   * In the dropdown switch from "Command" to "As JSON" and paste the JSON configuration above

## Claude Rell LSP Integration

For enhanced Rell code understanding and analysis, you can also install the Chromia LSP MCP server alongside this
blockchain MCP server. The LSP MCP server provides Claude with direct access to Rell language server capabilities for
better code comprehension and analysis.

note

When using the MCP through an IDE (cursor, windsurf, etc) this information is already available for your Agent.

### Installation

Terminal

```
npm install @chromia/chromia-lsp-mcp -g
```

### Configuration

Add the LSP MCP server to your MCP configuration

JSON

```
{
  "mcpServers": {
    "lsp-mcp": {
      "command": "npx",
      "args": ["chromia-lsp-mcp", "0.8.8"]
    }
  }
}
```

note

The second argument `"0.8.8"` is optional and specifies the Rell LSP version to use. If omitted, the latest version will
be used.

This combination provides Claude with both blockchain data access and deep Rell code understanding capabilities.

## Usage Examples

### Basic Network Statistics

**Example Query: What is the BRID of My Neighbor Alice, and in which cluster and container is it deployed?**

Click to expand answer

Based on the search results, here's the information about My Neighbor Alice blockchains on Chromia mainnet:

**My Neighbor Alice Blockchain Information**

I found **4 My Neighbor Alice blockchains** on mainnet:

**Active/Running Blockchains:**

1. **Main My Neighbor Alice Blockchain**

   * **BRID (Blockchain RID)**: `F31D7A38B33D12A5D948EE9CF170983A7CA5EFFFAAA31094C5B9CF94442D9FA2`
   * **Name**: `my_neighbor_alice`
   * **Cluster**: `pink`
   * **Container**: `611062cdf1047b265b652d229858e5a18dbf487afbb62f0f6d30ec4fd81366f9`
   * **State**: `RUNNING` ✅
2. **My Neighbor Alice BS2**

   * **BRID**: `8BC5E4DAA94410BEC640DAEE87CE5C546465C2E7E8D654668BA6267200C97560`
   * **Name**: `my_neighbor_alice_bs2`
   * **Cluster**: `pink`
   * **Container**: `9f49e091ff1929bc6438a9ee9c5387ec7991eb5eda4154cd7509dd878aa9f70e`
   * **State**: `RUNNING` ✅

**Removed/Legacy Blockchains:**

3. **Legacy Instance 1**

   * **BRID**: `9F0CCB09BBB441E840035086F5326294F51FFA92344D39FFF54B223C7547D81D`
   * **State**: `REMOVED`
4. **Legacy Instance 2**

   * **BRID**: `AEBD8E8CD9FCC268D7B5AC3DAC8855F1F9A817B8DD1A98C0F13E60D01DECB90C`
   * **State**: `REMOVED`

**Summary**

The **currently active My Neighbor Alice** deployment is:

* **Primary BRID**: `F31D7A38B33D12A5D948EE9CF170983A7CA5EFFFAAA31094C5B9CF94442D9FA2`
* **Deployed in**: `pink` cluster
* **Container ID**: `611062cdf1047b265b652d229858e5a18dbf487afbb62f0f6d30ec4fd81366f9`

Both active blockchains are running in the **pink cluster**, which suggests this is a multi-blockchain deployment for
the My Neighbor Alice game ecosystem.

**Other query examples:**

Plain text

```
Get network statistics and analytics for the Chromia Mainnet environment
```

Plain text

```
What is the brid of my neighbor alice, and in which cluster and container it is deployed on
```

Plain text

```
Get the latest 10 transactions on Mainnet with operation type "transfer"
```

Plain text

```
Show activity for account ID: DEF456... across all blockchains
```

Plain text

```
Which account holds most of CHR asset on mainnet
```

Plain text

```
How many active users does my neighbor Alice's dApp have on mainnet?
```

Plain text

```
How to register an account using FT4 open strategy in Rell, can you provide TypeScript client code as well
```

Plain text

```
what is the difference between query and operation in Rell
```

Plain text

```
Could you create a Rell application for managing books that includes FT4 account registration functionality
```

Plain text

```
how to use Chromia CLI to deploy my newly created dapp on testnet
```

Plain text

```
What are the steps to deploy a dApp on Chromia testnet using CLI?
```

Plain text

```
How do I configure network settings for a Chromia blockchain?
```

### Advanced Blockchain Querying

You can query specific dapps deployed on Chromia networks and execute their custom queries:

Plain text

```
Can you run get all libraries query against library chain dApp on testnet?
```

**Expected workflow:**

1. The AI will search for blockchains with "library chain" on testnet
2. Retrieves the blockchain RID
3. Fetches the dapp structure to discover available queries and operations using `Postchain Client`
4. Executes the `get_all_libraries` query inside Cursor/Junie...
5. Returns the results from the library dapp

**Other examples of blockchain-specific queries:**

Plain text

```
Get the deployed dApp structure for My Neighbor Alice on mainnet
```

Plain text

```
Run the get_user_balance query on MNA blockchain for account ABC123
```

Plain text

```
Can you list all the queries available for My Neighbor Alice on mainnet ?
```

### Rell Query Translation to SQL and vice versa

* Simple SELECT translation:

SQL

```
"Can you translate this SQL query to Rell?
SELECT name, genre FROM plays WHERE duration_minutes > 120;"
```

* JOIN queries:

SQL

```
How would I write this SQL join in Rell?
SELECT p.name, t.name, b.timestamp
FROM bookings b
JOIN performances p ON b.performance_id = p.id
JOIN theater_halls t ON p.theater_id = t.id
WHERE b.status = 'CONFIRMED';"
```

* Aggregation queries:

SQL

```
Convert this SQL aggregation to Rell syntax:
SELECT play_name, COUNT(*) as total_bookings, SUM(price) as revenue
FROM bookings b
JOIN performances p ON b.performance_id = p.id
GROUP BY play_name
HAVING COUNT(*) > 5;"
```

* Subqueries:

SQL

```
How do I write this SQL subquery in Rell?
SELECT name FROM plays
WHERE id IN (
    SELECT play_id FROM performances
    WHERE timestamp > NOW()
);"
```

* Complex conditions:

SQL

```
Translate this SQL query with multiple conditions to Rell:
SELECT DISTINCT p.name, t.name
FROM plays p
JOIN performances pf ON p.id = pf.play_id
JOIN theater_halls t ON pf.theater_id = t.id
WHERE p.genre = 'DRAMA'
AND pf.timestamp BETWEEN ? AND ?
AND EXISTS (
    SELECT 1 FROM bookings b
    WHERE b.performance_id = pf.id
);"
```

* From Rell to SQL

TypeScript

```
Can you translate this Rell query to SQL?
(b: bookings, p: performances) @* {
    b.performance_id == p.id
} (
    @group play_name = p.play_name,
    total_bookings = @sum 1,
    revenue = @sum b.price
) @* {
    .total_bookings > 5
}
```

When asking it's helpful to:

1. Provide the complete SQL/Rell query with proper formatting
2. Specify any relevant entity structures when working with an external project
3. Mention any special requirements (e.g., sorting, limiting, null handling)
4. Include context about the data model if it's not obvious

Example complete prompt:

TypeScript

```
I have these entities in my Rell code:

entity play {
    name: text;
    genre: text;
    duration: integer;
}

entity performance {
    play: play;
    date: timestamp;
    status: text;
}

Can you help me translate this SQL query to Rell?

SELECT p.name, COUNT(pf.id) as performance_count
FROM plays p
LEFT JOIN performances pf ON p.id = pf.play_id
WHERE p.genre = 'DRAMA'
GROUP BY p.name
HAVING COUNT(pf.id) > 5
ORDER BY performance_count DESC;"
```

This format provides all the necessary context for accurate translation. The AI can understand:

1. The exact data structure
2. The relationships between entities
3. The desired query logic
4. Any special requirements for the output

## Networks

The server supports multiple Chromia networks:

* **Mainnet** - Production network
* **Testnet** - Testing network

Specify the network parameter in your queries to target the appropriate environment.

[View this page on docs.chromia.com](https://docs.chromia.com/build/clients/mcp-server/)Content mirrored from the live docs
