U2 MCP Server — Claude Code MCP server: install guide
Connects Claude Code to Rocket Universe and UniData through MCP. The agent can inspect records, run database queries, and explore file dictionaries.
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-mcpWhat U2 MCP Server 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.
What it helps with
- 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 for the agent
- List the files available in my database account.
- Read record
CUST001fromCUSTOMERSand explain the fields. - Count open invoices above 1000 without changing any records.
How to install U2 MCP Server
Platform CLI
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-mcpReplace <…> 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>
Platform CLI
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-mcpReplace <…> 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>
Config file
{
"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>
Config file
{
"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>
Platform CLI
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-mcpReplace <…> 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>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about U2 MCP Server
How do I install U2 MCP Server in Claude Code?
Run `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`. This registers the server and supplies its database connection settings.
What does U2 MCP Server do?
It connects an AI assistant to Rocket Universe and UniData MultiValue databases. The assistant can use MCP tools to inspect files, read or write records, run queries, view dictionaries, and manage transactions.
Which databases does U2 MCP Server support?
It supports Rocket Universe and UniData MultiValue databases. Set U2_SERVICE to uvcs for Universe or udcs for UniData.