U2 MCP Server
平台与服务by bpamiri
Connect AI assistants to Rocket Universe/UniData MultiValue databases via MCP.
什么是 U2 MCP Server?
Connect AI assistants to Rocket Universe/UniData MultiValue databases via MCP.
README
u2-mcp
<!-- mcp-name: io.github.bpamiri/u2-mcp -->Connect Claude to your Universe/UniData database using natural language.
u2-mcp is an MCP server that lets AI assistants like Claude query and interact with Rocket Universe and UniData MultiValue databases. Ask questions in plain English and get real answers from your data.
The first MCP server for the Pick/MultiValue database family.
What Can You Do With This?
Instead of writing RetrieVe queries, just ask Claude:
| You Ask | Claude Does |
|---|---|
| "How many customers are in California?" | Queries the database and tells you "1,247 customers" |
| "Show me order ORD001" | Reads the record and displays all fields |
| "What files are available?" | Lists all files in your account |
| "Describe the CUSTOMERS file" | Shows field definitions from the dictionary |
How It Works
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Claude Desktop │◄───►│ u2-mcp │◄───►│ Universe/UniData│
│ (You ask here) │ │ (Translates) │ │ (Your data) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
- You ask Claude a question about your database
- Claude calls u2-mcp with the appropriate tool
- u2-mcp queries your Universe/UniData server
- Results come back through Claude in a readable format
New to MCP? See What is MCP? for a complete explanation.
Documentation
| Guide | Description |
|---|---|
| What is MCP? | Understanding MCP and how u2-mcp works |
| Installation | Complete installation guide |
| Quickstart | Get running in 10 minutes |
| Configuration | All configuration options |
| Tools Reference | Detailed tool documentation |
| Usage Examples | Common usage patterns |
| OAuth Setup | Claude.ai integration with SSO |
Features
- Connection Management - Connect to Universe/UniData servers with connection pooling and SSL support
- File Operations - Read, write, and delete records while preserving MultiValue semantics
- Query Execution - Run RetrieVe/UniQuery statements with safety controls
- Dictionary Access - Explore file structures and field definitions
- BASIC Subroutine Calls - Execute cataloged BASIC programs
- Transaction Support - Full transaction management with commit/rollback
- AI-Optimized - Built-in query examples and syntax help for better LLM interactions
Installation
pip install u2-mcp
Or using uvx for isolated execution:
uvx u2-mcp
Quick Start
Prerequisites
- Python 3.10+
- Access to a Rocket Universe or UniData server
- The
uopypackage (installed automatically as a dependency)
Configuration
Set environment variables for your database connection:
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
Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"u2": {
"command": "uvx",
"args": ["u2-mcp"],
"env": {
"U2_HOST": "server.example.com",
"U2_USER": "user",
"U2_PASSWORD": "password",
"U2_ACCOUNT": "MYACCOUNT"
}
}
}
}
Usage Examples
Once connected, you can use natural language to interact with your Universe database:
- "List all customers in California"
- "Read record CUST001 from the CUSTOMERS file"
- "Show me the dictionary for the ORDERS file"
- "Count all open invoices over $1000"
Available Tools
Connection Management
connect- Establish connection to Universe/UniData serverdisconnect- Close connectionslist_connections- Show active connections
File Operations
list_files- List available files in the accountread_record- Read a single record by IDread_records- Read multiple recordswrite_record- Write/update a recorddelete_record- Delete a recordget_file_info- Get file statistics
Query Execution
execute_query- Run RetrieVe/UniQuery statementsexecute_tcl- Run TCL/ECL commandsget_select_list- Execute SELECT and return record IDs
Dictionary Access
list_dictionary- List dictionary itemsget_field_definition- Get field detailsdescribe_file- High-level file description
Advanced Features
call_subroutine- Call BASIC subroutinesbegin_transaction/commit_transaction/rollback_transaction- Transaction management
Knowledge Persistence
save_knowledge- Save learned information about the databaselist_knowledge- List all saved knowledge topicsget_knowledge_topic- Retrieve specific topicsearch_knowledge- Search across saved knowledgedelete_knowledge- Remove a knowledge topic
Configuration Options
| Variable | Description | Default |
|---|---|---|
U2_HOST | Server hostname or IP | Required |
U2_USER | Username | Required |
U2_PASSWORD | Password | Required |
U2_ACCOUNT | Account name | Required |
U2_SERVICE | Service type (uvcs or udcs) | uvcs |
U2_PORT | Server port | 31438 |
U2_SSL | Enable SSL | false |
U2_TIMEOUT | Connection timeout (seconds) | 30 |
U2_READ_ONLY | Disable write operations | false |
U2_MAX_RECORDS | Maximum SELECT results | 10000 |
U2_BLOCKED_COMMANDS | Comma-separated blocked TCL commands | DELETE.FILE,CLEAR.FILE |
U2_KNOWLEDGE_PATH | Custom path for knowledge file | ~/.u2-mcp/knowledge.md |
Knowledge Persistence
The MCP server includes a knowledge persistence feature that allows Claude to save and recall learned information about your database across sessions. This eliminates repetitive discovery work and speeds up future interactions.
How It Works
When Claude discovers useful information about your database (file purposes, field meanings, working queries), it can save this knowledge using the save_knowledge tool. This information is stored in a markdown file and automatically available in future conversations via the u2://knowledge resource.
What Gets Saved
- File descriptions - What each file contains (e.g., "AR-CUST is the customer master file")
- Field mappings - Which fields contain what data (e.g., "Field 1 is customer name")
- Query patterns - Queries that produced good results
- Data formats - Date formats, code meanings, conversion notes
- Relationships - How files relate to each other
Storage Location
Knowledge is stored in ~/.u2-mcp/knowledge.md by default. You can customize this location using the U2_KNOWLEDGE_PATH environment variable:
{
"env": {
"U2_KNOWLEDGE_PATH": "/path/to/custom/knowledge.md"
}
}
Example Usage
After Claude discovers that AR-CUST contains customer records:
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...")]
In the next conversation, Claude will already know this and won't need to rediscover it.
Centralized Deployment (HTTP/SSE Mode)
For team environments, you can run u2-mcp as a centralized HTTP server instead of local stdio mode. This allows:
- Single database connection for the whole team
- Shared knowledge base
- Centralized credential management
- Access from any MCP-compatible client
Running the HTTP Server
# Basic HTTP server on default port 8080
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
Docker Deployment
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
HTTP Configuration Options
| Variable | Description | Default |
|---|---|---|
U2_HTTP_HOST | Host to bind HTTP server to | 0.0.0.0 |
U2_HTTP_PORT | Port for HTTP server | 8080 |
U2_HTTP_CORS_ORIGINS | Allowed CORS origins (comma-separated or *) | * |
Connecting Clients
The HTTP server exposes an SSE (Server-Sent Events) endpoint at /sse. MCP clients that support remote servers can connect to:
http://your-server:8080/sse
Note: As of late 2024, Claude Desktop only supports local stdio MCP servers. HTTP/SSE mode is for:
- Custom MCP clients
- Future Claude Desktop versions with remote server support
- Integration with other AI tools that support MCP over HTTP
Claude.ai Integration (Streamable HTTP + OAuth)
Deploy u2-mcp as a Custom Connector in Claude.ai with enterprise authentication via your identity provider (Duo, Auth0, Okta, etc.).
Quick Setup
- Deploy u2-mcp with OAuth enabled:
u2-mcp --streamable-http --host 0.0.0.0 --port 8080
- Configure OAuth in your
.env:
U2_AUTH_ENABLED=true
U2_AUTH_ISSUER_URL=https://u2-mcp.example.com
U2_IDP_PROVIDER=duo
U2_IDP_DISCOVERY_URL=https://sso-xxx.sso.duosecurity.com/oidc/CLIENT_ID/.well-known/openid-configuration
U2_IDP_CLIENT_ID=your_client_id
U2_IDP_CLIENT_SECRET=your_client_secret
- Add to Claude.ai: Go to Settings → Connectors → Add Custom Connector → Enter your URL
Users authenticate through your IdP and can then query your database directly from Claude.ai.
Supported Identity Providers
- Cisco Duo - Enterprise MFA and SSO
- Auth0 - Flexible identity platform
- Any OIDC Provider - Okta, Azure AD, Google Workspace, Keycloak, etc.
See the OAuth Guide for detailed setup instructions.
Security
- Credentials are never logged
- Configurable command blocklist prevents dangerous operations
- Optional read-only mode for safe exploration
- Honors Universe's built-in security model
See SECURITY.md for reporting security vulnerabilities.
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Documentation
Getting Started
- Quickstart Guide - Get running in 10 minutes
- What is MCP? - Understanding MCP and how u2-mcp works
- Installation Guide - Detailed installation instructions
Reference
- Configuration Reference - All environment variables
- Tools Reference - Complete tool documentation
- Usage Examples - Common usage patterns
- OAuth & Claude.ai Integration - Deploy as a Claude.ai Custom Connector
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Acknowledgments
- Rocket Software for the
uopypackage - Anthropic for the Model Context Protocol specification
- The MultiValue database community
常见问题
U2 MCP Server 是什么?
Connect AI assistants to Rocket Universe/UniData MultiValue databases via MCP.
相关 Skills
MCP构建
by anthropics
聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。
✎ 想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。
Slack动图
by anthropics
面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。
✎ 帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。
MCP服务构建器
by alirezarezvani
从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。
✎ 帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。
相关 MCP Server
Slack 消息
编辑精选by Anthropic
Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。
✎ 这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。
by netdata
io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。
✎ 这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。
by d4vinci
Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。
✎ 这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。