-
Notifications
You must be signed in to change notification settings - Fork 137
MCP server for welly, LLM-assisted petrophysical analysis #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add mcp>=1.0.0 as optional dependency in pyproject.toml - Enables installation with: pip install welly[mcp] - Prepares infrastructure for Model Context Protocol server
Introduces MCP server infrastructure for petrophysical analysis, enabling integration with AI assistants for well log processing. - Add core MCP server with standard protocol implementation - Implement session management for stateful well operations - Create tool suite for LAS file loading and analysis - Support base64 image encoding for plot visualization - Include requirements and entry point configuration
- Add unit tests for MCP server functionality - Include pytest configuration for test execution - Create README with installation and usage instructions - Document available tools and integration patterns
Add Almaz Ermilov (UiT University of Tromsø, Norway) for MCP server implementation contribution.
- Replace well.plot() with plot_well() function for proper legend support - Add striplog legend system with standard curve scaling - Implement curve type recognition using welly ALIAS dictionary - Fix JSON serialization error by converting numpy bool_ to Python bool - Add curve plotting with appropriate colors and ranges - Update docstrings with usage examples and parameter details
- Update tool descriptions with practical examples - Revise parameter descriptions for clarity - Modify filesystem path terminology - Update docstring language
- Update curve plotting parameters to align with quite common industry standards - Introduce additional curve types and corresponding colors - Implement default line styles for recognized curves
|
Hei @kwinkunks! let me know if you want to make it bigger together 🫡 |
|
👍👍👍 |
|
Very like your staff @AlmazErmilov |
|
Interesting project, thanks for the contribution. I have not thghout a lot about how MCPs are likely to be consumed / combined etc. My own feeling is that this component should perhaps be its own project, rather than being bundled with the library. What do you think? Interested in what others think too. |
Fair enough, agree, |
Halla folkens!
Hope you all have en riktig god sommer! 🌞
I'm finally reviving one of my favourite old pet projects that will culminate in an ADIPEC paper this autumn 2025,
for the petrophysical part I've decided to build an MCP server on top of welly, a library I’ve used and loved before,
and an MCP server feels like the natural next step for welly
I'm contributing only the 5 tools for welly MCP, would love to make it bigger and contribute more,
but before proceeding I would love to hear your feedback on the architecture and overall approach,
contact me for a bigger picture if needed
my background is degrees and experiences in Computer Science and Geophysics,
(so both domain and tech expertise are in place)
admire your work 🫡,
more formal PR message below,
Almaz
almaz.ermilov@gmail.com
almaz.ermilov@uit.no
Add Model Context Protocol (MCP) server for AI-assisted petrophysical analysis
This PR introduces a new
welly.mcpmodule that explores welly's petrophysical analysis capabilities to AI assistants through the Model Context Protocol (MCP).Key features
load_las_well,get_curve_stats,plot_well_log,get_well_info,list_curvesTechnical implementation
welly/mcp/without modifying core welly codeUse cases
Files added / file tree
Testing
All newly created tests pass (11/11). Ready for integration.
A couple of examples of use inside Cursor IDE below (Gemini 2.5 Pro as LLM used)
Fig 1 – initial well log analysis

Fig 2 – plot visualisation

please check
welly/mcp/README.mdfor a deeper dive