This repo contains five MCP servers (stdio transport) used for structure retrieval, structure modification, energy evaluation, CIF file listing, and Perplexity deep research.
Servers included (excluding optimade_adsorbml):
cif_file_resource_serverstructure_retrieval_serverstructure_modification_serverenergy_evaluation_serverperplexity_deep_research
- Python 3.10+
uvinstalled
Each server directory has its own pyproject.toml/uv.lock. Install deps per-server.
Run this once per server:
cd <server_dir>
uv syncExamples:
cd cif_file_resource_server && uv sync
cd structure_retrieval_server && uv sync
cd structure_modification_server && uv sync
cd energy_evaluation_server && uv sync
cd perplexity_deep_research && uv syncEach server is an MCP stdio process:
cd <server_dir>
uv run python main.pyPurpose: list CIFs under cif_file_resource_server/cifs/ and return formula + space group.
Run:
cd cif_file_resource_server
uv sync
uv run python main.pyTool exposed:
list_cif_files() -> str(JSON array)
Notes:
- Requires
spglib(used by ASE symmetry checks).
Purpose: query OPTIMADE (Materials Project + OQMD) and write results.json / results_short.json.
Run:
cd structure_retrieval_server
uv sync
uv run python main.pyTool exposed:
optimade_structure_search(elements: List[str], nelements: int, output_dir: str="") -> str
Outputs:
results.json: full structure payloads (cell + cartesian coords + symbols)results_short.json: compact summary list (provider/id/formula/spacegroup)
Purpose: build a FairChem slab from a CIF or from results.json, optionally apply:
- surface doping (topmost atom replacement)
- in-plane strain (scales a/b lattice vectors)
Run:
cd structure_modification_server
uv sync
uv run python main.pyTool exposed:
create_and_serialize_slab(...) -> str
Outputs:
- a serialized slab pickle (
.pkl) inoutput_dir
Notes:
- Some transitive deps import
pkg_resources; the project pinssetuptools<81to keep that import available.
Purpose: run AdsorbML to evaluate adsorption configurations on a slab, returning a minimum adsorption energy summary.
Run:
cd energy_evaluation_server
uv sync
uv run python main.pyTool exposed:
adsorbml_evaluate(..., adsorbate="*OH", device="cuda") -> str
Notes:
device="cuda"requires a working NVIDIA GPU runtime (CUDA-visible device). Usedevice="cpu"if no GPU is available.- Some transitive deps import
pkg_resources; the project pinssetuptools<81to keep that import available.
Purpose: call Perplexity “sonar-deep-research” and return the full response text.
Run:
cd perplexity_deep_research
uv sync
uv run python main.pyTool exposed:
deep_research(query: str) -> str
Environment:
- Set
PERPLEXITY_API_KEY(this server loadsperplexity_deep_research/.envif present).
Most MCP clients need a command to spawn the server. Typical command patterns are:
uv --directory <server_dir> run python main.pyor
cd <server_dir> && uv run python main.py