Mcp Server

org.ptpgev0.30.1更新於 Oct 10, 2026

The open vocabulary of print for AI agents: terms, product envelopes, validation, fingerprint.

已驗證Streamable HTTP可網頁執行Developer ToolsKnowledge & Memory

概覽

AI 產生的概覽

唯讀存取 PTPGE 印刷詞彙表:搜尋術語、讀取產品範本、驗證設定,並計算或展開印刷指紋。

功能
將 PTPGE 規格(印刷領域的開放詞彙表)以一組唯讀 MCP 工具提供給助理。助理可以搜尋術語、讀取術語及其關聯與記號、瀏覽階層、讀取產品範本、依範本驗證設定、解析 4/4 之類的色彩記號,以及計算或展開 ptpge-cfs/1 指紋。回應為純 JSON。
適用情境
適合助理需要理解或產生印刷規格的場景:查詢印刷術語、檢查某設定是否符合產品範本、解析油墨記號,或為印刷訂單產生與展開指紋。它是參考與驗證服務,不是生產或下單系統。
執行需求
公開伺服器是遠端 Streamable HTTP 端點,不需要金鑰或帳號。自行執行需要 Python 3 及專案相依套件,可選環境變數用於詞彙表 API 位址、重新整理間隔、日誌層級,以及可選的 Basic Auth 或權杖設定。
安裝前請注意
公開端點是開放且唯讀的,不會代你寫入或傳送資料。若自行架設,可選驗證變數 PTPGE_MCP_AUTH_USERS、PTPGE_MCP_HTPASSWD、PTPGE_MCP_TOKENS 和 PTPGE_MCP_TOKENS_FILE 保存憑證;僅在伺服器本就應開放時才留空。詞彙表資料從所設定的 PTPGE_API_BASE 取得。

安裝

在 SourceWeft 中

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

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "mcp-server": {
      "type": "http",
      "url": "https://mcp.ptpge.org/mcp"
    }
  }
}

README

PTPGE MCP Server

A read-only Model Context Protocol server that exposes the PTPGE specification — the open vocabulary of print — to AI agents.

The vocabulary (terms with permanent URIs, product templates, variables, schemas and registers) is published under CC BY 4.0 at https://api.ptpge.org/v1/. This server loads it, keeps it in memory, reloads when the dataset version changes, and offers it to agents as a small set of MCP tools: search a term, read a term, read a product envelope, validate a configuration, resolve a colour notation, compute and expand a configuration fingerprint (ptpge-cfs/1).

Live, open, no key: https://mcp.ptpge.org/mcp (Streamable HTTP). open.mcp.ptpge.org is an alias.

Add it to your assistant

  • Claude (web or desktop): Settings → Connectors → Add custom connector → https://mcp.ptpge.org/mcp
  • ChatGPT: Settings → Connectors → Add (developer mode) → same URL
  • Claude Code: claude mcp add ptpge --transport http https://mcp.ptpge.org/mcp

Then ask, in any language: «What is a roll fold?» or «Fingerprint an A4 tri-fold brochure, 170 g silk, 4/4».

Tools

ToolWhat it does
ptpge_search_termsFree-text search over the vocabulary, tokenised and language-independent. Hits carry URI, label, level, group, kind (term · supplier · vendor · schema) and score. Deprecated terms are skipped unless asked for.
ptpge_get_termOne term in full: definition, relations (broader / narrower / related), mappings, properties, notation. Accepts a full URI or a relative path.
ptpge_get_versionDataset version, term counts, licence, scheme URL, server version.
ptpge_browseWalk the hierarchy from a node.
ptpge_get_product_envelopeFor a product template: which variables apply, which are required for an identity, which values are allowed.
ptpge_validate_configCheck a configuration (bindings on vocabulary URIs) against its envelope: membership, cardinality, scope, numeric bands, cross-variable rules.
ptpge_resolve_color_notation4/4, 4/1, 1/0 … → ink counts per face in vocabulary terms.
ptpge_fingerprintCanonicalise a validated configuration and compute its ptpge-cfs/1 fingerprint (spec and offer).
ptpge_expand_fingerprintA fingerprint back to its configuration, from the register at ptpge.org/f/.

Responses are plain JSON. The /playground page lets you watch an agent run the loop from a free-text order to a fingerprint, every tool call in the transcript.

Endpoints

PathPurpose
POST /mcpMCP over Streamable HTTP (also GET for the event stream, DELETE to end a session)
GET /health, /healthzLiveness + dataset version
GET /playgroundThe Playground
GET /sseRetired — answers 410 with a pointer to /mcp

Run it yourself

bash
python3 -m venv venv && source venv/bin/activatepip install -r requirements.txtpython -m ptpge_mcp.server          # http://0.0.0.0:8000/mcp

Test with the MCP Inspector: npx @modelcontextprotocol/inspector, transport Streamable HTTP, URL http://localhost:8000/mcp.

bash
pytest -q

Configuration

VariableDefaultPurpose
PTPGE_API_BASEhttps://api.ptpge.org/v1Where the vocabulary is fetched from
PTPGE_REFRESH_SECONDS900How often to check version.json for a new dataset
PTPGE_LOG_LEVELINFOPython logging level
PTPGE_MCP_AUTH_USERS—Optional Basic Auth on the server, comma-separated user:pass pairs. Leave unset for an open server.
PTPGE_MCP_HTPASSWD—Optional path to an Apache htpasswd file used instead of the variable above
PTPGE_MCP_TOKENS / _TOKENS_FILE—Optional per-recipient tokens (?t=), same purpose

The public server at mcp.ptpge.org runs with none of the auth variables set.

Layout

ptpge_mcp/├── server.py           # tools, handlers, Streamable HTTP, Playground route├── data.py             # fetch, cache, index, search├── config.py           # environment-based runtime config├── cfs_resolution.py   # canonicalisation + ptpge-cfs/1├── fingerprint.py, fingermark.py   # hash and mark├── completeness.py     # required variables / unspecified axes├── colornotation.py    # 4/4-style notation → terms├── semantic.py         # embedding search (term_embeddings.npz)├── registerclient.py   # ptpge.org/f/ register client├── playground.py, learningpage.py, missreport.py└── _frame.py           # ptpge.org site frame (generated; do not edit)tests/passenger_wsgi.py       # cPanel/Passenger entry point for the hosted instance.cpanel.yml             # deploy script for the hosted instanceCHANGELOG.md            # semver; one entry per release

Versioning

Semver for the server; the dataset has its own date version (ptpge_get_version). The fingerprint algorithm is a separate contract, ptpge-cfs/1, and does not change with server releases.

Licence

Code: Apache License 2.0. Vocabulary and data: CC BY 4.0, held by PTPGE, a non-profit association (being formed). See ptpge.org/governance.

Registry

Listed in the official MCP Registry as org.ptpge/mcp-server (server.json in this repository; published with mcp-publisher, namespace verified by a DNS record on ptpge.org).

來源:README.md,提交 4f6cbe3

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v0.30.1最新Oct 10, 2026