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 分