home / mcp / u2-mcp mcp server
Provides an MCP server that lets Claude interact with Universe/UniData databases using natural language.
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.
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.
Follow these steps to install and get started.
pip install u2-mcpIf you prefer isolated execution, you can run the MCP server with uvx.
uvx u2-mcpOptional: 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 --httpFor 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-serverYou 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 UniDataIf 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 listConfigure 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"
}
}
}
}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...")]- 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.
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.
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.
Establish a connection to the Universe/UniData server
Close active connections
Show all active connections
List files available in the account
Read a single record by ID from a file
Read multiple records from a file
Write or update a record in a file while preserving MultiValue semantics
Delete a record from a file
Get statistics for a file
Run RetrieVe/UniQuery statements with safety controls
Run TCL/ECL commands on the server
Execute a SELECT and return matching record IDs
List items in a dictionary for a file
Retrieve details about a specific field in a file
Provide a high-level description of a file's structure
Execute a cataloged BASIC subroutine
Begin a database transaction
Commit the current transaction
Rollback the current transaction
Save learned information about the database for future conversations
List all saved knowledge topics
Retrieve a specific saved knowledge topic
Search across saved knowledge topics
Remove a saved knowledge topic