Metadata-Version: 2.4
Name: nuance-mcp
Version: 0.2.0
Summary: Vendor-agnostic Model Context Protocol server for multimodal electron microscopy — schema-bound tool layer with pluggable adapters for Gatan, JEOL, Hitachi, …
Author-email: Roberto dos Reis <roberto.reis@northwestern.edu>, "Vinayak P. Dravid" <v-dravid@northwestern.edu>
License-Expression: MIT
Keywords: electron microscopy,TEM,STEM,4D-STEM,EELS,MCP,model context protocol,LLM,Ollama,Gatan,JEOL,Hitachi,DigitalMicrograph,PyJEM,autonomous microscopy
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: fastmcp>=3.1.0
Requires-Dist: mcp[cli]>=1.0.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: scipy>=1.10.0
Requires-Dist: httpx>=0.25.0
Provides-Extra: ollama
Requires-Dist: langchain-ollama>=1.0.0; extra == "ollama"
Requires-Dist: langchain-mcp-adapters>=0.2.0; extra == "ollama"
Requires-Dist: langgraph>=0.2.0; extra == "ollama"
Provides-Extra: voice
Requires-Dist: faster-whisper>=1.1.0; extra == "voice"
Requires-Dist: sounddevice>=0.4.7; extra == "voice"
Provides-Extra: gatan
Requires-Dist: pyzmq>=25.0.0; extra == "gatan"
Provides-Extra: jeol
Provides-Extra: hitachi
Provides-Extra: all
Requires-Dist: nuance-mcp[gatan,jeol,ollama,voice]; extra == "all"

# nuance-mcp

A library for interfacing with transmission electron microscopes (TEM) via MCP (Model Context Protocol).

## Installation

```bash
pip install nuance-mcp
```

## Supported Hardware

The package provides adapters for multiple microscope vendors:

- **JEOL**: Full support for JEOL JEM-2100F, 2100, 2200FS, 3200FB, 3200, 3400FB, 3400FS, etc.
- **Gatan**: Bridge adapter for GMS-EELS and DM (Detector Manager) operations
- **Hitachi**: Adapter for Hitachi 2100, 2200, 2700, 2800, 2100II, 2200II, 2100UP, etc.

## Usage Examples

### JEOL Adapter

```python
from nuance_mcp.adapters.jeol import adapter

mcp = FastMCP("JEOL Adapter")
mcp.add_resource("microscope_state", adapter.get_microscope_state())
```

### Gatan Bridge Adapter

```python
from nuance_mcp.adapters.gatan import adapter

mcp = FastMCP("Gatan Adapter")
mcp.add_resource("eels_data", adapter.get_eels_data())
```

### Hitachi Adapter

```python
from nuance_mcp.adapters.hitachi import adapter

mcp = FastMCP("Hitachi Adapter")
mcp.add_resource("stem_image", adapter.acquire_stem())
```

## Features

- **Multi-vendor support**: Works with JEOL, Gatan, and Hitachi systems
- **Image acquisition**: TEM, STEM, 4D-STEM imaging
- **Spectrum acquisition**: EELS data collection
- **Diffraction**: SAD/HRTEM patterns
- **Detector control**: CCD, direct detection cameras
- **Image processing**: Filters, FFT analysis, spot mapping, DPC
- **Stage control**: X/Y positioning, tilting series
- **Live processing**: Job submission and monitoring

## Supported Capabilities

The following capabilities are supported by JEOL adapters:

- **TEM/STEM**: Conventional and annular dark field imaging
- **EELS/EDS**: Spectroscopy data acquisition
- **FFT/DPC**: Fourier transform and differential phase contrast processing
- **Image filters**: Radial profiles, spot mapping
- **Live jobs**: Asynchronous data processing

## Academic Citation

If you use this work or its concepts in your research, please cite our associated preprint:

**Title:** Schema-Bound LLM Control of Scientific Instrumentation through Model Context Protocol Skills  
**Authors:** Roberto dos Reis, Vinayak P. Dravid  
*(arXiv ID and URL pending)*

```bibtex
@misc{dosReis2026SchemaBound,
  title={Schema-Bound LLM Control of Scientific Instrumentation through Model Context Protocol Skills},
  author={Roberto dos Reis and Vinayak P. Dravid},
  year={2026},
  eprint={PENDING},
  archivePrefix={arXiv}
}
```

## Intellectual Property Disclosure

This software, schemas, and the associated methodologies for agentic control of scientific instrumentation using the Model Context Protocol (MCP) were developed in whole or in part at Northwestern University. 

This work is the subject of the following Northwestern University Invention Disclosure:
- **Disclosure Title:** Universal Control Protocol for Scientific Instrumentation Using Extended Model Context Protocol
- **Invention ID:** Disc-ID-25-05-22-002
- **Tech ID:** 2025-136
- **Inventors:** Roberto Moreno Souza dos Reis, Vinayak P. Dravid

Commercialization, licensing inquiries, and related intellectual property matters should be directed to the Innovation and New Ventures Office (INVO) at Northwestern University.

## License

MIT
