Skip to content

MCP Server

The MediaLocker MCP (Model Context Protocol) server lets AI agents and MCP-compatible clients work with your media — search and list objects, generate presigned URLs, manage tags and sets, and read usage — using the same organization-scoped credentials as the REST API.

  • Base URL: https://mcp.medialocker.io
  • Endpoint: /mcp (Streamable HTTP transport, JSON-RPC, session-aware)

How it's built

The server is a Fastify application wrapping the MCP SDK. Every request flows through a multi-tenant gateway before a tool runs:

auth → request-scope → rate-limit → allowlist → audit → transport → tool
StageResponsibility
authResolve the bearer token to an organization + scopes (see Authentication)
request-scopeBind the resolved tenant to the request
rate-limitPer-tenant token bucket (see Rate Limits)
allowlistEnforce the per-credential set of permitted tools
auditRecord tool invocations
transportStreamable-HTTP JSON-RPC dispatch into the tool registry

On top of the gateway, destructive tools (delete_object, delete_bucket, purge) pass through an additional tool-use firewall — policy checks, argument validation, and audit — before their handler executes.

Next steps

Released under the AGPL-3.0 License.