
ASAM ODS odsbox jaquel MCP Server
io.github.totonga由 GitHub 帳號 totonga 發布v1.8.3更新於 Oct 24, 2026
MCP server for ASAM ODS with Jaquel query tools, connection management, and data access
概覽
面向 ASAM ODS 的本機 MCP 伺服器,讓助理連線 ODS 伺服器、檢視結構、驗證並執行 Jaquel 查詢、讀取量測資料。
- 可以做什麼
- 管理 ODS 連線:建立連線、透過環境變數連線、中斷連線、查看連線狀態與資訊。檢視結構:列出實體與關聯、取得實體欄位、探索 AoTest 到 AoMeasurement 的階層結構。建構與驗證 Jaquel 查詢:驗證語法、產生白話說明、產生查詢骨架、列出查詢樣式與運算子文件、執行查詢。存取量測資料:列出量測量、讀取時間序列/子矩陣資料、產生 Python 取數腳本。產生分析輔助:量測比較用 Jupyter notebook、Matplotlib 視覺化程式碼、統計比較與相關性分析。
- 適用情境
- 適用於處理 ASAM ODS 量測資料庫的情境:希望助理探索結構、草擬並檢查 Jaquel 查詢,或取出時間序列資料進行比較與視覺化,而不必手寫 API 呼叫。
- 執行需求
- 以 stdio 在本機執行,通常透過 uvx 從 PyPI 套件啟動(需要 Python/uv)。需要能連線 ASAM ODS 伺服器的網路及其憑證:basic 模式使用 ODSBOX_MCP_URL、ODSBOX_MCP_USER、ODSBOX_MCP_PASSWORD;m2m 模式使用 ODSBOX_MCP_M2M_TOKEN_ENDPOINT、ODSBOX_MCP_M2M_CLIENT_ID、ODSBOX_MCP_M2M_CLIENT_SECRET;oidc 模式使用 ODSBOX_MCP_OIDC_CLIENT_ID 與 ODSBOX_MCP_OIDC_REDIRECT_URI。選用 [play] 附加套件提供 pandas、matplotlib 與 scipy。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 ASAM ODS odsbox jaquel MCP Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
ASAM ODS Jaquel MCP Server
[PyPI version] [Apache 2.0 License] [Python] [Status] [Build Status] [Stars]
A Model Context Protocol (MCP) server for ASAM ODS with odsbox Jaquel query tools, ODS connection management, and measurement data access.
Overview
- 🔌 Built-in ODS connection management
- 🧰 MCP tools: schema inspection, query validation, direct ODS query execution and measurement data analysis
- 🏗️ Entity hierarchy visualization (AoTest → AoMeasurement)
- 🚀 Validate, explain and execute JAQueL queries for ASAM ODS
- 📦 Bulk timeseries/submatrix data access and script generation
- 📊 Automatic Jupyter notebook generation for measurement comparison
- 📈 Matplotlib visualization code generation
- 📉 Statistical measurement comparison and correlation analysis
- 🔎 Measurement hierarchy exploration and discovery
- 💡 Interactive starting prompts for guided workflows
- 🤖 AI-guided bulk API learning with
help_bulk_apitool - 📝 Comprehensive documentation and test suite
Documentation
- Prompts Guide: See
PROMPTS.mdfor starting prompts documentation - Tool Reference: See
TOOLS_GUIDE.md - Changelog: See
CHANGELOG.md
Quick Start
Installation
Using uvx (Recommended)
The easiest way to use this MCP server is with uvx:
This automatically installs and runs the server without managing virtual environments.
Using uv tool (persistent install)
For a persistent installation:
Using project virtual environment
Note: The
[play]extra includes optional data analysis and visualization dependencies (pandas, matplotlib, scipy) for working with Jupyter notebooks and data analysis.
Running the Server
The server runs on stdin/stdout and waits for MCP messages from an MCP client:
Configuration for MCP Clients
Add to your MCP client configuration (e.g., Claude Desktop, VS Code):
Or with uv tool:
Environment Variables
See TOOLS_GUIDE.md for the full list of authentication variables and keyring fallback details.
Secrets are looked up in the ods-pilot keyring service first using <service>::<username> records, then in the legacy direct service lookup if no entry is found.
Usage Monitoring
When ODSBOX_STATS_ENABLED=true is set, the server records tool call and resource read statistics to a local SQLite database:
- Location:
~/.local/share/odsbox-jaquel-mcp/odsbox-jaquel-mcp-stats.db(Linux/macOS) or%APPDATA%\odsbox-jaquel-mcp\odsbox-jaquel-mcp-stats.db(Windows), with fallback to the system temp directory. - Tracked per tool: call count, error count, total execution time (ms), last called timestamp.
- Tracked per resource: read count, error count, total execution time (ms), last read timestamp.
- Cross-process safe: uses SQLite WAL mode, so multiple concurrent MCP sessions can write safely.
You can query the stats database directly:
Example MCP client configuration with monitoring enabled:
Development
Setup
Common Tasks
Contributing
Pull requests and issues are welcome! Please:
- Follow PEP8 and use type hints
- Add/maintain tests for new features
- Update documentation as needed
License
This project is licensed under the Apache License 2.0. See LICENSE.
Links
Features
Core MCP Tools
Connection Management
- ods_connect - Establish ODS connection
- ods_connect_using_env - Establish ODS connection using environment variables
- ods_disconnect - Close ODS connection
- ods_get_connection_info - Get connection status
Schema Inspection
- schema_get_entity - Get all fields for entity
- schema_list_entities - List all entities with relationships
- schema_test_to_measurement_hierarchy - Get ASAM ODS test hierarchy structure
Query Building & Validation
- query_validate - Check query syntax and structure
- query_describe - Get plain English explanation
- query_execute - Execute query on ODS server
Timeseries/Submatrix Data Access
- data_get_quantities - List measurement quantities for submatrix
- data_read_submatrix - Read timeseries data from submatrix
- data_generate_fetcher_script - Generate Python scripts for data fetching
Pattern & Example Library
- query_generate_skeleton - Generate query skeleton (basic query) for entity
- query_get_pattern - Get template for common patterns
- query_list_patterns - List available patterns
- query_get_operator_docs - Learn about operators
Starting Prompts
Discover and use the server's capabilities through interactive guided prompts:
- ODS Server Connection - Set up and manage connections
- Validate a Jaquel Query - Learn query validation
- Explore Query Patterns - Find common query templates
- Bulk Data Access - Master the 3-step Bulk API workflow
- Measurement Analysis - Compare measurements and visualize data
See PROMPTS.md for complete details on all starting prompts.
Error Handling
Common Errors and Solutions
Not connected
Solution: Call ods_connect first
Invalid entity
Solution: Use valid entity from available_entities
Invalid field
Solution: Use one of the suggested fields
Connection failed
Solution: Check URL, server availability, firewall
Troubleshooting
Issue: Tools not discovered
- Ensure mcp>=0.1.0 is installed
- Check ToolsCapability is set in ServerCapabilities
- Restart MCP client
Issue: Schema tools fail
- Ensure ODS server is accessible
- Check username/password
- Verify network connectivity
- Review server logs
Issue: Queries timeout
- Increase request_timeout in connect
- Reduce $rowlimit
- Check ODS server performance
Performance Tips
- Use specific filters - Avoid querying all records
- Limit rows - Always use
$rowlimitappropriately - Select attributes - Only retrieve needed columns/attributes
- Index awareness - Filter on indexed fields first
- Connection reuse - Keep connection open when possible
- Cache schemas - Schema inspection is cached
Security Notes
- Credentials are only held in memory during connection
- Connection is cleaned up on disconnect
- No credentials stored in config files
- Use HTTPS with
verify_certificate: truefor production
Install in VSCode
[install in VSCode]{width=300px}
Try with example server configuration using all three authentication modes via different env prefixes:
Support
For issues or questions:
- Check the error message and hints
- Review the documentation
來源:README.md,提交 f64da5b
工具
0版本歷史
1- v1.8.3最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。