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.

已驗證STDIO僅桌面檔案與儲存資料與分析

概覽

AI 產生的概覽

從本機磁碟讀取 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 金鑰或環境變數。必須先透過設定命令列將目錄加入允許清單才能讀取檔案,修改允許清單後需重新啟動宿主程式。
安裝前請注意
全新安裝時無法讀取任何檔案:存取權限依目錄授予,採預設拒絕的允許清單並在檢查前解析符號連結,且沒有環境變數或工具能在執行時擴大該清單。所有工具皆宣告為唯讀且不建立對外網路連線,每次呼叫都會記錄時間戳、工具名稱與解析後的路徑。曲線讀取有上限並會回報降取樣。README 建議在套用於真實資料前先閱讀 SECURITY.md 與 docs/DATA_PRIVACY.md。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 petromcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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: false and readOnlyHint: 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 downsampled and original_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:

json
{  "mcpServers": {    "petromcp": {      "command": "uvx",      "args": ["petroleum-mcp", "serve"]    }  }}

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:

git clone https://github.com/ameyxd/petromcpcd petromcpmake setupmake install-claude

Configure

By default petromcp can read nothing. Tell it which directories are fair game:

uvx petroleum-mcp config inituvx petroleum-mcp config add-path ~/petroleum/wells

Or, if you want to try it without your own data, generate the synthetic sample from a checkout and allowlist that:

make generateuvx petroleum-mcp config add-path "$(pwd)/examples/sample_data"

Restart your MCP host after editing the allowlist — it is read once at startup.

Use

Open a new conversation and ask, in plain language:

What's wrong with this well log? /path/to/well.lasCompare these two wells: /path/to/A.las and /path/to/B.lasConvert 1500 psi to kPa.

Claude picks the right tool, reads the file through petromcp, and answers.

Worked examples, with real tool output rather than prose:

Every value in those documents is generated by calling the tools; CI fails if they drift.

Tools

ToolWhat it does
read_las_fileHeader-level summary of a LAS file
summarize_las_curvesPer-curve min, max, mean, stddev, gap percentage
read_las_curveDepths and values for one curve, with sampling cap
compare_well_logsCommon curves, depth overlap, unit consistency, flags
convert_unitsft<->m, psi<->kPa, psi<->bar, bbl<->m3, degF<->degC, mD<->m2
list_supported_unitsEvery convertible pair with its physical quantity
read_dlis_fileDLIS structure: logical files, frames, index types
list_dlis_channelsEvery DLIS channel with its frame, units, and length
read_dlis_channelOne DLIS channel's values, with a sampling cap
qc_a_well_log promptWalks Claude through a standard QC pass

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
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.8.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分