Skip to main content

MCP bridge for a self-hosted MinerU API

Project description

mineru-selfhosted-mcp

mineru-selfhosted-mcp exposes a self-hosted MinerU service as an MCP server.

It is designed for setups where:

  • MinerU is deployed on a remote GPU server
  • Claude Desktop / Cursor / other MCP clients run elsewhere
  • The client should only run a lightweight MCP bridge locally

Environment variables

  • MINERU_BASE_URL: Optional. Base URL of your self-hosted MinerU API. Defaults to the public FRP endpoint http://42.51.34.112:8191
  • MINERU_API_KEY: Optional token sent to the MinerU API as Authorization: Bearer <token>
  • MINERU_TIMEOUT: Optional request timeout in seconds. Default: 1800
  • MINERU_TRUST_ENV: Optional. Set to true only if you want the bridge to inherit local proxy variables. Default: disabled.
  • MINERU_LOG_DIR: Optional. Directory used by clean_logs. Defaults to ~/.mineru-selfhosted-mcp/logs

If you are running on the Linux host itself, the local proxy listens on http://127.0.0.1:8192. Remote MCP clients should use the public FRP endpoint on 8191.

Exposed tools

  • mineru_health: check the remote MinerU API
  • parse_document: parse a single local file through the remote MinerU API
  • parse_documents: parse one or more local files through the remote MinerU API
  • parse_directory: parse all matching files in a directory through the remote MinerU API
  • get_ocr_languages: list common OCR language codes supported by MinerU
  • clean_logs: remove local MCP log files older than a chosen number of days

Parsing result metadata

Parsing tools also return:

  • elapsed_seconds
  • file_count
  • completed_count
  • failed_count
  • progress

progress is a stable completion summary for the current call rather than a live streaming progress feed.

Notes

  • To get only middle_json, set middle_json_only=true in parsing tools.
  • middle_json_only=true automatically disables markdown in the MCP request wrapper.

Example MCP config

{
    "mcpServers": {
      "mineru-selfhosted": {
        "command": "uvx",
        "args": ["-y", "mineru-selfhosted-mcp"],
        "env": {
          "MINERU_API_KEY": "your_token",
          "MINERU_BASE_URL": "http://42.51.34.112:8191",
          "MINERU_DOWNLOAD_BASE_URL": "http://42.51.34.112:8191/downloads"
        }
      }
  }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mineru_selfhosted_mcp-0.1.13.tar.gz (87.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mineru_selfhosted_mcp-0.1.13-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file mineru_selfhosted_mcp-0.1.13.tar.gz.

File metadata

  • Download URL: mineru_selfhosted_mcp-0.1.13.tar.gz
  • Upload date:
  • Size: 87.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for mineru_selfhosted_mcp-0.1.13.tar.gz
Algorithm Hash digest
SHA256 31ababc869ba9e688a07b644bc84b2291aa654d682052a1af2ede64e74b32dff
MD5 0ca439c4e06524a03c0b9129b0351754
BLAKE2b-256 8dec0ef86c9f52e1a07797765ba73d112ed73992013f892f2ea6b559e237924a

See more details on using hashes here.

File details

Details for the file mineru_selfhosted_mcp-0.1.13-py3-none-any.whl.

File metadata

File hashes

Hashes for mineru_selfhosted_mcp-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 47cce296b45d35803658be81f14481d7288775306c77d7ccf4a4bc9c0fb8a2ec
MD5 836e97fc36063a73048b5e7ebe0d849d
BLAKE2b-256 14d8245e8df465a77dde22d13f0ada2bab6f8f30b6bd0f2ce2e1cf34bc4992ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page