DECIMER MCP Server

io.github.DocMinus由 GitHub 帳號 DocMinus 發布v0.1.4更新於 Oct 24, 2026

MCP server for DECIMER image-to-SMILES chemical structure recognition

已驗證STDIO僅桌面媒體與設計AI 與機器學習

概覽

AI 產生的概覽

讓助理透過 DECIMER 辨識 API 把化學結構影像轉換成 SMILES 字串。

可以做什麼
這個本機 MCP 伺服器把 DECIMER 的影像轉 SMILES 化學結構辨識功能包裝成工具呼叫。它提供 server_health,用來檢查 DECIMER FastAPI 伺服器是否可連線;以及 analyze_chemical_image,把 base64 編碼的影像送到 image2smiles 端點,並回傳結構化結果,包括 SMILES 字串、API 狀態,以及分類器分數與判定。它只是薄薄的轉接層,本身不執行 DECIMER 模型。
適用情境
當助理需要從影像讀取化學結構圖並取得機器可讀的 SMILES 時使用,例如化學或化學資訊學工作流程。只有在你已經執行或能夠執行它所呼叫的獨立 DECIMER API 伺服器時才有用。
執行需求
需要 Python 3.10+ 以及正在執行的 DECIMER API 伺服器,預設位址為 uv/uvx 以 stdio 方式安裝與執行。選用環境變數:DECIMER_API_BASE_URL、DECIMER_API_TIMEOUT_SECONDS、DECIMER_MAX_IMAGE_BYTES、DECIMER_MCP_LOG_LEVEL。未宣告需要驗證。
安裝前請注意
送出分析的影像會傳到所設定的 DECIMER API 端點,該端點可能是遠端的,因此不要把機密結構傳到不受信任的伺服器。轉接層本身除了該 API 呼叫外不會寫入、傳送或刪除資料。使用前請確認端點與逾時設定。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 DECIMER MCP Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

DecimerMCPServer

mcp-name: io.github.DocMinus/decimer-mcp-server

MCP server that exposes DECIMER image-to-SMILES functionality as tool calls.

This project is a thin adapter over the existing FastAPI service in DecimerServerAPI. It does not run DECIMER models directly. The adapter sends JSON requests by default, with automatic fallback to form payloads for compatibility.

Tools

  • server_health: Checks whether the DECIMER FastAPI server is reachable.
  • analyze_chemical_image: Sends a base64-encoded image to /image2smiles/ and returns structured output.

Requirements

  • Python 3.10+
  • Running DECIMER API server (default: http://localhost:8099)

find it at either of these two versions:

Install

bash
cd /Users/a/dev/DecimerMCPServeruv venvuv sync

Configuration

Copy .env.example values into your environment:

  • DECIMER_API_BASE_URL (default http://localhost:8099)
  • DECIMER_API_TIMEOUT_SECONDS (default 60)
  • DECIMER_MAX_IMAGE_BYTES (default 10000000)
  • DECIMER_MCP_LOG_LEVEL (default INFO)

Run (stdio transport)

bash
uv run decimer-mcp-server

or

bash
uv run python -m decimer_mcp_server

Example MCP client config

json
{  "mcpServers": {    "decimer": {      "command": "uv",      "args": ["run", "python", "-m", "decimer_mcp_server"],      "env": {        "DECIMER_API_BASE_URL": "http://localhost:8099"      }    }  }}

Output shape

analyze_chemical_image returns:

json
{  "ok": true,  "smiles": "CCO",  "reason": null,  "api_status_code": 200,  "api_message": null,  "classifier_score": 0.0000012,  "classifier_threshold": 0.3,  "classifier_decision": "structure_like"}

When no SMILES is returned by API classifier behavior:

json
{  "ok": true,  "smiles": null,  "reason": "not_chemical_structure",  "api_status_code": 200,  "api_message": "No SMILES returned by API",  "classifier_score": 0.99999,  "classifier_threshold": 0.3,  "classifier_decision": "not_structure_like"}

Development tests

bash
uv sync --extra devuv run pytest

Make targets:

bash
make syncmake test

Smoke test helper

Run one health check + one inference call against your DECIMER API:

bash
cd /Users/a/dev/DecimerMCPServerDECIMER_API_BASE_URL=http://chitchat:8099 uv run decimer-mcp-smoke-test --image /Users/a/dev/DecimerServerAPI/example_usage/structure.png

If you keep settings in .env, load it with:

bash
uv run --env-file .env decimer-mcp-smoke-test --image /Users/a/dev/DecimerServerAPI/example_usage/structure.png

or use make:

bash
make smoke

Override the image path if needed:

bash
make smoke SMOKE_IMAGE=/absolute/path/to/image.png
## MCP Registry publishing
Tags matching `v*` trigger `.github/workflows/publish-mcp.yml`.
Workflow steps:- installs `mcp-publisher`- validates `server.json`- calls registry publish using secret `MCP_REGISTRY_TOKEN`- publishes slug `io.github.DocMinus/decimer-mcp-server` (case sensitive; must match registry grant)
Before tagging:1. Update `pyproject.toml` + `server.json` versions2. Ensure `server.json` stays valid (`uv pip install jsonschema && python validate snippet from AGENTS.md`)3. Add GitHub repo secret `MCP_REGISTRY_TOKEN` (GitHub PAT with `repo`, `workflow` scopes)
Release flow:```bashgit tag v0.1.1git push origin v0.1.1

Monitor Actions tab. If publish fails, rerun using workflow dispatch after fixing issues.


## ContributionThis project was built by DocMinus with AI-assisted coding support (OpenCode/Copilot-style tooling), then reviewed and tested by the author.
## AI usage policy
- AI assistance was used for scaffolding, implementation drafts, and documentation edits.- Final technical decisions, validation runs, and acceptance were performed by the maintainer.- Runtime behavior should be validated with local tests (`make test`) and smoke tests (`make smoke`) before release.

來源:README.md,提交 375df14

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.4最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分