← Back to MCP Documentation

Files MCP API

Binary file storage for AI assistants via Model Context Protocol

Overview

The Files MCP API provides AI assistants with binary file storage capabilities using category/key addressing. Perfect for document management, image storage, and file handling in AI workflows. Files are transferred as base64-encoded content via JSON-RPC 2.0.

MCP Endpoint

https://mcp.ainoflow.io/mcp/v1/files

Transport:

HTTP (SSE)

Configuration

OpenAI Agent Builder

Add MCP server in the UI dialog:

URL:
Label:
Authentication (Access token / API Key):
Claude Desktop

Add to your Claude Desktop configuration:

Cursor IDE

Add to your Cursor MCP configuration:

Supported File Types

Documents

PDF, DOC, DOCX, TXT, RTF

Images

JPEG, PNG, GIF, BMP, TIFF, WebP

Archives & Other

ZIP, RAR, JSON, XML, CSV, any binary

Maximum file size: 100MB. Supports any binary format.

Available Tools

files_list_categories
List all distinct categories with file counts for navigation

Parameters

No parameters required

Example

files_upload
Upload a binary file with category/key addressing. Key is optional - auto-generated UUID if omitted.

Parameters

category
required

Logical grouping/namespace for files

content
required

Base64 encoded file content

key
optional

Unique identifier (auto-generated UUID if omitted)

fileName
optional

Original filename (defaults to key)

contentType
optional

MIME type (defaults to application/octet-stream)

expiresAt
optional

Expiration date (ISO 8601)

expiresMs
optional

TTL in milliseconds from now

Example - With Explicit Key

Example - With Auto-Generated Key

Returns auto-generated key like: a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6

files_get_metadata
Get file metadata without downloading content

Parameters

category
required

Logical grouping/namespace

key
required

Unique identifier

Example

files_get_url
Get pre-signed URL for direct file download (time-limited, no auth required)

Parameters

category
required

Logical grouping/namespace

key
required

Unique identifier

expirySeconds
optional

URL expiration (default: 3600, max: 86400)

Example

files_list
List files in a category with pagination and optional prefix filtering

Parameters

category
required

Logical grouping/namespace

page
optional

Page number (default: 1)

limit
optional

Items per page (default: 50, max: 1000)

prefix
optional

Filter by key prefix

Example

files_delete
Delete a file from storage

Parameters

category
required

Logical grouping/namespace

key
required

Unique identifier

Example

Available Resources

files://{category}/{key}
File content (base64 encoded blob)

Returns: Base64-encoded file content with appropriate MIME type

files://{category}/{key}/meta
File metadata only

Returns: JSON with size, content type, timestamps, version

Limits
Constraints for file storage operations
Maximum file size100MB
Key length200 characters
Category length100 characters
Pre-signed URL expiry1 hour (up to 24 hours)
Total storagePlan-based limit
Quick Example
Category-Specific Endpoint
Optional extension for single-category workflows with dynamic tool names

For focused use cases, use /mcp/v1/files/{category} for simpler tool interface without category parameter in requests.

Benefits:

  • • No category parameter needed in requests
  • • Dynamic tool names: {category}_files_upload
  • • Better isolation for different purposes
  • • Reduced token usage

Example Configuration

Tool names become: documents_files_upload, documents_files_list, etc.

Ready to integrate Files MCP?

Sign up for free and start using binary file storage with your AI agents