U2 MCP Server

io.github.bpamiri由 GitHub 帳號 bpamiri 發布v0.1.1更新於 Oct 27, 2026

Connect AI assistants to Rocket Universe/UniData MultiValue databases via MCP.

已驗證STDIO僅桌面資料庫知識與記憶

概覽

AI 產生的概覽

讓 AI 助理連接 Rocket Universe/UniData MultiValue 資料庫,以自然語言查詢、讀取與修改記錄。

可以做什麼
  • 連接、中斷並檢視與 Universe/UniData 伺服器的連線
  • 列出檔案,讀取單筆或多筆記錄,寫入與刪除記錄,取得檔案統計
  • 執行 RetrieVe/UniQuery 語句、TCL/ECL 指令與 SELECT 清單
  • 瀏覽字典:列出字典項目、取得欄位定義、描述檔案結構
  • 呼叫已編目的 BASIC 副程式,並以開始、提交、回滾管理交易
  • 儲存、列出、搜尋與刪除資料庫知識筆記,可跨工作階段保留
適用情境
適合需要讓助理操作 Pick/MultiValue 資料庫的情境,例如探索檔案結構、回答記錄相關問題或執行查詢,而不必手寫 RetrieVe 語法。也適合希望集中部署連線並共用資料庫結構知識的團隊。
執行需求
本機 Python 3.10+ 程序,透過 pip 或 uvx 執行,uopy 套件會自動安裝為相依套件。需要能連線至 Universe 或 UniData 伺服器的網路,並設定環境變數 U2_HOST、U2_USER、U2_PASSWORD 與 U2_ACCOUNT,另有 U2_SERVICE、U2_PORT、U2_SSL 等選用設定。文件亦說明 HTTP/SSE 模式與採用 OAuth 的部署方式。
安裝前請注意
伺服器透過 U2_PASSWORD、U2_IDP_CLIENT_SECRET 等環境變數保存資料庫憑證。寫入與刪除工具、TCL 執行及 BASIC 副程式呼叫都可能變更或刪除資料;唯讀模式(U2_READ_ONLY)預設關閉,指令封鎖清單(U2_BLOCKED_COMMANDS)預設僅含少數指令,探索時應主動開啟。儲存的知識會寫入本機 markdown 檔案,HTTP 模式搭配寬鬆的 CORS 設定會把資料庫連線暴露到網路。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 U2 MCP Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

u2-mcp

[PyPI version] [License] [Python] [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 AskClaude 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)   │└─────────────────┘     └─────────────────┘     └─────────────────┘
  1. You ask Claude a question about your database
  2. Claude calls u2-mcp with the appropriate tool
  3. u2-mcp queries your Universe/UniData server
  4. Results come back through Claude in a readable format

New to MCP? See What is MCP? for a complete explanation.

Documentation

GuideDescription
What is MCP?Understanding MCP and how u2-mcp works
InstallationComplete installation guide
QuickstartGet running in 10 minutes
ConfigurationAll configuration options
Tools ReferenceDetailed tool documentation
Usage ExamplesCommon usage patterns
OAuth SetupClaude.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

bash
pip install u2-mcp

Or using uvx for isolated execution:

bash
uvx u2-mcp

Quick Start

Prerequisites

  • Python 3.10+
  • Access to a Rocket Universe or UniData server
  • The uopy package (installed automatically as a dependency)

Configuration

Set environment variables for your database connection:

bash
export U2_HOST=server.example.comexport U2_USER=usernameexport U2_PASSWORD=passwordexport U2_ACCOUNT=MYACCOUNTexport U2_SERVICE=uvcs  # or 'udcs' for UniData

Claude Desktop Configuration

Add to your claude_desktop_config.json:

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 server
  • disconnect - Close connections
  • list_connections - Show active connections

File Operations

  • list_files - List available files in the account
  • read_record - Read a single record by ID
  • read_records - Read multiple records
  • write_record - Write/update a record
  • delete_record - Delete a record
  • get_file_info - Get file statistics

Query Execution

  • execute_query - Run RetrieVe/UniQuery statements
  • execute_tcl - Run TCL/ECL commands
  • get_select_list - Execute SELECT and return record IDs

Dictionary Access

  • list_dictionary - List dictionary items
  • get_field_definition - Get field details
  • describe_file - High-level file description

Advanced Features

  • call_subroutine - Call BASIC subroutines
  • begin_transaction / commit_transaction / rollback_transaction - Transaction management

Knowledge Persistence

  • save_knowledge - Save learned information about the database
  • list_knowledge - List all saved knowledge topics
  • get_knowledge_topic - Retrieve specific topic
  • search_knowledge - Search across saved knowledge
  • delete_knowledge - Remove a knowledge topic

Configuration Options

VariableDescriptionDefault
U2_HOSTServer hostname or IPRequired
U2_USERUsernameRequired
U2_PASSWORDPasswordRequired
U2_ACCOUNTAccount nameRequired
U2_SERVICEService type (uvcs or udcs)uvcs
U2_PORTServer port31438
U2_SSLEnable SSLfalse
U2_TIMEOUTConnection timeout (seconds)30
U2_READ_ONLYDisable write operationsfalse
U2_MAX_RECORDSMaximum SELECT results10000
U2_BLOCKED_COMMANDSComma-separated blocked TCL commandsDELETE.FILE,CLEAR.FILE
U2_KNOWLEDGE_PATHCustom 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:

json
{  "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

bash
# Basic HTTP server on default port 8080u2-mcp --http
# Custom host and portu2-mcp --http --host 0.0.0.0 --port 3000
# Or using environment variablesexport U2_HTTP_HOST=0.0.0.0export U2_HTTP_PORT=3000u2-mcp --http

Docker Deployment

dockerfile
FROM python:3.12-slim
RUN pip install u2-mcp
ENV U2_HOST=your-universe-serverENV U2_USER=usernameENV U2_PASSWORD=passwordENV U2_ACCOUNT=MYACCOUNTENV U2_HTTP_PORT=8080
EXPOSE 8080
CMD ["u2-mcp", "--http"]
bash
docker build -t u2-mcp-server .docker run -p 8080:8080 u2-mcp-server

HTTP Configuration Options

VariableDescriptionDefault
U2_HTTP_HOSTHost to bind HTTP server to0.0.0.0
U2_HTTP_PORTPort for HTTP server8080
U2_HTTP_CORS_ORIGINSAllowed 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

  1. Deploy u2-mcp with OAuth enabled:
bash
u2-mcp --streamable-http --host 0.0.0.0 --port 8080
  1. Configure OAuth in your .env:
bash
U2_AUTH_ENABLED=trueU2_AUTH_ISSUER_URL=https://u2-mcp.example.comU2_IDP_PROVIDER=duoU2_IDP_DISCOVERY_URL=https://sso-xxx.sso.duosecurity.com/oidc/CLIENT_ID/.well-known/openid-configurationU2_IDP_CLIENT_ID=your_client_idU2_IDP_CLIENT_SECRET=your_client_secret
  1. 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

Reference

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Acknowledgments

  • Rocket Software for the uopy package
  • Anthropic for the Model Context Protocol specification
  • The MultiValue database community

來源:README.md,提交 f427768

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分