home / mcp / u2-mcp mcp server

u2-mcp MCP Server

Provides an MCP server that lets Claude interact with Universe/UniData databases using natural language.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bpamiri-u2-mcp": {
      "url": "http://your-server:8080/sse",
      "headers": {
        "U2_HOST": "server.example.com",
        "U2_USER": "username",
        "U2_ACCOUNT": "MYACCOUNT",
        "U2_SERVICE": "uvcs",
        "U2_PASSWORD": "password",
        "U2_HTTP_HOST": "0.0.0.0",
        "U2_HTTP_PORT": "8080",
        "U2_HTTP_CORS_ORIGINS": "*"
      }
    }
  }
}

You can connect Claude to your Universe/UniData databases using natural language with u2-mcp. This MCP server translates plain English questions into database queries and returns readable results, enabling you to interact with your data without writing complex queries.

How to use

You interact with the u2-mcp server through an MCP client such as Claude. Start by launching the server in either local stdio mode or centralized HTTP mode. Then configure your client to point to the MCP server and begin asking questions in natural language. The server handles connection management, file operations, dictionary access, and query execution against Universe/UniData, returning concise, human-friendly results.

How to install

Follow these steps to install and get started.

pip install u2-mcp

If you prefer isolated execution, you can run the MCP server with uvx.

uvx u2-mcp

Optional: run the HTTP/SSE centralized server for team use.

# Basic HTTP server on default port
u2-mcp --http

# Custom host and port
u2-mcp --http --host 0.0.0.0 --port 3000

# Or using environment variables
export U2_HTTP_HOST=0.0.0.0
export U2_HTTP_PORT=3000
u2-mcp --http

For a Docker deployment, you can build and run the HTTP server in a container.

FROM python:3.12-slim

RUN pip install u2-mcp

ENV U2_HOST=your-universe-server
ENV U2_USER=username
ENV U2_PASSWORD=password
ENV U2_ACCOUNT=MYACCOUNT
ENV U2_HTTP_PORT=8080

EXPOSE 8080

CMD ["u2-mcp", "--http"]
docker build -t u2-mcp-server .
docker run -p 8080:8080 u2-mcp-server

Configuration and runtime options

You can connect to your database by exporting environment variables for the target Universe/UniData server.

export U2_HOST=server.example.com
export U2_USER=username
export U2_PASSWORD=password
export U2_ACCOUNT=MYACCOUNT
export U2_SERVICE=uvcs  # or 'udcs' for UniData

If you run in HTTP mode, you can adjust these options.

export U2_HTTP_HOST=0.0.0.0
export U2_HTTP_PORT=8080
export U2_HTTP_CORS_ORIGINS=*  # or specify a comma-separated list

Claude Desktop integration (configuring the client)

Configure Claude Desktop to talk to u2-mcp using the example MCP entry.

{
  "mcpServers": {
    "u2": {
      "command": "uvx",
      "args": ["u2-mcp"],
      "env": {
        "U2_HOST": "server.example.com",
        "U2_USER": "user",
        "U2_PASSWORD": "password",
        "U2_ACCOUNT": "MYACCOUNT"
      }
    }
  }
}

How knowledge persistence works

The MCP server can save learned information about your database so Claude can recall it in future conversations.

# The knowledge topic is saved via the save_knowledge tool
# Example in a conversation
Claude: I found that AR-CUST is the customer master file. Let me save this for future reference.
[Calls save_knowledge("AR-CUST file", "Customer master file. Key is customer number. Field 1=name, Field 2=address...")]

Security and multi-user deployment notes

- Credentials are never logged. - You can enable read-only mode to prevent writes. - The server respects Universe’s built-in security model for access control.

What you can do with the MCP server

The server provides a practical set of capabilities to work with Universe/UniData through natural language queries, including file operations, dictionary access, subroutine calls, and safe query execution.

Notes and troubleshooting

If you run into issues, ensure environment variables are correctly set, the target Universe/UniData server is reachable, and the HTTP service is listening on the expected host/port.

Available tools

connect

Establish a connection to the Universe/UniData server

disconnect

Close active connections

list_connections

Show all active connections

list_files

List files available in the account

read_record

Read a single record by ID from a file

read_records

Read multiple records from a file

write_record

Write or update a record in a file while preserving MultiValue semantics

delete_record

Delete a record from a file

get_file_info

Get statistics for a file

execute_query

Run RetrieVe/UniQuery statements with safety controls

execute_tcl

Run TCL/ECL commands on the server

get_select_list

Execute a SELECT and return matching record IDs

list_dictionary

List items in a dictionary for a file

get_field_definition

Retrieve details about a specific field in a file

describe_file

Provide a high-level description of a file's structure

call_subroutine

Execute a cataloged BASIC subroutine

begin_transaction

Begin a database transaction

commit_transaction

Commit the current transaction

rollback_transaction

Rollback the current transaction

save_knowledge

Save learned information about the database for future conversations

list_knowledge

List all saved knowledge topics

get_knowledge_topic

Retrieve a specific saved knowledge topic

search_knowledge

Search across saved knowledge topics

delete_knowledge

Remove a saved knowledge topic