Plugin not installable from marketplace yet; image upload only via undocumented REST endpoint (field is `image`, not `file`)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 56/100
- Tipo di issue
- Documentazione
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- markdown, python
- Ambito
- api, documentation
Direzione di ricerca
Read skills/hackmd-mcp-usage/reference/capability-gaps.md and check the README and linked MCP setup docs for the marketplace installation instructions. Confirm the documented multipart field against the working request described here, then update the affected documentation to explain the plugin's marketplace status and correct the upload example. Done when both documentation gaps raised in the issue are addressed; endpoint support and plans for an MCP upload tool need maintainer input.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Two things I ran into while trying to automate "publish an Obsidian markdown note with images to HackMD" from Claude Code:
- The documented plugin install does not work (plugin is not in the marketplace yet).
- Neither the MCP server nor the API docs offer image upload, but an undocumented REST endpoint does work, with one correction to the hint in this repo.
1. /plugin install hackmd@claude-community fails
Following the README / MCP server setup docs:
/plugin marketplace add anthropics/claude-plugins-community # ok
/plugin marketplace update claude-community # ✔ Updated 1 marketplace
/plugin install hackmd@claude-community
# -> Plugin "hackmd" not found in marketplace "claude-community"
The local marketplace clone has no hackmd directory (only eli5, html-plan, next-steps, quickdesign, testdino, tres-finance-plugin). I assume the directory submission is still pending. It would help to state that on the docs page and in the README until it lands, or to offer claude --plugin-dir / a manual .mcp.json snippet as the primary path in the meantime.
Claude Code version: 2.1.306 (Claude Code)
2. Image upload: not possible via MCP, works via undocumented REST endpoint
Use case: an Obsidian note with ~20 ![[img.webp]] embeds. Pasting each image through the web editor by hand is the only documented way. mcp.hackmd.io has no upload tool, hackmd-cli has none, and the public API docs do not list one.
skills/hackmd-mcp-usage/reference/capability-gaps.md in this repo mentions:
curl -X POST "https://api.hackmd.io/v1/notes/<noteId>/images" \
-H "Authorization: Bearer <user-api-token>" \
-F "file=@/path/to/image.png"
That exact call returns 400 {"message":"Invalid upload request"}. The multipart field has to be image, not file:
curl -X POST "https://api.hackmd.io/v1/notes/<noteId>/images" \
-H "Authorization: Bearer $HACKMD_API_TOKEN" \
-F "[email protected];type=image/webp"
# 201 {"data":{"link":"https://hackmd.io/_uploads/<id>.webp"}}
With that, the whole flow (upload 22 webp files, rewrite the markdown links, PATCH /v1/notes/<id> with the new content) runs unattended from Claude Code. Bytes are stored unchanged (verified against S3), webp is accepted.
Questions
- Is
POST /v1/notes/<noteId>/imagesa supported endpoint, or something that could change without notice? If supported, could it be added to the public API docs (with the correctimagefield name) and fixed incapability-gaps.md? - Any plans to expose image upload through the MCP server (e.g. an
upload-imagetool taking a local path or base64), so thepush-to-hackmdskill can handle notes with images end to end? Right now the skill's "MCP-only, do not fall back to API tokens" rule makes it unusable for any note that has images.
Happy to test a pre-release or send a PR for the docs fix.
- Lingua principale
- Python
- Stelle
- 3
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Issue simili
-
request_access
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
-
blocker bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
achisolomon/software-factory#305 ·
-
free_port can hand one port to two callers, so the fixed-port http tests fail in parallel runsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
erkamyaman/rust-anything#963 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
commonmark/commonmark-spec#850 ·
-
Documentation websiteApertadocumentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100