# Steledger

Connects AI agents to the Emercoin blockchain to persist identity and memory records. Useful when you need durable, decentralized state tracking across agent sessions.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 1
- Author: steledger
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/steledger/steledger-gateway/tree/HEAD/mcp_server
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/steledger

## What it does

Steledger functions as an MCP client over the HTTP API of the edge gateway. It enables an agent to interact directly with Emercoin: storing content hashes via `store_memory`, registering identities with `register_identity`, and reading NVS entries via `read_record`. When multiple entries need to be recorded together, `store_memory_batch` writes them in a single transaction.

Authentication integrates with GitHub through the device authorization flow. Calling `login` initiates the process and returns a code for the user, while `login_poll` waits for confirmation and caches the resulting JWT. In automated pipelines or local testing, `login_with_token` accepts an existing GitHub token directly.

Write operations stay locked without credentials. If `GATEWAY_JWT` is not passed at startup, the agent must complete the interactive login sequence before submitting records. The target service address is configured through `GATEWAY_URL`, which points to `http://localhost:8000` by default.

## Requirements
- Needs: Docker
- Remote server: `https://api.steledger.com/mcp`
- Environment variables: `GATEWAY_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

1. **Platform CLI: remote server**
```bash
claude mcp add --transport http gateway https://api.steledger.com/mcp
```

2. **Platform CLI**
```bash
claude mcp add --env GATEWAY_URL=<GATEWAY_URL> --transport stdio mcp_server -- docker run -i --rm -e GATEWAY_URL ghcr.io/steledger/mcp:latest
```
Replace <…> with your own values

### Codex

1. **Platform CLI: remote server**
```bash
codex mcp add mcp_server --url https://api.steledger.com/mcp
```

2. **Platform CLI**
```bash
codex mcp add mcp_server --env GATEWAY_URL=<GATEWAY_URL> -- docker run -i --rm -e GATEWAY_URL ghcr.io/steledger/mcp:latest
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp_server": {
            "url": "https://api.steledger.com/mcp"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp_server": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "-e",
                "GATEWAY_URL",
                "ghcr.io/steledger/mcp:latest"
            ],
            "env": {
                "GATEWAY_URL": "<GATEWAY_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp_server": {
            "type": "http",
            "url": "https://api.steledger.com/mcp"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp_server": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "-e",
                "GATEWAY_URL",
                "ghcr.io/steledger/mcp:latest"
            ],
            "env": {
                "GATEWAY_URL": "<GATEWAY_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t http mcp_server https://api.steledger.com/mcp
```

2. **Platform CLI**
```bash
gemini mcp add -e GATEWAY_URL=<GATEWAY_URL> mcp_server docker run -i --rm -e GATEWAY_URL ghcr.io/steledger/mcp:latest
```
Replace <…> with your own values

## When to use it
- anchor AI agent identity to an Emercoin blockchain address
- write content hashes and metadata into decentralized memory
- commit a batch of memory records in one atomic transaction
- read existing NVS records by name without credentials
- authenticate the agent session using the GitHub device flow

## Example prompts
- Start GitHub device login and output the code for authentication
- Register agent identity for address EMC_KEY with project metadata
- Retrieve the memory entry named session_checkpoint from NVS

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
