
petromcp
io.github.ameyxd由 GitHub 账号 ameyxd 发布v0.8.1更新于 Oct 24, 2026
Local-first MCP server: read LAS well logs and DLIS files from your own disk.
概览
从本地磁盘读取 LAS 测井曲线和 DLIS 石油数据文件,汇总曲线、对比井数据并换算单位。
- 可以做什么
- petromcp 封装开源解析器 lasio 和 dlisio,并将其作为 MCP 工具提供。工具包括 read_las_file(文件头摘要)、summarize_las_curves(每条曲线的最小值、最大值、均值、标准差、缺失比例)、read_las_curve(单条曲线的深度与数值,带采样上限)、compare_well_logs(公共曲线、深度重叠、单位一致性)、convert_units 与 list_supported_units,以及 read_dlis_file、list_dlis_channels 和 read_dlis_channel。另有 qc_a_well_log 提示词引导完成标准质检流程。
- 适用场景
- 适用于测井文件因法规或合规原因不能上传到云服务,而希望通过对话直接查询数据的场景。适合 LAS 与 DLIS 质检、两口井对比以及单位换算。
- 运行要求
- 以 PyPI 包(petroleum-mcp)形式通过 uvx 在本地以 stdio 运行;需要 Python 3.10+ 和 uv。未声明账号、API 密钥或环境变量。必须先通过配置命令行显式将目录加入允许列表才能读取文件,修改允许列表后需重启宿主程序。
安装
在 SourceWeft 中
- 打开 控制台中的 petromcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
petromcp
Read well logs with Claude without the data ever leaving your machine.
petromcp is an MCP server for petroleum data formats, built for teams whose files legally cannot be uploaded to a cloud service. No telemetry, no phone-home, no automatic updates, and a default-deny path allowlist that refuses to open anything you have not explicitly permitted. LAS today; DLIS, SEG-Y, and pump cards next.
If you can upload your data somewhere, you have more options than this. If you can't, this was written for you.
What this gives you
LLM hosts cannot read binary or semi-structured petroleum formats. petromcp
wraps the established open-source parsers — lasio and dlisio today, with
segyio queued for a later slice — and exposes them as MCP tools, so
you can have a conversation with your data instead of copy-pasting curve
values into chat.
What "local-first" means here, concretely
Not a posture. Four things you can verify in the source:
- Default deny. A fresh install can read nothing. Access is granted per directory, and every tool routes through one validator that resolves symlinks before checking, so a link inside an allowed directory cannot reach outside it. There is no environment variable that widens the allowlist and no tool that changes it at runtime.
- No network, declared. petromcp opens no outbound connections. All five
tools ship
openWorldHint: falseandreadOnlyHint: true, so your host can verify that claim rather than take it. - An audit trail. Every tool call is logged with a timestamp, the tool name, and the resolved path.
- Bounded output. Curve reads are capped and report
downsampledandoriginal_count, so a 20,000-point log cannot silently dump into a context window.
The threat model, and what does not count as a vulnerability, are in SECURITY.md. Read docs/DATA_PRIVACY.md before pointing this at real data — it is authoritative, and if the code contradicts it the code is the bug.
Install
Requires Python 3.10+ and uv.
Add petromcp to your MCP host's config — no clone, no build:
On macOS that file is
~/Library/Application Support/Claude/claude_desktop_config.json. Restart
the host afterwards. macOS notes and troubleshooting:
docs/INSTALL.md.
To work on petromcp rather than just use it:
Configure
By default petromcp can read nothing. Tell it which directories are fair game:
Or, if you want to try it without your own data, generate the synthetic sample from a checkout and allowlist that:
Restart your MCP host after editing the allowlist — it is read once at startup.
Use
Open a new conversation and ask, in plain language:
Claude picks the right tool, reads the file through petromcp, and answers.
Worked examples, with real tool output rather than prose:
- QC a well log — finds a planted density gap, a washout, and a gamma ray spike
- Compare two wells — depth overlap, a missing curve, and a unit mismatch that is invisible in one file
- Unit conversion
- Read a DLIS file — logical files, frames, and what happens when a channel name is ambiguous
Every value in those documents is generated by calling the tools; CI fails if they drift.
Tools
Every tool is read-only and opens no network connection, and declares that in its MCP annotations. Full reference: docs/TOOLS_REFERENCE.md.
DLIS files hold several logging runs, each with several frames, so a channel
name is unique only within a frame. read_dlis_channel refuses an ambiguous
name and lists the candidates rather than guessing, because the values differ.
SEG-Y and pump card support land in subsequent releases.
Status
v0.7 ships the LAS and DLIS slices, a comparison tool, a units utility, and config-management CLI subcommands. The remaining formats are tracked in SPEC_petromcp.md. The non-goals list there is real; read it before filing feature requests.
Release history: CHANGELOG.md. Security policy and threat model: SECURITY.md.
License
MIT.
mcp-name: io.github.ameyxd/petromcp
Built by Amey Ambade. I write about AI systems in industries where the data can't leave the building, at writing.heyamey.com.
来源:README.md,提交 653971f
工具
0版本历史
1- v0.8.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分