ASAM ODS MCP Server - Query and analyze measurement data from ASAM ODS servers in AI agent systems.
Project description
ASAM ODS Jaquel MCP Server
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:
uvx odsbox-jaquel-mcp@latest
This automatically installs and runs the server without managing virtual environments.
Using pipx
For a persistent installation:
pipx install odsbox-jaquel-mcp
odsbox-jaquel-mcp
Traditional pip Installation
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install odsbox-jaquel-mcp[play]
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:
# With uvx (auto-installs and runs)
uvx odsbox-jaquel-mcp@latest
# With pipx (if installed)
odsbox-jaquel-mcp
# With pip in virtual environment
python -m odsbox_jaquel_mcp
Configuration for MCP Clients
Add to your MCP client configuration (e.g., Claude Desktop, VS Code):
{
"mcpServers": {
"ods-mcp": {
"type": "stdio",
"command": "uvx",
"args": ["odsbox-jaquel-mcp@latest"]
}
}
}
Or with pipx:
{
"mcpServers": {
"ods-mcp": {
"type": "stdio",
"command": "odsbox-jaquel-mcp"
}
}
}
Development
Setup
git clone https://github.com/totonga/odsbox-jaquel-mcp.git
cd odsbox-jaquel-mcp
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -e ".[dev]"
Common Tasks
# Run server locally
python -m odsbox_jaquel_mcp
# Run tests
pytest tests/
# or
python run_tests.py
# Code formatting and linting
black .
isort .
flake8 .
# Build package
python -m build
# Test with MCP Inspector
npx @modelcontextprotocol/inspector uvx odsbox-jaquel-mcp@latest
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_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
{
"error": "Model not loaded",
"hint": "Connect to ODS server using 'ods_connect' tool first"
}
Solution: Call ods_connect first
Invalid entity
{
"error": "Entity not found: InvalidEntity",
"available_entities": ["AoUnit", "AoMeasurement", ...]
}
Solution: Use valid entity from available_entities
Invalid field
{
"valid": false,
"issues": ["Field 'invalid_field' not found"],
"suggestions": ["id", "name", "description"]
}
Solution: Use one of the suggested fields
Connection failed
{
"success": false,
"error": "Connection refused",
"error_type": "ConnectionError"
}
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
{width=300px}
Support
For issues or questions:
- Check the error message and hints
- Review the documentation and examples
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file odsbox_jaquel_mcp-1.1.0.tar.gz.
File metadata
- Download URL: odsbox_jaquel_mcp-1.1.0.tar.gz
- Upload date:
- Size: 539.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c69603c168cdf9679649b2b01cad92c74632728dc3df1f3288a0961d3eaa285
|
|
| MD5 |
28612edfec97f3563655cee473f92813
|
|
| BLAKE2b-256 |
3b58938d4de7c0246a380d55e5e3c127d93240cc304654985f415ed4155a3dfd
|
Provenance
The following attestation bundles were made for odsbox_jaquel_mcp-1.1.0.tar.gz:
Publisher:
build.yml on totonga/odsbox-jaquel-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odsbox_jaquel_mcp-1.1.0.tar.gz -
Subject digest:
0c69603c168cdf9679649b2b01cad92c74632728dc3df1f3288a0961d3eaa285 - Sigstore transparency entry: 780543585
- Sigstore integration time:
-
Permalink:
totonga/odsbox-jaquel-mcp@0ff2f2996f25541821ac2fa6636e54edb790cb01 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/totonga
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@0ff2f2996f25541821ac2fa6636e54edb790cb01 -
Trigger Event:
push
-
Statement type:
File details
Details for the file odsbox_jaquel_mcp-1.1.0-py3-none-any.whl.
File metadata
- Download URL: odsbox_jaquel_mcp-1.1.0-py3-none-any.whl
- Upload date:
- Size: 73.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0602f791b44f9822ae93e223250050381e955094c2ecb7c7e15d80fcfbca40db
|
|
| MD5 |
45662742ccdaf68cede7776b5bf3d39d
|
|
| BLAKE2b-256 |
0c5c53ee09418e621cd85c7e0d365737ba0502b2ceeca4af0f15a8890a264845
|
Provenance
The following attestation bundles were made for odsbox_jaquel_mcp-1.1.0-py3-none-any.whl:
Publisher:
build.yml on totonga/odsbox-jaquel-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odsbox_jaquel_mcp-1.1.0-py3-none-any.whl -
Subject digest:
0602f791b44f9822ae93e223250050381e955094c2ecb7c7e15d80fcfbca40db - Sigstore transparency entry: 780543586
- Sigstore integration time:
-
Permalink:
totonga/odsbox-jaquel-mcp@0ff2f2996f25541821ac2fa6636e54edb790cb01 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/totonga
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@0ff2f2996f25541821ac2fa6636e54edb790cb01 -
Trigger Event:
push
-
Statement type: