Sponsored by Deepsite.site

Ftir Spectral Search

创建者
ftir_fun2 months ago
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.
概览

中文 | English | Español | Français | 日本語

FTIR.fun MCP Server

smithery badge MCP.so PyPI

MCP server and REST API client for FTIR.fun — gives AI assistants and code pipelines direct access to 130,000+ FTIR infrared reference spectra for material identification, peak explanation, and spectral library search.

Available Tools at a Glance

ToolWhat it does
analyze_ftir_spectrumIdentify an unknown FTIR spectrum — accepts peaks, natural-language query, or an instrument file (28+ formats). Returns ranked matches with similarity scores and literature DOI.
explain_peaksExplain one or more infrared peak positions — functional-group assignment without a full library search.
parse_ftir_spectrumParse a raw FTIR instrument file into wavenumber-intensity data points and detected peaks.
find_spectraSearch the 130,000+ reference library by substance name, CAS number, or keywords. Returns curve data for comparison.
submit_ftir_reportSubmit a spectrum to the full tri-axis identification workflow (same multi-stage analysis as the website).
get_ftir_report_statusPoll report progress; returns the complete structured result and a shareable URL when done.
fetch_resultRetrieve any historical FTIR.fun analysis result by report number.

Get an API Key

  1. Sign in at ftir.fun — new accounts include free trial credits.
  2. Go to Account → API Keys and click Generate.
  3. Copy the key immediately (starts with ftir_; shown only once).

Authentication uses a single header — no OAuth, no browser redirect:

# For MCP (hosted)
Authorization: Bearer ftir_your_key_here

# For REST API
X-API-Key: ftir_your_key_here

MCP Tools

The hosted MCP endpoint https://ftir.fun/mcp exposes seven tools.


analyze_ftir_spectrum

Search the FTIR infrared spectral library for one unknown spectrum. Accepts peaks, a natural-language query, or a raw instrument file.

Parameters

ParameterTypeRequiredDescription
querystringNoNatural-language FTIR request — peak positions such as "1730, 1600, 1250 cm-1" are extracted automatically.
peaksnumber[]NoFTIR peak positions in cm⁻¹ (e.g. [1736, 1379, 1241]).
file_base64stringNoBase64-encoded FTIR instrument file. Supports 28+ formats: Thermo .spa/.spc, Bruker .opus, PerkinElmer .sp, JCAMP-DX .jdx/.dx, CSV, Excel, and more.
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 evidence linked to published literature (DOI), confidence levels, and uncertainty disclosures.

Example

Identify this infrared spectrum: peaks at 2915, 1715, 1450, 1260, 1090 cm-1.

explain_peaks

Explain one or more FTIR infrared peaks without requiring a full spectral library search. Useful for quick functional-group assignment and wavenumber interpretation.

Parameters

ParameterTypeRequiredDescription
querystringNoNatural-language peak question, e.g. "What does 1715 cm-1 indicate in an ester?"
peaksnumber[]NoOne or more FTIR peak positions in cm⁻¹.
sampling_modestringNoATR, Thin Film, KBr Pellet, Nujol Mull, etc.

Returns: Structured peak explanations with functional-group assignments and uncertainty wording when available.

Example

Use FTIR.fun to explain the infrared peaks at 1715 and 3300 cm-1 in ATR mode.

parse_ftir_spectrum

Parse a base64-encoded FTIR instrument file into aligned wavenumber-intensity curve points and automatically detected peak positions. Use this to extract raw spectral data before analysis.

Parameters

ParameterTypeRequiredDescription
file_base64stringYesBase64-encoded FTIR instrument file.
filenamestringYesOriginal filename (e.g. "sample.spa") for format detection.

Returns: Aligned (wavenumber, intensity) data points and a list of detected peak positions in cm⁻¹.


find_spectra

Find FTIR library reference spectra by substance name, CAS number, spectrum number, or keywords. Returns raw spectral curve data for direct comparison.

Parameters

ParameterTypeRequiredDescription
querystringYesSubstance name (e.g. "polypropylene"), CAS number, FTIR library NUM, or keywords.
limitintegerNoNumber of reference spectra to return (1–20, default 10).

Returns: Matching reference spectra with num, names, CAS, peak markers, and library curve data.

Example

Find FTIR reference spectra for polyethylene terephthalate (PET).

submit_ftir_report

Submit a base64-encoded FTIR spectrum file to the full FTIR.fun tri-axis identification workflow — the same multi-stage analysis used on the website. Returns a task_id and result_num immediately; poll with get_ftir_report_status for the completed report.

Parameters

ParameterTypeRequiredDescription
file_base64stringYesBase64-encoded FTIR instrument file.
filenamestringYesOriginal filename for format detection.

Returns: { task_id, result_num }


get_ftir_report_status

Poll the status of a report submitted via submit_ftir_report. When complete, the response includes the full structured report_view (the same data shown on the FTIR.fun website) and a shareable report_url.

Parameters

ParameterTypeRequiredDescription
task_idstringYestask_id returned by submit_ftir_report.

Returns: Status field plus report_view and report_url when complete.


fetch_result

Fetch a historical FTIR.fun infrared analysis result by report number.

Parameters

ParameterTypeRequiredDescription
result_numstringYesFTIR.fun report/result number.
language_codestringNoDisplay language for the stored result context (default en).

Returns: Structured context with report_url, headline, summary, report_view, and result_context.


REST API

Call FTIR.fun directly from any language — Python, JavaScript, R, MATLAB, Go. Ideal for LIMS integrations, batch spectral processing pipelines, or adding infrared spectrum search to your own application.

Full API reference: https://ftir.fun/api-docs/

