एकीकरण

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

# Claude Desktop / Claude Code claude mcp add ftirfun https://ftir.fun/mcp # Cursor # Add to ~/.cursor/mcp.json: {"mcpServers": {"ftirfun": {"url": "https://ftir.fun/mcp"}}} # OpenAI Codex codex mcp add ftirfun https://ftir.fun/mcp

Available Tools

Toolविवरण
search_ftir_librarySearch 130K+ reference spectra by peaks or uploaded file. Returns ranked matches with CAS numbers and similarity scores.
search_public_ftir_resultsSearch community-shared analysis results by keyword.
fetch_public_ftir_resultFetch a specific public FTIR analysis result by ID for detailed review.

Server Card & Registry Links

View All Platform Integrations

Coze प्लगइन — 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.

खोज कीवर्ड: 红外分析, FTIR, infrared, 光谱检索, 物质识别

REST API

लाइब्रेरी खोज API

POST /v1/search

स्पेक्ट्रल पुस्तकालय खोज। एक फ़ाइल (पूर्ण-स्पेक्ट्रम मिलान) या एक चरम सूची (चरम-स्थिति मिलान) स्वीकार करता है। यदि दोनों प्रदान किए जाते हैं, तो फ़ाइल खोज को प्राथमिकता दी जाती है।

प्रमाणीकरण

X-API-Key: your-api-key

अनुरोध निकाय

फ़ील्डप्रकारआवश्यकविवरण
file_base64stringइनमें से एकBase64-एन्कोडेड उपकरण फ़ाइल (CSV, SPA, OPUS, SPC, JCAMP-DX, और 15+ अन्य प्रारूपों का समर्थन करता है)
filenamestringfile_base64 के साथएक्सटेंशन सहित मूल फ़ाइल नाम (जैसे sample.spa)
peaksnumber[]इनमें से एकcm⁻¹ में चरम तरंग संख्याओं की सूची (जैसे [3026, 1601, 1493, 755])
top_kintegerनहीं (डिफ़ॉल्ट 10)लौटाने के लिए परिणामों की संख्या, अधिकतम 50
toleranceintegerनहीं (डिफ़ॉल्ट 8)cm⁻¹ में चरम मिलान सहनशीलता, सीमा 1–30

प्रतिक्रिया

{ "success": true, "search_mode": "full_spectrum", "n_matches": 10, "matches": [ { "rank": 1, "name": "Polystyrene", "cas": "25086-18-4", "num": 326, "similarity": 0.9586 } ], "file_format": "Thermo SPA", "n_points": 3601, "error": null }

उदाहरण — फ़ाइल अपलोड

import base64, requests with open("sample.spa", "rb") as f: b64 = base64.b64encode(f.read()).decode() resp = requests.post( "https://api.ftir.fun/v1/search", headers={"X-API-Key": "your-key", "Content-Type": "application/json"}, json={"file_base64": b64, "filename": "sample.spa", "top_k": 5}, ) print(resp.json())

उदाहरण — पीक सूची

import requests resp = requests.post( "https://api.ftir.fun/v1/search", headers={"X-API-Key": "your-key", "Content-Type": "application/json"}, json={"peaks": [3082, 3026, 2923, 1601, 1493, 1451, 1028, 906, 755, 699], "top_k": 5}, ) print(resp.json())

मौजूदा परिणामों के लिए केवल-AI विश्लेषण

इस एंडपॉइंट का उपयोग केवल तब करें जब खोज परिणाम पहले से मौजूद हो। FTIR.fun पहले आपूर्ति की गई रिपोर्ट को पढ़ता है या OCR करता है, रिपोर्टेड उम्मीदवारों और नमूना पीक तालिका को निकालता है, फिर डाउनस्ट्रीम KG और साहित्य-समर्थित विश्लेषण चलाता है।

POST /ftir/analyze_existing_results

रिपोर्ट में रिपोर्टेड खोज परिणाम सूची और नमूना पीक तालिका दोनों शामिल होनी चाहिए। यह एंडपॉइंट स्वयं स्पेक्ट्रल-लाइब्रेरी खोज नहीं करता है।

प्रमाणीकरण

X-API-Key: your-api-key

अनुरोध निकाय

