統合

FTIR.fun MCPサーバー&REST API

FTIR.funをAIアシスタントまたは自動化パイプラインに接続。Claude/Cursor/Codex向けMCPサーバー。カスタム統合用REST API。すべての方法で同じ130,000以上の参照スペクトルと文献に基づくAI解釈。

MCPサーバー — Claude、Cursor、Codex

FTIR.funのMCP(Model Context Protocol)サーバーは、Anthropic MCP Registry、Smithery、MCP.soで審査され正式にリストされています。FTIRスペクトル検索、DOI引用文献によるピーク説明、材料識別を、MCP互換クライアント向けの呼び出し可能ツールとして公開します。

クイック接続

# 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

利用可能なツール

ツール説明
search_ftir_libraryピークまたはアップロードファイルで130K以上の参照スペクトルを検索。CAS番号と類似度スコア付きのランク付けされた一致を返します。
search_public_ftir_resultsコミュニティ共有の分析結果をキーワードで検索。
fetch_public_ftir_resultIDで特定の公開FTIR分析結果を取得し、詳細を確認します。

サーバーカード&レジストリリンク

すべてのプラットフォーム統合を見る

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いずれかBase64エンコードされたレポートファイル。サポートされている形式: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:少なくとも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成功
401APIキーが見つからないか無効です
422無効なリクエストボディ、サポートされていないレポート形式、または必須レポート要素の欠如
500サーバー側エラー
リクエストを送信 フォーム