送信

Ftir Spectral Search

@ftir_fun

FTIR spectral search and material identification. Upload instrument files (28+ formats) or peak lists, get ranked candidates with literature-backed DOI citations from 135,000+ reference spectra.
概要

FTIR.fun MCP Server

smithery badge MCP.so

MCP server for FTIR spectral-library search and material identification. Connects AI assistants to 135,000+ FTIR reference spectra with literature-backed peak assignments (DOI-cited).

Tools

analyze_ftir_spectrum

Search the FTIR.fun spectral library for one unknown FTIR spectrum.

ParameterTypeRequiredDescription
querystringNoNatural-language FTIR request. Peak positions (e.g. "1730, 1600, 1250 cm-1") are extracted automatically.
peaksnumber[]NoFTIR peak positions in cm⁻¹ (e.g. [1736, 1379, 1241]).
file_base64stringNoBase64-encoded FTIR spectrum file (supports 28+ formats: Thermo .spa/.spc, Bruker .opus, PerkinElmer .sp, JCAMP-DX, CSV, Excel).
filenamestringNoOriginal filename for format detection (e.g. "sample.spa").
top_kintegerNoNumber of ranked candidates to return (1–50, default 15).
tolerance_cm1integerNoPeak matching tolerance in cm⁻¹ (1–30, default 8).

Returns: Ranked candidate materials with library similarity scores, peak-by-peak explanations linked to published literature (DOI), confidence levels, and uncertainty disclosures.

Search public FTIR.fun result pages by keyword.

ParameterTypeRequiredDescription
querystringYesSearch query string.

Returns: Matching public result pages with id, url, title, text, and metadata.

fetch

Fetch one public FTIR.fun result document by ID.

ParameterTypeRequiredDescription
idstringYesResult ID in result:<number> format or bare number.

Returns: Full result document with url, headline, summary, report_view, and metadata.

Connect directly to the production endpoint — no local install required:

{
  "mcpServers": {
    "ftirfun": {
      "url": "https://ftir.fun/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_FTIRFUN_API_KEY>"
      }
    }
  }
}

One-line setup for Claude Code:

claude mcp add ftirfun https://ftir.fun/mcp

The hosted endpoint exposes all three tools (analyze_ftir_spectrum, search, fetch) and is the canonical production service.

Self-Hosted (Local Wrapper)

This repository provides a lightweight local MCP wrapper that proxies to the hosted API. The local wrapper exposes analyze_ftir_spectrum only.

Configuration

export FTIRFUN_API_KEY="your-ftirfun-api-key"

Optional:

export FTIRFUN_API_BASE_URL="https://ftir.fun"
export FTIRFUN_API_TIMEOUT_SECONDS="120"

Run Locally (stdio)

python -m venv .venv
. .venv/bin/activate
pip install .
ftirfun-mcp

Run Streamable HTTP

FTIRFUN_API_KEY="your-ftirfun-api-key" \
ftirfun-mcp --transport streamable-http --host 127.0.0.1 --port 8001

Docker

docker build -t ftirfun-mcp .
docker run --rm -p 8001:8001 -e FTIRFUN_API_KEY="your-ftirfun-api-key" ftirfun-mcp

For registry introspection, the server can start without an API key. Tool calls that require the hosted API return a structured api_key_required error until FTIRFUN_API_KEY is configured.

Tool Boundary

Use this MCP server for FTIR spectral-library screening only.

Do not use for:

  • Non-FTIR spectroscopy
  • General chemistry Q&A
  • Institutional AI-only review of existing third-party reports
  • Accredited laboratory certification

サーバー設定

{
  "mcpServers": {
    "ftirfun": {
      "url": "https://ftir.fun/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_FTIRFUN_API_KEY>"
      }
    }
  }
}