addCidToPaymentInstruction
Associate a CID with a payment instruction for x402 monetization
Upload files to Pinata IPFS from the client, organise them into groups with key-value metadata, attach an x402 payment instruction to a CID, and query the vectorized ones by meaning instead of by name.
LABSCO SUMMARY
The payment side is narrower than the storage side: createPaymentInstruction and updatePaymentInstruction state support for USDC with 6 decimals on Base and Base Sepolia only. Semantic search is opt-in per file — queryVectors reaches a group's files after vectorizeFile has run on them, not the whole account. Local uploads are fenced to the directories listAllowedDirectories returns, which is worth checking before pointing uploadFile at a path.
A Pinata account front end covering 35 tools, spanning IPFS uploads and gateway reads, file groups, x402 payment instructions, EIP-712 signatures and vector search.
A Pinata account and a working Pinata JWT — testAuthentication is the call that confirms it. Uploads from the local machine read only the directories that listAllowedDirectories reports, and a payment instruction needs an address to pay to.
One command plus credentials — npx -y pinata-mcp, then supply credentials
USE CASES
Upload it, then issue a link that expires instead of a permanent gateway URL. Public files get the gateway URL from the same call.
Create the payment instruction once, then attach and detach the CIDs it covers as the content changes.
Filename search covers the case where you remember the name. When you only remember what was in it, vectorize the candidates and query the group by meaning.
Issue a signed URL bounded by MIME type, size and expiry so the client uploads directly, then file what arrives into a group.
Attach a signature to the CID and read it back later, so the claim travels with the content rather than with the link.
Pin the existing CID, watch the request until it settles, and cancel it if it stalls or was a mistake.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
addCidToPaymentInstructionAssociate a CID with a payment instruction for x402 monetization
addFileToGroupAdd an existing file to a group in your Pinata account
addSignatureAdd an EIP-712 cryptographic signature to a CID for content verification
cancelPinRequestCancel a pending pin by CID request
createGroupCreate a new group in your Pinata account to organize files
createLinkCreate a direct access link for a file stored on Pinata IPFS. For public files returns a gateway URL, for private files generates a temporary download link.
createPaymentInstructionCreate a new x402 payment instruction for content monetization. Currently supports USDC (6 decimals) on Base/Base Sepolia only.
createPrivateDownloadLinkGenerate a temporary download link for accessing a private IPFS file from Pinata
createSignedUploadUrlCreate a signed URL for client-side file uploads without exposing your API key
deleteFileDelete a file from your Pinata account by its ID
deleteFileVectorsDelete vectors for a file
deleteGroupDelete a group from your Pinata account by its ID
deletePaymentInstructionDelete an x402 payment instruction
deleteSignatureRemove a signature from a CID
fetchFromGatewayFetch content from Public or Private IPFS via Pinata gateway and return it
getFileByIdRetrieve detailed information about a specific file stored on Pinata by its ID
getGroupRetrieve detailed information about a specific group by its ID
getPaymentInstructionRetrieve a specific x402 payment instruction by ID
getSignatureGet signature details for a specific CID
listAllowedDirectoriesList all directories that this MCP server is allowed to access for file operations
listGroupsList groups in your Pinata account with optional filtering by name
listPaymentInstructionCidsList CIDs associated with a payment instruction
listPaymentInstructionsList and filter x402 payment instructions for content monetization
pinByCidPin an existing CID from the IPFS network to your Pinata account
queryPinRequestsQuery the status of pin by CID requests
queryVectorsQuery vectorized files in a group using semantic search
removeCidFromPaymentInstructionRemove a CID association from a payment instruction
removeFileFromGroupRemove a file from a group in your Pinata account
searchFilesSearch for files in your Pinata account by name, CID, or MIME type. Returns a list of files matching the given criteria.
testAuthenticationVerify that your Pinata JWT is valid and working
updateFileUpdate metadata for an existing file on Pinata including name and key-value pairs
updateGroupUpdate metadata for an existing group on Pinata
updatePaymentInstructionUpdate an existing x402 payment instruction. Currently supports USDC (6 decimals) on Base/Base Sepolia only.
uploadFileUpload a file to Pinata IPFS. Provide either a file:// URI or base64-encoded content.
vectorizeFileVectorize a file for AI/semantic search capabilities
BEFORE YOU INSTALL
35 tools when we connected.
Both documented clients run the server on your machine.
CONTEXT COST
Rated by the size of the 35 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx -y pinata-mcp{
"mcpServers": {
"pinata": {
"command": "npx",
"args": [
"pinata-mcp",
"<YOUR_PATH_TO_ALLOWED_DIRECTORY>",
"<YOUR_PATH_TO_ANOTHER_ALLOWED_DIRECTORY>"
],
"env": {
"PINATA_JWT": "<YOUR_JWT>",
"GATEWAY_URL": "example.mypinata.cloud"
}
}
}
}<YOUR_JWT> is your Pinata API key (JWT). example.mypinata.cloud is a sample; yours is your own Pinata gateway domain. The directory arguments are optional: without them the server can only read files in its current working directory, so list every folder uploadFile should read from.
Run this in a terminal. It registers the server for all your projects; use --scope project instead to register it for the current project only.
claude mcp add pinata --scope user --env PINATA_JWT=<YOUR_PINATA_JWT> --env GATEWAY_URL=example.mypinata.cloud -- npx pinata-mcp <YOUR_PATH_TO_ALLOWED_DIRECTORY><YOUR_PINATA_JWT> is your Pinata API key (JWT), and <YOUR_PATH_TO_ALLOWED_DIRECTORY> is a folder uploadFile may read from. example.mypinata.cloud is a sample; yours is your own Pinata gateway domain. The directory is optional: without it the server can only read files in its current working directory.