# petromcp [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/ameyxd/petromcp  
**GitHub Stars:** 3  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/petromcp

## Description
Local-first MCP server: read LAS well logs and DLIS files from your own disk.

## Tools
Capabilities this server exposes over MCP:

- **read_las_file** — Header-level summary of a LAS file
- **summarize_las_curves** — Per-curve min, max, mean, stddev, gap percentage
- **read_las_curve** — Depths and values for one curve, with sampling cap
- **compare_well_logs** — Common curves, depth overlap, unit consistency, flags
- **convert_units** — ft<->m, psi<->kPa, psi<->bar, bbl<->m3, degF<->degC, mD<->m2
- **list_supported_units** — Every convertible pair with its physical quantity
- **read_dlis_file** — DLIS structure: logical files, frames, index types
- **list_dlis_channels** — Every DLIS channel with its frame, units, and length
- **read_dlis_channel** — One DLIS channel's values, with a sampling cap

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

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

## Documentation

## What the petromcp MCP server does

The petromcp MCP server gives an MCP host access to local petroleum well-log files without uploading them to a cloud service. It currently handles LAS and DLIS data. LAS operations include header inspection, curve statistics, sampled curve reads, and comparisons between two wells. DLIS operations expose logical files, frames, index types, channel metadata, and sampled channel values.

The server also provides conversions for selected petroleum units: feet and metres, psi and kPa or bar, barrels and cubic metres, degrees Fahrenheit and Celsius, and millidarcies and square metres. A separate capability lists the supported conversion pairs and their physical quantities.

## How it works

An MCP host starts the server with the `petroleum-mcp serve` command, commonly through `uvx`. Tool calls are handled locally by the installed Python package and its LAS and DLIS parsing libraries. The server does not make outbound network connections, and its tools are declared read-only.

Access starts closed. Each permitted directory must be added to the local configuration before a file can be opened. Path validation resolves symlinks before checking the allowlist, preventing a link inside an approved directory from reaching an unapproved location. Calls record a timestamp, tool name, and resolved path.

Curve and channel reads have a sampling limit. Results identify whether downsampling occurred and report the original number of points, reducing the chance of placing an entire large log into an agent context window. DLIS channel names are scoped to frames; an ambiguous name is rejected with candidate choices instead of being selected arbitrarily.

## Setup and configuration

Install the petromcp MCP server with Python 3.10 or newer and `uv`. An MCP host can launch it with `uvx petroleum-mcp serve`; the README provides a Claude Desktop configuration example. After changing the directory allowlist, restart the host because the configuration is loaded at startup.

Initialize configuration with `uvx petroleum-mcp config init`, then permit a directory using `uvx petroleum-mcp config add-path /path/to/data`. A checked-out copy can generate synthetic sample data for testing, which can then be added to the allowlist. No environment variable is described as a way to expand file access.

## Tools and capabilities

- Inspect LAS headers with `read_las_file`.
- Calculate per-curve minimum, maximum, mean, standard deviation, and gap percentage with `summarize_las_curves`.
- Read one LAS curve with depth and value sampling through `read_las_curve`.
- Compare common curves, depth overlap, units, and flags with `compare_well_logs`.
- Convert supported petroleum units with `convert_units` and enumerate pairs with `list_supported_units`.
- Inspect DLIS structure with `read_dlis_file` and enumerate channels with `list_dlis_channels`.
- Read a selected DLIS channel with `read_dlis_channel`, subject to sampling limits.

## Limitations and notes

The petromcp MCP server supports LAS and DLIS in the stated release. SEG-Y and pump-card handling are planned but are not current capabilities. Files outside explicitly permitted directories cannot be read. The implementation is designed for read-only inspection; the listed tools do not modify source files or configuration at runtime.

DLIS workflows may require identifying the frame before reading a channel because the same channel name can occur in multiple frames. Unit conversion is limited to the pairs exposed by `list_supported_units`; unsupported units are not implied to work. Review the project’s privacy and security documentation before using production data, especially where local file access policies matter.

_Full upstream README: https://allmcps.com/mcp/petromcp/readme_

