# U2 MCP Server

Connects Claude Code to Rocket Universe and UniData through MCP. The agent can inspect records, run database queries, and explore file dictionaries.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: bpamiri
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/bpamiri/u2-mcp
- Updated: 2026-02-09
- HTML: https://affpapa.org/en/nevibecode/mcp/u2-mcp-server

## What it does

U2 MCP Server gives an AI assistant an MCP connection to Rocket Universe and UniData MultiValue databases. It exposes tools for listing files, reading and changing records, running RetrieVe or UniQuery statements, issuing TCL/ECL commands, and inspecting dictionary definitions. It also supports cataloged BASIC subroutines and transaction commit or rollback.

The server runs with `uvx u2-mcp` or from the installed `u2-mcp` Python package. Setup requires Python 3.10+, access to a Rocket Universe or UniData server, and the `U2_HOST`, `U2_USER`, `U2_PASSWORD`, `U2_ACCOUNT`, and `U2_SERVICE` environment variables. The `uopy` package is installed as a dependency. Without database access, the server cannot run queries.

Configuration can switch off writes, cap SELECT results, and block selected TCL commands. U2 MCP Server can also store database notes about files, fields, and useful queries in a knowledge file for later sessions.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `U2_HOST`, `U2_USER`, `U2_PASSWORD`, `U2_ACCOUNT`, `U2_SERVICE`, `U2_PORT`, `U2_SSL`, `U2_READ_ONLY`, `U2_MAX_RECORDS`, `U2_BLOCKED_COMMANDS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env U2_HOST=<U2_HOST> --env U2_USER=<U2_USER> --env U2_PASSWORD=<U2_PASSWORD> --env U2_ACCOUNT=<U2_ACCOUNT> --env U2_SERVICE=<U2_SERVICE> --transport stdio u2-mcp-server -- uvx u2-mcp
```
Replace <…> with your own values. 5 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from u2-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add u2-mcp-server --env U2_HOST=<U2_HOST> --env U2_USER=<U2_USER> --env U2_PASSWORD=<U2_PASSWORD> --env U2_ACCOUNT=<U2_ACCOUNT> --env U2_SERVICE=<U2_SERVICE> -- uvx u2-mcp
```
Replace <…> with your own values. 5 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from u2-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "u2-mcp-server": {
            "command": "uvx",
            "args": [
                "u2-mcp"
            ],
            "env": {
                "U2_HOST": "<U2_HOST>",
                "U2_USER": "<U2_USER>",
                "U2_PASSWORD": "<U2_PASSWORD>",
                "U2_ACCOUNT": "<U2_ACCOUNT>",
                "U2_SERVICE": "<U2_SERVICE>"
            }
        }
    }
}
```
Replace <…> with your own values. 5 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from u2-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "u2-mcp-server": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "u2-mcp"
            ],
            "env": {
                "U2_HOST": "<U2_HOST>",
                "U2_USER": "<U2_USER>",
                "U2_PASSWORD": "<U2_PASSWORD>",
                "U2_ACCOUNT": "<U2_ACCOUNT>",
                "U2_SERVICE": "<U2_SERVICE>"
            }
        }
    }
}
```
Replace <…> with your own values. 5 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from u2-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e U2_HOST=<U2_HOST> -e U2_USER=<U2_USER> -e U2_PASSWORD=<U2_PASSWORD> -e U2_ACCOUNT=<U2_ACCOUNT> -e U2_SERVICE=<U2_SERVICE> u2-mcp-server uvx u2-mcp
```
Replace <…> with your own values. 5 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from u2-mcp <command>

## When to use it
- connect Claude Code to a Rocket Universe or UniData database
- read a record by ID from a database file
- run a RetrieVe or UniQuery statement
- inspect a file dictionary and field definitions
- preserve database notes between sessions

## Example prompts
- List the files available in my database account.
- Read record `CUST001` from `CUSTOMERS` and explain the fields.
- Count open invoices above 1000 without changing any records.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89899
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16730
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40459
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27844
- [Metabase](https://affpapa.org/en/nevibecode/mcp/metabase.md) — MCP server · ★ 49863

---
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
