odse-mcp
MCP server for converting OEM energy telemetry payloads into ODS-E records and validating them via the odse Python package.
README
<img src="https://raw.githubusercontent.com/AsobaCloud/odse-mcp/master/docs/odse.svg" alt="ODS-E" width="36" height="36" align="bottom" /> ODS-E Conversion
MCP server for ODS-E energy telemetry conversion. AI coding/data agents call its tools over the Model Context Protocol to convert OEM payloads into ODS-E records and validate them via the published odse Python package.
The installed odse package is the source of truth for OEM support, transform behavior, and validation semantics.
Quick start
Set ODSE_WORKSPACE to an absolute path used when resolving relative payload_file values. If omitted, the server uses its process working directory. The server speaks MCP over stdio (no HTTP port).
Prerequisite: python3 on PATH must be able to import odse (pip install odse).
Cursor
Add to ~/.cursor/mcp.json or the project .cursor/mcp.json:
{
"mcpServers": {
"odse": {
"command": "npx",
"args": ["-y", "@asobacloud/odse-mcp"],
"env": {
"ODSE_WORKSPACE": "/absolute/path/to/your/data"
}
}
}
}
Restart Cursor (or reload MCP servers), then ask the agent to convert or validate ODS-E data.
Claude Code
CLI (user scope):
claude mcp add --transport stdio --scope user \
--env ODSE_WORKSPACE=/absolute/path/to/your/data \
odse -- npx -y @asobacloud/odse-mcp
Or put the same JSON under mcpServers in project .mcp.json (team-shared) or ~/.claude.json (user-wide):
{
"mcpServers": {
"odse": {
"command": "npx",
"args": ["-y", "@asobacloud/odse-mcp"],
"env": {
"ODSE_WORKSPACE": "/absolute/path/to/your/data"
}
}
}
}
Verify with claude mcp list. Project .mcp.json servers need approval the first time you open the repo in Claude Code.
Codex
CLI:
codex mcp add odse --env ODSE_WORKSPACE=/absolute/path/to/your/data -- npx -y @asobacloud/odse-mcp
Or edit ~/.codex/config.toml (or project .codex/config.toml in a trusted project):
[mcp_servers.odse]
command = "npx"
args = ["-y", "@asobacloud/odse-mcp"]
[mcp_servers.odse.env]
ODSE_WORKSPACE = "/absolute/path/to/your/data"
Codex CLI, the IDE extension, and the ChatGPT desktop Codex host share this config.
Run directly
pip install odse
npx -y @asobacloud/odse-mcp
Tools
| Tool | Runtime | What it does |
|---|---|---|
ListSupportedOEMs |
python3 |
Returns OEM source keys from the installed odse transformer registry, plus odse.__version__. |
ConvertToODSE |
python3 |
Calls odse.transformer.transform on raw CSV/JSON text or a file. Optional source, asset_id, timezone, timeout. If source is omitted, OEM is auto-detected from payload content only. |
ValidateODSERecord |
python3 |
Calls odse.validate_batch on a JSON array of records. |
ConvertToODSE
| Argument | Description |
|---|---|
payload |
Raw telemetry text (CSV or JSON) |
payload_file |
Path to a telemetry file (relative paths resolve against ODSE_WORKSPACE) |
source |
OEM key (e.g. huawei); omit to auto-detect |
asset_id |
Optional asset id forwarded to odse.transform |
timezone |
Optional timezone forwarded to odse.transform (e.g. +02:00) |
timeout |
Timeout in ms (default 120000, max 600000) |
Example (explicit source):
{
"name": "ConvertToODSE",
"arguments": {
"source": "huawei",
"payload": "Time,Active Power(kW),Inverter State\n2024-01-01 12:00:00,12.0,0\n"
}
}
Successful responses are JSON on the tool text channel, for example:
{
"records": [
{
"timestamp": "2024-01-01T12:00:00Z",
"kWh": 1.0,
"error_type": "normal",
"error_code": "0"
}
],
"count": 1,
"source": "huawei",
"odse_version": "0.8.2"
}
Live-fetch arguments (url, headers, body, …) are rejected: not part of this release.
ValidateODSERecord
Pass records as a JSON string of an array of objects. Optional level is forwarded to odse.validate_batch (default schema).
{
"name": "ValidateODSERecord",
"arguments": {
"records": "[{\"timestamp\":\"2024-01-01T12:00:00Z\",\"kWh\":1.0,\"error_type\":\"normal\"}]"
}
}
Validation follows odse.validate_batch package semantics (not a separate JSON Schema checker). Extra properties and numeric bounds behave as the installed odse version defines them.
Tool exit code 1 becomes isError: true on the MCP result. Unexpected crashes are reported as errors.
Requirements
| Runtime | Required for |
|---|---|
| Node.js ≥ 22 | MCP server |
Python 3 + odse |
All tools (pip install odse) |
Architecture
rules/*.json → tool schemas + execution specs
scripts/*.py → odse wrappers (list / convert / validate)
src/loader.ts → bundled rules
src/runner.ts → spawn, timeouts, exit-code → isError
src/index.ts → MCP stdio server
bin/cli.js → npx / bin entrypoint
Development
git clone https://github.com/AsobaCloud/odse-mcp.git
cd odse-mcp
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install odse
npm install
npm run build
npm test
| Script | Purpose |
|---|---|
npm run build |
Compile TypeScript → dist/ |
npm test |
E2E via real MCP Client + fixture assertions |
npm start |
Run the server on stdio |
npm run dev |
node --watch on dist/ |
Local MCP config (instead of npx):
{
"mcpServers": {
"odse": {
"command": "node",
"args": ["/absolute/path/to/odse-mcp/dist/index.js"],
"env": {
"ODSE_WORKSPACE": "/absolute/path/to/your/data",
"PATH": "/absolute/path/to/odse-mcp/.venv/bin:/usr/bin:/bin"
}
}
}
}
Ensure the PATH (or environment) makes python3 resolve to an interpreter that can import odse.
Releasing
CI runs build + E2E on every push/PR (Node 22 + pip install odse). To publish a new version:
- Bump
versioninpackage.json - Commit, push, and create a GitHub Release (
gh release create vX.Y.Z --generate-notes) .github/workflows/publish.ymlpublishes to npm (Trusted Publisher / OIDC, orNPM_TOKENif configured)
License
MIT © Asoba
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。