nplg-dspace-mcp

nplg-dspace-mcp

Read-only MCP server for the National Parliamentary Library of Georgia's Iverieli repository, enabling search, metadata retrieval, PDF downloads, and rendering of historical newspaper pages as JPEGs and tiles.

Category
访问服务器

README

NPLG DSpace MCP

Upstream-read-only Streamable HTTP MCP server for the National Parliamentary Library of Georgia's Iverieli repository (dspace.nplg.gov.ge). It lets an agent search the archive, read rich document metadata, list and download validated public PDF bitstreams, and inspect historical Georgian newspapers as full-page JPEGs plus overlapping crop-only tiles.

What is implemented

  • Sessionless MCP 2026-07-28 over POST /mcp, with a compatibility path for 2025-11-25 clients.
  • NPLG-specific DSpace 5.5 XMLUI/Manakin and OAI-PMH adapter; this is intentionally not a generic DSpace scraper.
  • Exact-origin, canonical-handle, DNS/IP, redirect, MIME, signature, streaming-size, and path controls.
  • Rich Dublin Core metadata with OAI-DIM preference and bounded XMLUI fallback.
  • Content-addressed public PDF storage, signed expiring asset URLs, and standard MCP resource_link content blocks for PDFs, manifests, page JPEGs, and tiles.
  • Conservative PDFium-based page classification:
    • byte-identical extraction for eligible single embedded JPEG pages;
    • native embedded-scan pixel-grid rendering where defensible;
    • explicitly labelled fallback_400_dpi for vector or mixed pages.
  • JPEG pages with no post-render resize.
  • Default 2048×2048 crop-only tiles with 128-pixel overlap.
  • Shared upstream request pacing plus fail-fast MCP, asset-stream, server-wide, and PDF-job concurrency bounds.
  • Bearer authentication by default in production.
  • Docker Compose + Caddy deployment assets and post-deploy verification scripts.

No OCR is performed. The companion skill tells agents to verify Georgian text visually and preserve page/tile provenance. No MCP tool mutates the upstream NPLG archive and render deletion remains operator-only. The three tools that populate the local download/render cache are accurately marked as cache-writing in their MCP annotations.

MCP tools

Tool Purpose
search_documents Search Iverieli, optionally within a collection handle.
get_document_metadata Read rich metadata for a canonical handle.
list_document_files List public and restricted bitstreams attached to an item.
download_document_file Download a discovered public PDF only.
inspect_pdf Classify pages and report scan geometry and text overlays.
render_pdf_pages Create full-page JPEGs on the native scan grid or labelled fallback grid.
render_pdf_page_tiles Create overlapping crop-only tiles without resize.
get_render_manifest Refresh structured render metadata and signed links.

Local development

Python 3.13 is the verified development runtime.

python -m venv .venv
. .venv/bin/activate
python -m pip install -e '.[test]'

export NODE_ENV=development
export ASSET_SIGNING_SECRET="$(python -c 'import secrets; print(secrets.token_hex(32))')"
export ALLOW_ANONYMOUS=true
export PUBLIC_BASE_URL=http://127.0.0.1:8000
python -m nplg_mcp

In another shell:

python scripts/verify_deploy.py --base-url http://127.0.0.1:8000

Run tests:

python -m pytest -q
python -m compileall -q src scripts

Offline tests use pinned HTML/OAI fixtures and a synthetic PDF corpus. Live NPLG checks are deliberately opt-in.

Production deployment

Use the reviewed Docker Compose + Caddy procedure in deploy/README.md for the complete download and PDF-rendering pipeline. Alpic users must read deploy/ALPIC.md: the platform can host the search/metadata surface, but its serverless runtime, 30-second tool limit, and static /assets/ handling do not provide a full-fidelity target for the current multi-call rendering workflow.

The minimum Docker/VPS operational sequence is:

cp .env.example .env
# replace domain and both secrets
docker compose --env-file .env config --quiet
docker compose build --pull
docker compose up -d
set -a; . ./.env; set +a
python scripts/verify_deploy.py --base-url https://mcp.example.com
python scripts/smoke_live.py --base-url https://mcp.example.com --query 'ივერია'

Design, review, and agent workflow

  • Approved design: docs/superpowers/specs/2026-08-14-nplg-dspace-mcp-design.md
  • Implementation plan: docs/superpowers/plans/2026-08-14-nplg-dspace-mcp-implementation.md
  • Critical review: docs/reviews/2026-08-14-critical-review.md
  • Georgian visual-analysis skill: skills/georgian-newspaper-visual-analysis/SKILL.md
  • Current security-repair verification: docs/verification/2026-08-14-security-repair-report.md
  • Historical verification snapshot: docs/verification/2026-08-14-verification-report.md

Explicit limitations

  • Live XMLUI/OAI compatibility must be rechecked after deployment because upstream HTML can change.
  • The custom MCP wire layer covers only this server's methods; it is not a replacement for the full official SDK.
  • The build environment used for this release could not install or run the official MCP SDK/Inspector, so those remain external post-deploy checks.
  • PDF work is bounded inside a hardened container but not inside a separately verified nested sandbox.
  • The cache is single-node filesystem storage and is not horizontally coordinated or automatically pruned. A process-local logical-byte quota rejects new cache writes at CACHE_MAX_BYTES; retain a filesystem/inode limit and disk alerts as independent controls.
  • Process-local admission limits bound work inside one server process; they are not per-client rate limits. Internet deployments still need a trusted edge policy for client-aware abuse controls.
  • Public download access does not establish public-domain status; rights metadata remains part of the evidence record.

License

The project-authored source is MIT. Runtime and development dependencies retain their own licenses; see THIRD_PARTY_NOTICES.md. The production image uses permissively licensed pypdfium2/PDFium, and synthetic fixtures use permissively licensed ReportLab and pypdf.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选