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_result | ID로 특정 공개 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_base64 | string | 다음 중 하나 | Base64로 인코딩된 기기 파일 (CSV, SPA, OPUS, SPC, JCAMP-DX 및 15개 이상의 다른 형식 지원) |
| filename | string | file_base64 사용 | 확장자를 포함한 원본 파일 이름 (예: sample.spa) |
| peaks | number[] | 다음 중 하나 | 피크 파수 목록 (cm⁻¹) (예: [3026, 1601, 1493, 755]) |
| top_k | integer | 아니요 (기본값 10) | 반환할 결과 수, 최대 50 |
| tolerance | integer | 아니요 (기본값 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_text | string | 다음 중 하나 | 기존 기기 또는 라이브러리 보고서에서 복사한 일반 텍스트. 텍스트에는 보고된 결과와 샘플 피크 테이블이 모두 포함되어야 합니다. |
| report_file_base64 | string | 다음 중 하나 | Base64로 인코딩된 보고서 파일. 지원 형식: PDF, DOC, DOCX, TXT, CSV, PNG, JPG, JPEG, WEBP, GIF, BMP, TIF, TIFF. |
| report_filename | string | report_file_base64와 함께 | 확장자를 포함한 원본 보고서 파일 이름 (예: report.pdf 또는 report.docx). |
| user_background_text | string | 아니요 | 선택적 샘플 배경. 이는 증거가 아닌 소프트 컨텍스트로만 처리됩니다. |
하드 입력 경계
- 필수 요소 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())