Entegrasyon

FTIR.fun MCP Sunucusu ve REST API

FTIR.fun'u AI asistanınıza veya otomasyon hattınıza bağlayın. Claude/Cursor/Codex için MCP sunucusu. Özel entegrasyonlar için REST API. Tüm yöntemlerde aynı 130.000+ referans spektrumu ve literatür destekli AI yorumlaması.

MCP Sunucusu — Claude, Cursor, Codex

FTIR.fun'un MCP (Model Context Protocol) sunucusu incelenmiş ve Anthropic MCP Registry, Smithery ve MCP.so'da resmi olarak listelenmiştir. Herhangi bir MCP uyumlu istemci için FTIR spektral arama, DOI ile atıfta bulunulan literatürle pik açıklaması ve malzeme tanımlamasını çağrılabilir araçlar olarak sunar.

Hızlı Bağlantı

# 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

Kullanılabilir Araçlar

AraçAçıklama
search_ftir_libraryPiklere veya yüklenen dosyaya göre 130K+ referans spektrumu arayın. CAS numaraları ve benzerlik puanları ile sıralanmış eşleşmeleri döndürür.
search_public_ftir_resultsTopluluk tarafından paylaşılan analiz sonuçlarını anahtar kelimeye göre arayın.
fetch_public_ftir_resultAyrıntılı inceleme için kimliğe göre belirli bir genel FTIR analiz sonucunu getirin.

Sunucu Kartı ve Kayıt Bağlantıları

Tüm Platform Entegrasyonlarını Görüntüle

Coze Eklentisi — Doubao İçinde Kullan

Open Doubao → Plugin Store → search "FTIR" or "红外分析" → tap Add. No configuration needed. Doubao will automatically route infrared-related queries to our spectral search engine.

Arama anahtar kelimeleri: 红外分析, FTIR, kızılötesi, 光谱检索, 物质识别

REST API

Kütüphane Arama API'si

POST /v1/search

Spektral kütüphane araması. Bir dosyayı (tam spektrum eşleştirme) veya bir tepe listesini (tepe konumu eşleştirme) kabul eder. Her ikisi de sağlanırsa, dosya araması önceliklidir.

Kimlik Doğrulama

X-API-Key: your-api-key

İstek Gövdesi

AlanTürGerekliAçıklama
file_base64stringbiriBase64 kodlu cihaz dosyası (CSV, SPA, OPUS, SPC, JCAMP-DX ve 15'ten fazla diğer formatı destekler)
filenamestringfile_base64 ileUzantı dahil orijinal dosya adı (örn. sample.spa)
peaksnumber[]biricm⁻¹ cinsinden tepe dalga sayıları listesi (örn. [3026, 1601, 1493, 755])
top_kintegerhayır (varsayılan 10)Döndürülecek sonuç sayısı, maksimum 50
toleranceintegerhayır (varsayılan 8)cm⁻¹ cinsinden tepe eşleşme toleransı, aralık 1–30

Yanıt

{ "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 }

Örnek — Dosya Yükleme

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())

Örnek — Tepe Listesi

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())

Mevcut Sonuçlar için Yalnızca Yapay Zeka Analizi

Bu uç noktayı yalnızca bir arama sonucu zaten mevcut olduğunda kullanın. FTIR.fun önce sağlanan raporu okur veya OCR yapar, raporlanmış adayları ve numune pik tablosunu çıkarır, ardından ileri KG ve literatür destekli analizi çalıştırır.

POST /ftir/analyze_existing_results

Rapor, hem raporlanmış arama sonucu listesini hem de numune pik tablosunu içermelidir. Bu uç nokta kendi başına spektral kütüphane araması yapmaz.

Kimlik Doğrulama

X-API-Key: your-api-key

İstek Gövdesi

AlanTürGerekliAçıklama
report_textstringbiriMevcut bir cihaz veya kütüphane raporundan kopyalanan düz metin. Metin, hem raporlanmış sonuçları hem de numune pik tablosunu içermelidir.
report_file_base64stringbiriBase64 kodlu rapor dosyası. Desteklenen formatlar: PDF, DOC, DOCX, TXT, CSV, PNG, JPG, JPEG, WEBP, GIF, BMP, TIF, TIFF.
report_filenamestringreport_file_base64 ileUzantısı dahil orijinal rapor dosya adı (örneğin report.pdf veya report.docx).
user_background_textstringhayırİsteğe bağlı numune geçmişi. Bu yalnızca yumuşak bağlam olarak ele alınır ve kanıt olarak değerlendirilmez.

Sert Girdi Sınırı

  • Gerekli öğe 1: en az bir raporlanmış arama sonucu adayı, örneğin bir Top1 hit veya bir Top15 listesi
  • Gerekli öğe 2: aynı rapordan cm-1 cinsinden numune pik listesi veya pik tablosu
  • Öğelerden herhangi biri eksikse, uç nokta HTTP 422 döndürür ve bir analiz raporu oluşturmaz

Başarılı Yanıt

{ "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": {} }

Eksik Girdi Yanıtı

{ "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 } } }

Örnek — Mevcut Rapor Metni

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())

Örnek — Mevcut Rapor Dosyası

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())

Hata Kodları

HTTP DurumuAnlam
200Başarılı
401Eksik veya geçersiz API anahtarı
422Geçersiz istek gövdesi, desteklenmeyen rapor formatı veya eksik gerekli rapor öğeleri
500Sunucu tarafı hatası
Talep Gönder Form