Skip to main content

Standalone Hack Forums MCP launch surface

Project description

hf-mcp

hf-mcp is a standalone MCP server package for the Hack Forums API v2.

Current release line: 0.2.8.

Install

pip install hf-mcp

Entrypoints

  • hf-mcp (aliases hf-mcp serve)
  • python -m hf_mcp
  • hf-mcp setup init
  • hf-mcp auth bootstrap
  • hf-mcp doctor
  • hf-mcp serve

Desktop MCP clients

Desktop client wiring is first-class and documented in docs/client_integration.md, including:

  • direct command launch (hf-mcp serve)
  • module launch (python -m hf_mcp serve)
  • virtualenv/conda launch forms
  • native Windows Python launch
  • Windows desktop client to WSL bridge examples (including Claude Desktop style)

Default local paths

  • config: ~/.config/hf_mcp/config.yaml
  • token store: ~/.config/hf_mcp/token.json

Path overrides:

  • HF_MCP_CONFIG for config path
  • HF_MCP_ENV_FILE for explicit .env path
  • HF_MCP_TOKEN_PATH for token path (unless YAML token_path is set)

Full precedence and policy split are documented in docs/configuration.md.

Read output defaults

Read tools default to human-readable summaries while keeping canonical JSON for scripts.

  • default mode: readable
  • per-call override: output_mode (readable, structured, raw)
  • additive raw payload toggle: include_raw_payload

Compatibility contract for read tools:

  • structuredContent always carries normalized/canonical JSON for automation.
  • output_mode="structured" keeps script-friendly structuredContent with terse text.
  • raw payload remains available as an additive JSON resource when output_mode="raw" or include_raw_payload=true.

See docs/configuration.md for read_output_defaults config and docs/examples.md for concrete request/response examples.

Automation usage

For automated clients, call read tools with output_mode="structured" when you only need normalized fields, or output_mode="raw" / include_raw_payload=true when you also need the exact upstream HF API payload as an additive MCP resource.

Example:

{
  "tool": "posts.read",
  "arguments": {
    "tid": 6324346,
    "per_page": 1,
    "include_post_body": true,
    "output_mode": "raw",
    "include_raw_payload": true
  }
}

Expected protocol shape:

{
  "content": [
    {"type": "text", "text": "posts.read returned 1 row(s)."},
    {"type": "resource", "resource": {"uri": "hf-mcp://raw/posts.read", "mimeType": "application/json"}}
  ],
  "structuredContent": {
    "posts": [
      {
        "pid": "62946370",
        "tid": "6324346",
        "subject": "The HF API MCP server",
        "message": "[size=xx-large][align=center][css=68]HF MCP Is Live..."
      }
    ]
  }
}

Quick start

pip install hf-mcp
hf-mcp setup init
hf-mcp auth bootstrap
hf-mcp doctor
hf-mcp serve

Before auth bootstrap, create your own Hack Forums API developer app in the HF user control panel. You can use the hosted callback https://cortalabs.github.io/hf_mcp/oauth_callback.html for HF_MCP_EXTERNAL_REDIRECT_URI, or host docs/oauth_callback.html yourself and use that HTTPS URL instead.

Module launch equivalent:

python -m hf_mcp serve

Safety and release posture

  • Read paths and guarded writes are documented publicly, with fail-closed behavior for concrete writes via confirm_live=true.
  • Concrete write helpers currently exposed are threads.create, posts.reply, and Bytes write helpers (bytes.transfer, bytes.deposit, bytes.withdraw, bytes.bump) with repaired argument contracts.
  • scheduled_at on draft artifacts is metadata for operator workflow only; hf-mcp does not ship a scheduler/queue that auto-executes future writes.
  • HF API quote/entity canonicalization on live writes is treated as expected security/sanitization behavior, not a bypass target.
  • Manual live validation in this wave is intentionally narrower: replies only on TID 6083735 plus at most one threads.create in FID 375; no Bytes live writes.
  • Placeholder writes remain out of scope in this wave (contracts.write, sigmarket.write, admin.high_risk.write).
  • Detailed release-boundary and limitation truth is owned by docs/export_boundary.md.

Docs map

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

hf_mcp-0.2.8.tar.gz (102.4 kB view details)

Uploaded Source

Built Distribution

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

hf_mcp-0.2.8-py3-none-any.whl (82.3 kB view details)

Uploaded Python 3

File details

Details for the file hf_mcp-0.2.8.tar.gz.

File metadata

  • Download URL: hf_mcp-0.2.8.tar.gz
  • Upload date:
  • Size: 102.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hf_mcp-0.2.8.tar.gz
Algorithm Hash digest
SHA256 34f7471fe3bd8ed240208511fd424f6ea0188beeb26d02fb83cd3917046038d0
MD5 233dc2066f5329e8a46c9154307fe9da
BLAKE2b-256 8e55bb5d6fcfe8d978d690b7757e404918d88fff55a44b44853c1cd140d3a8f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for hf_mcp-0.2.8.tar.gz:

Publisher: publish-hf-mcp-pypi.yml on CortaLabs/hf_mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hf_mcp-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: hf_mcp-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 82.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hf_mcp-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 561cb223af92b3be79cc6d60c0ccb2d81af4eca2d6810a502298aab65e7a2ced
MD5 2d567116a67c61fe8e3fe00af95dcc57
BLAKE2b-256 602028e35cba3d8a2cc21e675c639c20ee5a59937aadc1a6c48c1920260b350b

See more details on using hashes here.

Provenance

The following attestation bundles were made for hf_mcp-0.2.8-py3-none-any.whl:

Publisher: publish-hf-mcp-pypi.yml on CortaLabs/hf_mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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