{"_id":"@adhookio/local-media-mcp","name":"@adhookio/local-media-mcp","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@adhookio/local-media-mcp","version":"0.1.0","description":"Local MCP server that PUTs image/video files from a folder on your machine to an upload URL (e.g. an Adhook presigned URL). Holds no credentials.","license":"MIT","type":"module","bin":{"adhook-local-media-mcp":"dist/index.js"},"publishConfig":{"access":"public"},"engines":{"node":">=18"},"repository":{"type":"git","url":"git+https://github.com/adhookio/adhook-local-media-mcp.git"},"homepage":"https://github.com/adhookio/adhook-local-media-mcp#readme","bugs":{"url":"https://github.com/adhookio/adhook-local-media-mcp/issues"},"scripts":{"build":"tsc","start":"node dist/index.js","prepare":"npm run build"},"dependencies":{"@modelcontextprotocol/sdk":"^1.4.0"},"devDependencies":{"@types/node":"^22.9.0","typescript":"^5.6.3"},"_id":"@adhookio/local-media-mcp@0.1.0","gitHead":"b2db60e840e94f9de130a6ffe367d19e5925ed4d","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-fBssfizXRqtqrbF2F7RvbQSw6OX6QydVH31j07b1meS4+mrUVmYT712c5k3a6jRnmsMaMbGq/goKZuQmo5Gl6g==","shasum":"863d22ba6768a192462b29f27ae283e73de521e4","tarball":"https://registry.npmjs.org/@adhookio/local-media-mcp/-/local-media-mcp-0.1.0.tgz","fileCount":6,"unpackedSize":16034,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA1VddxM7DFxYb6b70XmJexwwLIywf6W+939j5jL1lVcAiEAgfyeD9Ag7zY8vOdOhNgn4Bzsog9soiIRd5uVBrRG4EM="}]},"_npmUser":{"name":"adhookio","email":"andreas@adhook.io"},"directories":{},"maintainers":[{"name":"adhookio","email":"andreas@adhook.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/local-media-mcp_0.1.0_1788894130245_0.3144625367898408"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-08T19:02:10.051Z","0.1.0":"2026-09-08T19:02:10.381Z","modified":"2026-09-08T19:02:10.641Z"},"maintainers":[{"name":"adhookio","email":"andreas@adhook.io"}],"description":"Local MCP server that PUTs image/video files from a folder on your machine to an upload URL (e.g. an Adhook presigned URL). Holds no credentials.","homepage":"https://github.com/adhookio/adhook-local-media-mcp#readme","repository":{"type":"git","url":"git+https://github.com/adhookio/adhook-local-media-mcp.git"},"bugs":{"url":"https://github.com/adhookio/adhook-local-media-mcp/issues"},"license":"MIT","readme":"# adhook-local-media-mcp\n\nA small **local** MCP server that uploads image/video files from a folder on your\nmachine to an **upload URL you give it** (a presigned PUT URL), and returns the\nresult. It holds **no credentials** — it is a file‑read + HTTP‑PUT pipe.\n\nIt exists because a **remote** MCP connector can never read a file off your disk,\nand a file dragged into a Claude chat reaches the model as an image, not as bytes a\ntool can forward. Pairs with the Adhook connector: that connector (authenticated)\nmints the upload URL, this server (on your machine) does the PUT.\n\nWorks in **Claude Desktop** and **Claude Code**; **not** in claude.ai (the web app\ncannot run local servers).\n\n## Tools\n\n| Tool | What it does |\n|---|---|\n| `list_local_media` | Lists image/video files in the configured media folder (name, size, content type). |\n| `upload_local_media(filename, uploadUrl, method?, contentType?, headers?)` | Reads that file and PUTs its bytes to `uploadUrl`. Returns `{ ok, status, uploadedBytes, host, filename }`. |\n\n- Only a bare file name directly inside the media folder is accepted (no paths, no\n  `..`, no dotfiles).\n- `uploadUrl` must be `https:` and its host must be in the allowlist\n  (`*.amazonaws.com`, `media.adhook.io`, `*.adhook.io` by default — override with\n  `ADHOOK_UPLOAD_URL_ALLOWLIST`). This stops a hijacked tool call from exfiltrating\n  a file to an arbitrary endpoint.\n- Default max size 100 MB (`ADHOOK_MAX_UPLOAD_BYTES`).\n\n## The flow (with the Adhook connector)\n\n```\n1. list_local_media                              (this server)      → foo.jpg is there\n2. create_media_upload_url(fileExtension:\"jpg\")  (Adhook connector) → { uploadUrl, method, contentType, mediaUrl }\n3. upload_local_media(\"foo.jpg\", uploadUrl, contentType:\"image/jpeg\")  (this server) → PUT → 200\n4. create_post(imageUrls:[mediaUrl])            (Adhook connector)\n```\n\nAll auth lives in step 2 (the connector is OAuth‑authenticated and the upload URL\nis short‑lived and single‑object). This server never sees a credential.\n\n## Install — Claude Desktop (Desktop Extension)\n\n1. Download `adhook-local-media.mcpb` from Releases and double‑click it.\n2. In the install dialog pick your **Media folder** (e.g. `~/AdhookMedia`).\n3. Restart Claude Desktop.\n\nNo Node.js required — the runtime is bundled.\n\n## Install — Claude Desktop (manual, needs Node.js ≥ 18)\n\n`~/Library/Application Support/Claude/claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"adhook-media\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@adhookio/local-media-mcp\"],\n      \"env\": {\n        \"ADHOOK_MEDIA_DIR\": \"/Users/you/AdhookMedia\"\n      }\n    }\n  }\n}\n```\n\nRestart Claude Desktop.\n\n## Install — Claude Code\n\n```bash\nclaude mcp add adhook-media \\\n  --env ADHOOK_MEDIA_DIR=\"$HOME/AdhookMedia\" \\\n  -- npx -y @adhookio/local-media-mcp\n```\n\n## Usage\n\n1. Drop images/videos into your media folder (Finder, screenshot target, a synced\n   iCloud/Dropbox folder from your phone, …).\n2. Ask Claude: *\"welche Bilder liegen im Media-Ordner?\"* → `list_local_media`\n3. *\"nutze `foo.jpg` in einem Adhook-Post\"* → the model calls\n   `create_media_upload_url` (connector) → `upload_local_media` (this server) →\n   `create_post` (connector).\n\nA file dragged into the chat window is **not** picked up automatically — put it in\nthe folder and name it.\n\n## Configuration\n\n| Env var | Default | Purpose |\n|---|---|---|\n| `ADHOOK_MEDIA_DIR` | – (required) | Folder to read files from. `~` is expanded. |\n| `ADHOOK_UPLOAD_URL_ALLOWLIST` | `*.amazonaws.com,media.adhook.io,*.adhook.io` | Allowed upload‑URL hosts (comma‑separated, `*.` wildcard). |\n| `ADHOOK_MAX_UPLOAD_BYTES` | `104857600` (100 MB) | Reject larger files. |\n\n## Develop\n\n```bash\nnpm install\nnpm run build\nADHOOK_MEDIA_DIR=~/AdhookMedia node dist/index.js   # speaks MCP over stdio\n```\n","readmeFilename":"README.md","_rev":"1-56f8d40b735af2fef891d6875d2e56b0"}