Health check (no key required)

curl https://ftir.fun/health
# → {"status":"ok","service":"ftirfun-api"}

Identify an unknown infrared spectrum — peak list

curl -X POST https://ftir.fun/ftir/analyze_spectrum \
  -H "X-API-Key: ftir_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "peaks": [2915, 1715, 1450, 1260, 1090],
    "options": {"top_k": 10, "tolerance_cm1": 8}
  }'
import requests

resp = requests.post(
    "https://ftir.fun/ftir/analyze_spectrum",
    headers={"X-API-Key": "ftir_your_key_here"},
    json={
        "peaks": [2915, 1715, 1450, 1260, 1090],
        "options": {"top_k": 10, "tolerance_cm1": 8},
    },
)
print(resp.json())

Identify from an instrument file

import base64, requests

with open("sample.spa", "rb") as f:
    b64 = base64.b64encode(f.read()).decode()

resp = requests.post(
    "https://ftir.fun/ftir/analyze_spectrum",
    headers={"X-API-Key": "ftir_your_key_here"},
    json={"file_base64": b64, "filename": "sample.spa"},
)
print(resp.json())

Supports 28+ instrument formats: Thermo .spa/.spc, Bruker .opus, PerkinElmer .sp, JCAMP-DX .jdx/.dx, CSV, Excel, and more.

Explain infrared peaks

curl -X POST https://ftir.fun/ftir/explain_peaks \
  -H "X-API-Key: ftir_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"peaks": [1715, 2915], "sampling_mode": "ATR"}'

Search reference spectra by name or CAS

curl "https://ftir.fun/v1/search?q=polypropylene&limit=5" \
  -H "X-API-Key: ftir_your_key_here"

MCP Client Setup

The hosted MCP endpoint requires no local install. Use https://ftir.fun/mcp with a Bearer token.

VS Code (GitHub Copilot Agent mode)

Create .vscode/mcp.json in your project (or add to user-level settings):

{
  "inputs": [
    {
      "type": "promptString",
      "id": "ftirfun-api-key",
      "description": "FTIR.fun API key",
      "password": true
    }
  ],
  "servers": {
    "ftirfun": {
      "type": "http",
      "url": "https://ftir.fun/mcp",
      "headers": {
        "Authorization": "Bearer ${input:ftirfun-api-key}"
      }
    }
  }
}

Open Command Palette → MCP: List Servers → select ftirfunStart.

Claude Desktop / Claude Code

URL:    https://ftir.fun/mcp
Header: Authorization: Bearer ftir_your_key_here

One-line setup for Claude Code:

claude mcp add --transport http ftirfun https://ftir.fun/mcp \
  --header "Authorization: Bearer ftir_your_key_here"

Cursor

Create or edit ~/.cursor/mcp.json:

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

OpenAI Codex

[mcp_servers.ftirfun]
url = "https://ftir.fun/mcp"
http_headers = { Authorization = "Bearer ftir_your_key_here" }

Gemini CLI

Edit ~/.gemini/settings.json:

{
  "mcpServers": {
    "ftirfun": {
      "httpUrl": "https://ftir.fun/mcp",
      "headers": {
        "Authorization": "Bearer ftir_your_key_here"
      }
    }
  }
}

Any other MCP client that supports a remote streamable-HTTP server works: set the URL to https://ftir.fun/mcp and send Authorization: Bearer <your key>. Full tool schema: server-card.json.


Self-Hosted (Local Wrapper)

A lightweight local MCP wrapper that proxies to the hosted API. Exposes the same seven FTIR tools.

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

Tool Boundary

Use this MCP server for FTIR spectral-library screening only. Do not use for non-FTIR spectroscopy, general chemistry Q&A, or accredited laboratory certification.


About FTIR.fun

FTIR.fun is a cloud platform for infrared spectroscopy analysis used by researchers and engineers in 52+ countries. It gives fast access to a continuously updated library of 130,000+ FTIR reference spectra covering polymers, additives, coatings, pharmaceuticals, and industrial chemicals.

What you can do on ftir.fun:

  • Spectral library search — upload an instrument file or paste peak positions; get ranked matches with similarity scores and literature DOI citations
  • AI peak explanation — ask about any wavenumber; receive functional-group assignments backed by a chemical knowledge graph
  • Full tri-axis report — automatic multi-stage material identification with a shareable result URL
  • Image-to-CSV extraction — digitize a spectrum curve from a published figure
  • Formulation workbench — multi-component deformulation and unknown-mixture analysis

Step-by-step setup guides: https://ftir.fun/ai-integration/


ResourceURL
Websitehttps://ftir.fun
Setup guidehttps://ftir.fun/ai-integration/
API docshttps://ftir.fun/api-docs/
Hosted MCP endpointhttps://ftir.fun/mcp
Server cardhttps://ftir.fun/.well-known/mcp/server-card.json
Smitheryhttps://smithery.ai/servers/hlin2097/ftirfun
MCP.sohttps://mcp.so/server/ftir-spectral-search/ftir_fun
PyPIhttps://pypi.org/project/ftirfun-mcp/

服务器配置

{
  "mcpServers": {
    "ftirfun": {
      "url": "https://ftir.fun/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_FTIRFUN_API_KEY>"
      }
    }
  }
}
推荐的 MCP Server
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Serper MCP ServerA Serper MCP Server
Tavily Mcp
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
DeepChatYour AI Partner on Desktop
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Playwright McpPlaywright MCP server
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
WindsurfThe new purpose-built IDE to harness magic
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
CursorThe AI Code Editor
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Amap Maps高德地图官方 MCP Server
ChatWiseThe second fastest AI chatbot™
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。