ASAM ODS odsbox jaquel MCP Server

平台与服务

by totonga

面向 ASAM ODS 的 MCP server,提供 Jaquel 查询工具、连接管理与数据访问能力。

什么是 ASAM ODS odsbox jaquel MCP Server

面向 ASAM ODS 的 MCP server,提供 Jaquel 查询工具、连接管理与数据访问能力。

README

ASAM ODS Jaquel MCP Server

PyPI version Apache 2.0 License Python Status Build Status Stars

<!-- mcp-name: io.github.totonga/odsbox-jaquel-mcp -->

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_api tool
  • 📝 Comprehensive documentation and test suite

Documentation

Quick Start

Installation

Using uvx (Recommended)

The easiest way to use this MCP server is with uvx:

bash
uvx odsbox-jaquel-mcp@latest

This automatically installs and runs the server without managing virtual environments.

Using pipx

For a persistent installation:

bash
pipx install odsbox-jaquel-mcp
odsbox-jaquel-mcp

Traditional pip Installation

bash
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:

bash
# 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):

json
{
  "mcpServers": {
    "ods-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": ["odsbox-jaquel-mcp@latest"]
    }
  }
}

Or with pipx:

json
{
  "mcpServers": {
    "ods-mcp": {
      "type": "stdio",
      "command": "odsbox-jaquel-mcp"
    }
  }
}

Environment Variables

VariableDefaultDescription
ODSBOX_STATS_ENABLEDnot set (disabled)Set to 1, true, or yes to enable tool and resource call monitoring. Statistics are persisted to a SQLite database (odsbox-jaquel-mcp-stats.db) for cross-session tracking.
FASTMCP_LOG_LEVELINFOControls the server-side log level (DEBUG, INFO, WARNING, ERROR, CRITICAL). With stdio transport all logs go to stderr, which MCP clients may display as warnings. Set to WARNING to reduce noise.
ODSBOX_MCP_MODEbasicAuthentication mode for ods_connect_using_env: basic, m2m, or oidc
ODSBOX_MCP_URLnot setODS server URL for ods_connect_using_env
ODSBOX_MCP_USERnot setODS username (basic mode)
ODSBOX_MCP_PASSWORDnot setODS password (basic mode; falls back to keyring)
ODSBOX_MCP_M2M_TOKEN_ENDPOINTnot setOAuth2 token endpoint (m2m mode)
ODSBOX_MCP_M2M_CLIENT_IDnot setClient ID (m2m mode)
ODSBOX_MCP_M2M_CLIENT_SECRETnot setClient secret (m2m mode; falls back to keyring)
ODSBOX_MCP_OIDC_CLIENT_IDnot setClient ID (oidc mode)
ODSBOX_MCP_OIDC_REDIRECT_URInot setRedirect URI (oidc mode, e.g. http://127.0.0.1:1234)
ODSBOX_MCP_VERIFYtrueTLS certificate verification (true/false)

See TOOLS_GUIDE.md for the full list of authentication variables and keyring fallback details.

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:

bash
sqlite3 ~/.local/share/odsbox-jaquel-mcp/odsbox-jaquel-mcp-stats.db \
  "SELECT name, calls, errors, total_ms FROM tool_stats ORDER BY calls DESC"

Example MCP client configuration with monitoring enabled:

json
{
  "mcpServers": {
    "ods-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": ["odsbox-jaquel-mcp@latest"],
      "env": {
        "ODSBOX_STATS_ENABLED": "true",
        "FASTMCP_LOG_LEVEL": "WARNING"
      }
    }
  }
}

Development

Setup

bash
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

bash
# 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_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

json
{
  "error": "Model not loaded",
  "hint": "Connect to ODS server using 'ods_connect' tool first"
}

Solution: Call ods_connect first

Invalid entity

json
{
  "error": "Entity not found: InvalidEntity",
  "available_entities": ["AoUnit", "AoMeasurement", ...]
}

Solution: Use valid entity from available_entities

Invalid field

json
{
  "valid": false,
  "issues": ["Field 'invalid_field' not found"],
  "suggestions": ["id", "name", "description"]
}

Solution: Use one of the suggested fields

Connection failed

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

  1. Use specific filters - Avoid querying all records
  2. Limit rows - Always use $rowlimit appropriately
  3. Select attributes - Only retrieve needed columns/attributes
  4. Index awareness - Filter on indexed fields first
  5. Connection reuse - Keep connection open when possible
  6. 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: true for production

Install in VSCode

install in VSCode{width=300px}

Try with example server configuration using all three authentication modes via different env prefixes:

json
{
	"servers": {
		"ods": {
			"type": "stdio",
			"command": "uvx",
			"args": [
				"odsbox-jaquel-mcp@latest"
			],
			"env": {
				"ODSBOX_MCP_URL": "https://docker.peak-solution.de:10032/api",
				"ODSBOX_MCP_USER": "Demo",
				"ODSBOX_MCP_PASSWORD": "mdm",
				"ODSBOX_MCP2_MODE": "m2m",
				"ODSBOX_MCP2_URL": "https://ods.example.com/api",
				"ODSBOX_MCP2_M2M_TOKEN_ENDPOINT": "https://auth.example.com/realms/myrealm/protocol/openid-connect/token",
				"ODSBOX_MCP2_M2M_CLIENT_ID": "my-service-client",
				"ODSBOX_MCP3_MODE": "oidc",
				"ODSBOX_MCP3_URL": "https://ods.example.com/api",
				"ODSBOX_MCP3_OIDC_CLIENT_ID": "my-oidc-client",
				"ODSBOX_MCP3_OIDC_REDIRECT_URI": "http://127.0.0.1:1234"
			}
		}
	},
	"inputs": []
}

Support

For issues or questions:

  1. Check the error message and hints
  2. Review the documentation

常见问题

ASAM ODS odsbox jaquel MCP Server 是什么?

面向 ASAM ODS 的 MCP server,提供 Jaquel 查询工具、连接管理与数据访问能力。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描114.1k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描114.1k

MCP服务构建器

by alirezarezvani

Universal
热门

从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。

帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。

平台与服务
未扫描10.2k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
83.4k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.4k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
35.4k

评论