FTIR.fun MCP Server
This server connects AI assistants to a library of 135,000+ FTIR reference spectra, enabling spectral analysis, material identification, and peak interpretation. Capabilities include:
Analyze Unknown Spectra: Search the spectral library for candidate materials by providing peak positions (cm⁻¹), a natural-language description, or a base64-encoded instrument file. Returns ranked candidates with similarity scores, peak-by-peak explanations, confidence levels, and literature references (DOI).
Explain Peaks: Get structured, literature-supported assignments for one or more FTIR peak positions without a full library search; supports optional sampling mode context (e.g., ATR, KBr Pellet).
Find Reference Spectra: Look up reference spectra by substance name, CAS number, spectrum number, or keywords, returning matched spectra with names, CAS numbers, peak markers, and curve data.
Parse Instrument Files: Decode base64-encoded FTIR instrument files (28+ formats supported, including Thermo .spa/.spc, Bruker .opus, JCAMP-DX, CSV, etc.) into aligned curve points and detected peaks.
Submit & Track Full Reports: Submit a spectrum file to the FTIR.fun tri-axis analysis workflow, then poll for the completed structured report and its URL.
Fetch Historical Results: Retrieve previously generated reports by result number, including the report URL, headline, summary, and structured report view, with optional language selection.
Integrates with VS Code via GitHub Copilot Agent mode to provide FTIR spectral analysis capabilities, including material identification, peak explanation, and library search from the FTIR.fun database.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FTIR.fun MCP Server analyze FTIR peaks at 1720, 1650, and 1050 cm-1"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
中文 | English | Español | Français | 日本語
FTIR.fun MCP Server
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
Tool | What it does |
Identify 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 one or more infrared peak positions — functional-group assignment without a full library search. | |
Parse a raw FTIR instrument file into wavenumber-intensity data points and detected peaks. | |
Search the 130,000+ reference library by substance name, CAS number, or keywords. Returns curve data for comparison. | |
Submit a spectrum to the full tri-axis identification workflow (same multi-stage analysis as the website). | |
Poll report progress; returns the complete structured result and a shareable URL when done. | |
Retrieve any historical FTIR.fun analysis result by report number. |
Related MCP server: Verix API MCP Server
Get an API Key
Sign in at ftir.fun — new accounts include free trial credits.
Go to Account → API Keys and click Generate.
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_hereMCP 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
Parameter | Type | Required | Description |
| string | No | Natural-language FTIR request — peak positions such as "1730, 1600, 1250 cm-1" are extracted automatically. |
| number[] | No | FTIR peak positions in cm⁻¹ (e.g. |
| string | No | Base64-encoded FTIR instrument file. Supports 28+ formats: Thermo |
| string | No | Original filename for format detection (e.g. |
| integer | No | Number of ranked candidates to return (1–50, default 15). |
| integer | No | Peak 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
Parameter | Type | Required | Description |
| string | No | Natural-language peak question, e.g. |
| number[] | No | One or more FTIR peak positions in cm⁻¹. |
| string | No |
|
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
Parameter | Type | Required | Description |
| string | Yes | Base64-encoded FTIR instrument file. |
| string | Yes | Original filename (e.g. |
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
Parameter | Type | Required | Description |
| string | Yes | Substance name (e.g. |
| integer | No | Number 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
Parameter | Type | Required | Description |
| string | Yes | Base64-encoded FTIR instrument file. |
| string | Yes | Original 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
Parameter | Type | Required | Description |
| string | Yes |
|
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
Parameter | Type | Required | Description |
| string | Yes | FTIR.fun report/result number. |
| string | No | Display language for the stored result context (default |
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 ftirfun → Start.
Claude Desktop / Claude Code
URL: https://ftir.fun/mcp
Header: Authorization: Bearer ftir_your_key_hereOne-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-mcpRun Streamable HTTP
FTIRFUN_API_KEY="your-ftirfun-api-key" \
ftirfun-mcp --transport streamable-http --host 127.0.0.1 --port 8001Docker
docker build -t ftirfun-mcp .
docker run --rm -p 8001:8001 -e FTIRFUN_API_KEY="your-ftirfun-api-key" ftirfun-mcpTool 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/
Registry & Links
Resource | URL |
Website | |
Setup guide | |
API docs | |
Hosted MCP endpoint | |
Server card | |
Smithery | |
MCP.so | |
PyPI |
Available Tools
4 toolsanalyze_ftir_spectrumARead-onlyIdempotent
Search the FTIR.fun spectral library for one unknown FTIR spectrum in one call.
Use when the user provides an FTIR peak list, a natural-language description containing peaks, or a base64-encoded FTIR instrument file and wants ranked material candidates. Do not use for general chemistry Q&A, non-FTIR spectra, or institutional report review.
Inputs: peaks, query, top_k, filename, +2 more. Returns: object
explain_peaksDRead-onlyIdempotent
Inputs: peaks, query, sampling_mode. Returns: object
fetch_resultDRead-onlyIdempotent
Inputs: result_num (required), language_code. Returns: object
find_spectraDRead-onlyIdempotent
Inputs: query (required), limit. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Only one tool has a description, leaving the other three (explain_peaks, fetch_result, find_spectra) ambiguous in purpose. Their names hint at different actions but without descriptions, an agent cannot reliably distinguish them from analyze_ftir_spectrum or each other.
All tools follow a consistent verb_noun pattern with underscores: analyze_ftir_spectrum, explain_peaks, fetch_result, find_spectra. This makes the tool set predictable despite some vague verb choices.
Four tools is appropriate for a focused spectral analysis server. It covers the main interactions (analysis, explanation, result retrieval, library search) without being bloated or too sparse.
The tool set appears to cover core FTIR workflows (analysis, explanation, search, fetch results), but the lack of descriptions for three tools makes it impossible to confirm whether critical operations like peak listing or spectrum comparison are missing. There may be gaps that agents cannot discover.
Maintenance
Related MCP Connectors
FTIR spectral search and material identification for AI agents via MCP.
Chemistry, pharma and biotech tools for AI assistants: NMR, MS, IR and UV analysis, ADMET and ICH M7, stability (ICH Q1), HPLC methods, DoE, docking, retrosynthesis, biologics. Deterministic results you can check. Built in Leipzig, Germany.
Turn any LLM into your lab assistant: search samples, track experiments, analyze data with AI.
Generate SBOMs, scan vulnerabilities, and analyze dependencies from local projects or Git repos.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to search and retrieve chemical compound information, structures, and physical properties from the PubChem database. It supports querying via compound names, SMILES notation, or CIDs to provide detailed molecular data for chemical analysis.5-
- AlicenseNot gradedqualityCmaintenanceEnables searching Verix records, retrieving record details, and running analysis workflows through natural language via the Verix API.MIT
- AlicenseNot gradedqualityDmaintenanceEnables natural language interaction with computational chemistry tools including molecule building, electronic structure calculations, geometry optimization, vibrational spectroscopy, and molecular dynamics, powered by RDKit, PySCF, and ASE.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to query HITRAN molecular species and spectral lines, compute absorption and transmittance spectra using multiple line profiles, plot spectra, and retrieve partition functions, with data fetched live from HITRANonline via HAPI.5GPL 3.0