Feature/mcp asset library pr - #210
Open
drbelt27 wants to merge 13 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds MCP support for discovering, previewing, and reusing media that already exists in the TryPost Asset Library.
The goal is to let MCP clients create content drafts from existing uploaded assets without duplicating media, bypassing workspace boundaries, or inventing a separate asset database.
What Changed
Asset Listing
Asset Preview
Attach Existing Asset
attach_existing_assetMCP flow.Existing External Media Flows
Production/ARM64 Build Support
Why
TryPost already has an Asset Library. MCP clients should be able to use that library directly instead of re-uploading the same images, videos, PDFs, or documents.
This keeps TryPost as the source of truth for media while enabling AI/editorial workflows such as:
Validation
Targeted validation on this asset-only branch:
./vendor/bin/pest tests/Feature/Mcp/ListAssetsToolTest.php tests/Feature/Mcp/GetAssetPreviewToolTest.php tests/Feature/Mcp/AttachExistingAssetToolTest.php tests/Feature/Mcp/AttachMediaFromUrlToolTest.php tests/Feature/Api/PostMediaApiTest.php54 passed,285 assertionsThe combined fork branch was also validated with the full Laravel suite:
./vendor/bin/pest:2664 passed,3 skipped,20372 assertions./vendor/bin/pint --teston touched files: passedgit diff --check: passedRuntime validation was performed on a Raspberry Pi 4 ARM64 self-hosted deployment using the forked image:
/loginreturned HTTP 200 over LAN and public HTTPS reverse proxyNotes
This PR intentionally avoids database migrations for usage tracking.
Usage metadata is derived from existing
posts.mediaand platform publication data. That keeps the implementation schema-free and easier to review upstream, while still giving MCP clients enough information to reason about whether an asset has already been used.