Optimade MCP

Optimade MCP

A MCP tool for querying OPTIMADE-compatible material databases with configurable filters.

2
Stars
0
Forks
0
Releases

Overview

An MCP tool to query OPTIMADE-compatible material databases (e.g., Materials Project, Materials Cloud, COD) through the MCP protocol. It enables structured queries across multiple OPTIMADE databases and supports natural-language interaction so the LLM can generate the OPTIMADE query filter. The server is easily deployable via uvx or cline, and configured with a small manifest. Queries require two parameters: the OPTIMADE filter and the target database. The JSON response from OPTIMADE is saved locally under optimade://results/<uuid>, and a session summary is generated during the interaction. MCP resources are accessible on-demand via optimade:// URIs (filters, queryable props, providers, presets, prompts, results). The server exposes utilities such as lint_filter, query_optimade, and list_providers for validation, previews, and discovery. It supports provider fallback (user baseUrls → config defaults → public mirror) and proxy configuration via .env. Note: Resources are not auto-injected; clients must call resources/read at startup. The project is MIT licensed and deploy-ready.

Details

Owner
dianfengxiaobo
Language
Python
License
MIT License
Updated
2025-12-07

Features

MCP Resources on demand

Access on-demand optimade:// resources (docs/filters, spec/queryable_props, docs/providers, docs/filter_presets, prompts, and results) to guide filtering and query execution.

Linting tool for filters

lint_filter(filter) validates syntax and whitelist compliance, returning 'ok', 'warn: …', or 'syntax error: …'.

OPTIMADE query generation and preview

query_optimade(filter, baseUrls?) returns a preview (first 5 results) and a link to the full JSON result resource.

Provider discovery

list_providers() discovers global public OPTIMADE endpoints.

Provider fallback

If baseUrls is omitted or unavailable, the server falls back from user-provided to config defaults to a public mirror (https://optimade.fly.dev).

Deployment via uvx/cline

Easily deployable via uvx and cline with a simple JSON manifest.

Proxy support

Proxy-ready via .env (HTTP_PROXY, HTTPS_PROXY) for VPNs or corporate networks.

Result persistence and summarization

OPTIMADE responses are saved locally under optimade://results/<uuid> and a session summary is generated during interaction.

Audience

Materials scientistsQuery compositional data and crystal structures across OPTIMADE databases using natural language prompts.
AI/ML developersIntegrate natural-language prompts to generate OPTIMADE filters and retrieve results.

Tags

OPTIMADEMCPmaterialsdatabasesqueryfiltersproviderspresetslintuvproxyresultsJSONnatural languageLLM