FTIR.fun MCP Server & REST API
Connect FTIR.fun to your AI assistant or automation pipeline. MCP server for Claude/Cursor/Codex. REST API for custom integrations. Same 130,000+ reference spectra and literature-backed AI interpretation across all methods.
MCP Server — Claude, Cursor, Codex
FTIR.fun's MCP (Model Context Protocol) server has been reviewed and officially listed on the Anthropic MCP Registry, Smithery, and MCP.so. It exposes FTIR spectral search, peak explanation with DOI-cited literature, and material identification as callable tools for any MCP-compatible client.
Quick Connect
Available Tools
| Tool | Description |
|---|---|
search_ftir_library | Search 130K+ reference spectra by peaks or uploaded file. Returns ranked matches with CAS numbers and similarity scores. |
search_public_ftir_results | Search community-shared analysis results by keyword. |
fetch_public_ftir_result | Fetch a specific public FTIR analysis result by ID for detailed review. |
Server Card & Registry Links
- Server Card (JSON) — standard MCP server discovery endpoint
- Anthropic MCP Registry — officially listed
- Smithery — reviewed and published
- MCP.so — listed
- PyPI (ftirfun-mcp) — Python package
Coze Plugin — Use Inside Doubao
Open Doubao → Plugin Store → search "FTIR" or "红外分析" → tap Add. No configuration needed. Doubao will automatically route infrared-related queries to our spectral search engine.
Search keywords: 红外分析, FTIR, infrared, 光谱检索, 物质识别
REST API
Library Search API
POST /v1/search
Spectral library search. Accepts a file (full-spectrum matching) or a peak list (peak-position matching). If both are provided, file search takes priority.
Authentication
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| file_base64 | string | one of | Base64-encoded instrument file (supports CSV, SPA, OPUS, SPC, JCAMP-DX, and 15+ other formats) |
| filename | string | with file_base64 | Original filename including extension (e.g. sample.spa) |
| peaks | number[] | one of | List of peak wavenumbers in cm⁻¹ (e.g. [3026, 1601, 1493, 755]) |
| top_k | integer | no (default 10) | Number of results to return, max 50 |
| tolerance | integer | no (default 8) | Peak match tolerance in cm⁻¹, range 1–30 |
Response
Example — File Upload
Example — Peak List
AI-Only Analysis for Existing Results
Use this endpoint only after a search result already exists. FTIR.fun first reads or OCRs the supplied report, extracts the reported candidates and sample peak table, then runs downstream KG and literature-backed analysis.
POST /ftir/analyze_existing_results
The report must contain both the reported search result list and the sample peak table. This endpoint does not perform spectral-library search by itself.
Authentication
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| report_text | string | one of | Plain text copied from an existing instrument or library report. The text must include both the reported results and the sample peak table. |
| report_file_base64 | string | one of | Base64-encoded report file. Supported formats: PDF, DOC, DOCX, TXT, CSV, PNG, JPG, JPEG, WEBP, GIF, BMP, TIF, TIFF. |
| report_filename | string | with report_file_base64 | Original report filename including extension (for example report.pdf or report.docx). |
| user_background_text | string | no | Optional sample background. This is treated as soft context only and not as evidence. |
Hard Input Boundary
- Required element 1: at least one reported search result candidate, such as a Top1 hit or a Top15 list
- Required element 2: the sample peak list or peak table in cm-1 from the same report
- If either element is missing, the endpoint returns HTTP 422 and does not generate an analysis report
Success Response
Missing-Input Response
Example — Existing Report Text
Example — Existing Report File
Error Codes
| HTTP Status | Meaning |
|---|---|
| 200 | Success |
| 401 | Missing or invalid API key |
| 422 | Invalid request body, unsupported report format, or missing required report elements |
| 500 | Server-side error |