फ़ील्डप्रकारआवश्यकविवरण
report_textstringइनमें से एकमौजूदा उपकरण या पुस्तकालय रिपोर्ट से कॉपी किया गया सादा पाठ। पाठ में रिपोर्टेड परिणाम और नमूना पीक तालिका दोनों शामिल होने चाहिए।
report_file_base64stringइनमें से एकबेस64-एन्कोडेड रिपोर्ट फ़ाइल। समर्थित प्रारूप: PDF, DOC, DOCX, TXT, CSV, PNG, JPG, JPEG, WEBP, GIF, BMP, TIF, TIFF।
report_filenamestringreport_file_base64 के साथएक्सटेंशन सहित मूल रिपोर्ट फ़ाइल नाम (उदाहरण के लिए report.pdf या report.docx)।
user_background_textstringनहींवैकल्पिक नमूना पृष्ठभूमि। इसे केवल नरम संदर्भ के रूप में माना जाता है, साक्ष्य के रूप में नहीं।

हार्ड इनपुट सीमा

  • आवश्यक तत्व 1: कम से कम एक रिपोर्टेड खोज परिणाम उम्मीदवार, जैसे Top1 हिट या Top15 सूची
  • आवश्यक तत्व 2: उसी रिपोर्ट से cm-1 में नमूना पीक सूची या पीक तालिका
  • यदि कोई भी तत्व गायब है, तो एंडपॉइंट HTTP 422 लौटाता है और विश्लेषण रिपोर्ट उत्पन्न नहीं करता है

सफलता प्रतिक्रिया

{ "success": true, "analysis_mode": "ai_only_existing_results", "message": "AI-only analysis completed from the supplied existing results report.", "input_requirements": { "service_boundary": "AI-only analysis starts after a search result already exists.", "required_inputs": [ "At least one reported search result candidate (Top1 or Top15).", "The sample peak table or peak list in cm-1." ] }, "missing_requirements": [], "missing_requirement_messages": [], "extracted_report": { "source_kind": "pdf", "used_ocr": true, "peak_values_cm1": [1736, 1601, 1241], "library_candidates": [ {"rank": 1, "name": "Polyethylene terephthalate", "cas_number": "25038-59-9", "raw_score_text": "856/1000", "normalized_similarity": 0.856} ] }, "summary": "Reported library results rank Polyethylene terephthalate first.", "report_view": {}, "final_decision": {}, "direct_evidence": {}, "related_literature": {} }

लापता-इनपुट प्रतिक्रिया

{ "detail": { "success": false, "analysis_mode": "ai_only_existing_results", "error": "missing_required_report_elements", "message": "AI-only analysis requires both reported library results and a sample peak table.", "missing_requirements": ["sample_peak_table"], "missing_requirement_messages": [ "Missing sample peak table. Provide the sample peak list or peak table in cm-1 from the same report." ], "input_requirements": { "failure_behavior": "If either the reported result list or the sample peak table is missing, the service stops and returns a 422 response." }, "extracted_report": { "report_has_library_results": true, "report_has_peak_table": false } } }

उदाहरण — मौजूदा रिपोर्ट टेक्स्ट

import requests report_text = """ Sample: PET fragment Top1: Polyethylene terephthalate Score: 856/1000 Top2: Polyester resin Score: 801/1000 Peak table (cm-1): 3435, 2932, 1715, 1409, 1241, 1093, 1017, 872, 722 """ resp = requests.post( "https://api.ftir.fun/ftir/analyze_existing_results", headers={"X-API-Key": "your-key", "Content-Type": "application/json"}, json={"report_text": report_text, "user_background_text": "consumer packaging fragment"}, ) print(resp.json())

उदाहरण — मौजूदा रिपोर्ट फ़ाइल

import base64, requests with open("instrument-report.pdf", "rb") as f: b64 = base64.b64encode(f.read()).decode() resp = requests.post( "https://api.ftir.fun/ftir/analyze_existing_results", headers={"X-API-Key": "your-key", "Content-Type": "application/json"}, json={ "report_file_base64": b64, "report_filename": "instrument-report.pdf", "user_background_text": "suspected packaging adhesive", }, ) print(resp.json())

त्रुटि कोड

HTTP स्थितिअर्थ
200सफलता
401लापता या अमान्य एपीआई कुंजी
422अमान्य अनुरोध निकाय, असमर्थित रिपोर्ट प्रारूप, या लापता आवश्यक रिपोर्ट तत्व
500सर्वर-पक्ष त्रुटि
अनुरोध सबमिट करें फ़ॉर्म