NEWVectors or files. Pick a path.Start →
    Agent Infrastructure
    18 min read
    Updated 2026-10-29

    How to Build MCP Tools for Multimodal AI Agents

    A developer guide to building Model Context Protocol (MCP) servers that give AI agents perception over video, images, audio, and documents. Covers the MCP architecture, tool design patterns, and how to expose multimodal search and retrieval as agent-callable tools.

    Ethan Steininger
    By , Founder & CEO, Mixpeek
    MCP
    AI Agents
    Multimodal
    Tool Use
    RAG

    What Is MCP and Why Does It Matter for Multimodal AI?



    The Model Context Protocol (MCP) is an open standard, originally developed by Anthropic, that defines how AI agents discover and invoke external tools. Think of it as a USB-C port for AI: a single interface that lets any agent connect to any capability without custom integration code.

    Before MCP, giving an agent access to a new data source meant writing bespoke function definitions, managing authentication, handling serialization, and hard-coding the tool into the agent's prompt. Every agent framework (LangChain, CrewAI, AutoGen, OpenAI Assistants) had its own tool format. If you wanted the same capability in three frameworks, you wrote three integrations.

    MCP changes this by defining a standard transport layer (JSON-RPC over stdio or HTTP+SSE), a discovery mechanism (the server advertises its tools and their schemas), and a consistent invocation pattern. An agent asks the MCP server "what can you do?" and gets back a list of tools with typed input/output schemas. The agent then calls whichever tools it needs, and the server returns structured results.

    As of early 2026, the MCP ecosystem has crossed 10,000 public servers and the SDK sees over 90 million monthly downloads across Python and TypeScript. Major AI platforms (Claude, ChatGPT, Cursor, Windsurf, Cline) now natively support MCP tool invocation.

    Why Multimodal MCP Servers Are the Next Frontier



    Most existing MCP servers expose text-based tools: read a file, query a database, call an API, search the web. These are useful, but they leave agents blind to the majority of enterprise data.

    Consider the numbers:

  1. 80-90% of enterprise data is unstructured -- video, images, audio, PDFs, presentations, CAD files.
  2. The unstructured data volume is growing at 49.3% CAGR through 2028 (IDC).
  3. Most AI agents today can only process text. When an agent encounters a video file, an image gallery, or an audio recording, it has no tools to understand what is inside.


  4. A multimodal MCP server bridges this gap. Instead of giving agents a "search text" tool, you give them tools like:

  5. search_video -- Find moments in video by describing what you are looking for in natural language.
  6. analyze_image -- Extract objects, faces, text, and scene descriptions from an image.
  7. transcribe_audio -- Convert speech to text with speaker diarization and timestamps.
  8. classify_content -- Classify any file against a taxonomy (IAB categories, brand safety, custom labels).
  9. detect_brands -- Find logos and brand marks across video frames and images.


  10. When an agent has these tools, it can reason about the real world -- not just text documents.

    MCP Architecture: How Servers and Clients Work



    An MCP deployment has two sides:

    The MCP Server



    The server is a process that:

    1. Advertises capabilities -- On startup, it responds to tools/list requests with a JSON schema describing each tool's name, description, and input parameters. 2. Handles invocations -- When the client calls tools/call with a tool name and arguments, the server executes the logic and returns a result. 3. Manages transport -- Communication happens over stdio (for local servers) or HTTP with Server-Sent Events (for remote servers).

    The MCP Client



    The client is the AI agent or its host application (Claude Desktop, Cursor, a custom agent). It:

    1. Discovers servers -- Reads a configuration file that lists available MCP servers and how to connect to them. 2. Fetches tool lists -- Asks each server what tools it offers. 3. Presents tools to the model -- Includes the tool schemas in the system prompt or tool-use API call. 4. Routes tool calls -- When the model decides to use a tool, the client sends the invocation to the correct server and feeds the result back to the model.

    Transport Options



    TransportBest ForLatencySetup
    stdioLocal tools, IDE integrationsLowestRun as subprocess
    HTTP + SSERemote services, team-shared serversMediumDeploy as web service
    Streamable HTTPHigh-throughput production workloadsMediumDeploy with connection pooling


    For multimodal workloads, HTTP+SSE is typically the right choice because the server needs access to GPU-backed inference services, object storage, and vector databases that run remotely.

    Designing Multimodal MCP Tools



    Good MCP tool design follows the same principles as good API design, but with additional constraints because the "caller" is an LLM, not a human developer.

    Principle 1: Tools Should Be Self-Describing



    The LLM decides when to call your tool based on its name and description. A tool named "search" with description "Search for stuff" will be invoked unpredictably. A tool named "search_video_by_description" with description "Search for specific moments in video files using a natural language description. Returns timestamped segments with confidence scores." will be invoked correctly.

    Write descriptions as if you are explaining the tool to a junior developer who has never seen your codebase.

    Principle 2: Accept Natural Language, Return Structured Data



    Agents think in natural language. Your tool inputs should accept free-text queries where possible. Define an inputSchema with a query string field and optional filters like modalities and max_results. Return structured JSON with results that include file paths, timestamps, confidence scores, and descriptions.

    Principle 3: Scope Tools Narrowly



    One tool per capability. Do not create a single process_media tool that handles search, classification, transcription, and extraction. The LLM cannot reliably choose the right "mode" parameter. Instead, create separate tools:

  11. search_video -- Semantic search across video content
  12. classify_content -- Classify against a taxonomy
  13. extract_metadata -- Pull structured metadata from a file
  14. detect_faces -- Find and identify faces
  15. detect_brands -- Find logos and brand marks


  16. Each tool does one thing well. The agent orchestrates them.

    Principle 4: Include Confidence Scores



    Agents need to know how much to trust a result. Always include confidence scores, match counts, and quality signals in your responses. This lets the agent decide whether to act on a result, ask for clarification, or try a different approach.

    Building a Multimodal MCP Server: Step by Step



    Here is a practical walkthrough of building an MCP server that exposes multimodal search and retrieval capabilities.

    Step 1: Define Your Tools



    Start by listing the capabilities you want to expose. A good starting set for multimodal AI:

    ToolInputOutputUse Case
    searchNatural language query + modality filterRanked results with metadata"Find all frames showing the CEO"
    classifyFile URL or ID + taxonomy nameCategory scores"What IAB categories does this video match?"
    extract_metadataFile URL or IDStructured metadata"What is in this image?"
    list_documentsNamespace + optional filtersDocument list"What files are in the media library?"
    get_documentDocument IDFull document metadata"Get details about this specific asset"


    Step 2: Implement the Server



    Using the MCP Python SDK, create a Server instance and register your tools with the list_tools and call_tool decorators. Each tool should have a clear name, description, and typed inputSchema. The call_tool handler dispatches to your backend functions and returns TextContent with JSON results.

    Step 3: Connect to Your Backend



    The MCP server is a thin wrapper. The heavy lifting -- embedding generation, vector search, model inference -- happens in your backend. Your MCP server calls your existing search and classification APIs using an HTTP client like httpx.

    Step 4: Configure the Client



    For local deployment, add a stdio-based entry to your MCP client configuration (such as Claude Desktop's config.json) with the command to run your server and the required environment variables.

    For remote deployment (HTTP+SSE), point the client at your server URL with appropriate authentication headers.

    Real-World Use Cases



    Media Asset Management



    A media company connects their AI assistant to an MCP server backed by their video archive. Editors ask questions like "Find all shots of the Brooklyn Bridge at sunset from last quarter" and get back timestamped results they can drop into their timeline. The agent searches across visual content, audio transcripts, and metadata simultaneously.

    Brand Safety Monitoring



    An ad tech team deploys an MCP server with brand safety tools. Their monitoring agent periodically scans new content, classifies it against brand safety taxonomies, and fires alerts when risky content is detected adjacent to premium ad placements. The agent can explain its reasoning because it has access to both the classification scores and the source content.

    Compliance Review



    A legal team uses an agent with multimodal MCP tools to review contracts, medical images, and recorded depositions. The agent can search across all three modalities, cross-reference findings, and generate structured compliance reports. Instead of three separate tools, one MCP server provides unified access.

    Customer Support Intelligence



    A support team connects their agent to an MCP server that indexes product photos, tutorial videos, and knowledge base articles. When a customer describes a problem, the agent can search for visually similar product issues, find the relevant tutorial segment, and surface the right knowledge base article -- all through natural language.

    Performance Considerations



    Latency Budget



    MCP tool calls add latency to the agent loop. Each tool invocation is a round trip. For multimodal workloads:

  17. Text search: 50-200ms typical
  18. Image embedding + search: 200-500ms typical
  19. Video scene search: 500ms-2s depending on index size
  20. Classification: 200-800ms depending on model


  21. Design your tools to return results in under 2 seconds. If a tool takes longer, consider returning a job ID and a separate check_status tool, or use streaming to deliver partial results.

    Caching



    Implement caching at the MCP server level:

  22. Cache embedding vectors for recently searched queries.
  23. Cache classification results for recently processed files.
  24. Use semantic similarity to serve cached results for near-duplicate queries.


  25. Batching



    If an agent needs to process multiple files, expose a batch variant of your tools. Processing 10 images one at a time through 10 MCP tool calls is 10x slower than processing them in one batch call.

    Security Best Practices



    Authentication



    Every MCP server should require authentication. For stdio servers, inject the API key via environment variables. For HTTP servers, require bearer tokens. Never expose an unauthenticated MCP server with access to your data.

    Input Validation



    The agent controls what gets sent to your tools. Validate all inputs: file URLs should match expected domains, namespaces should be from an allowlist, query strings should be length-bounded. Treat MCP tool inputs with the same caution as user input in a web application.

    Least Privilege



    Scope your MCP server's access to the minimum required. If the agent only needs to search and read, do not give the MCP server write or delete permissions. Use read-only API keys where possible.

    Connect Mixpeek to your agent, client by client



    Mixpeek runs two hosted MCP servers. Both search the namespaces in your own Mixpeek organization.

    ServerURLHow you sign inTools
    Mixpeek apphttps://mcp.mixpeek.com/app/mcpOAuth: sign in to Mixpeek, pick the organization, approve read access (scope mixpeek:read)9 read-only tools: list_namespaces, list_collections, get_collection, list_documents, get_document, list_retrievers, get_retriever, execute_retriever, search_namespace
    Retrievalhttps://mcp.mixpeek.com/retrieval/mcpAn API key sent as a Bearer tokenSearch your namespaces and run your retrievers


    Use the app server when the client supports MCP sign-in, because no key is stored in a config file. Use the retrieval server when the client takes custom headers.

    You can check the app server from a terminal. An unsigned request is refused with a pointer to the sign-in metadata, which is what an MCP client reads to start the OAuth flow:
    curl -si -X POST https://mcp.mixpeek.com/app/mcp \
      -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
      -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"check","version":"0"}}}' \
      | grep -i '^www-authenticate'
    www-authenticate: Bearer resource_metadata="https://mcp.mixpeek.com/.well-known/oauth-protected-resource/app/mcp", scope="mixpeek:read"

    Cursor



    1. Open or create ~/.cursor/mcp.json (or .cursor/mcp.json in a project) and add the app server:
    {
      "mcpServers": {
        "mixpeek": { "url": "https://mcp.mixpeek.com/app/mcp" }
      }
    }
    2. Cursor reads the sign-in metadata and opens a browser window. Sign in to Mixpeek, pick your organization and approve read access. 3. The server then lists its 9 tools.

    A task to try: ask the agent "Find the moment a rocket lifts off in my Mixpeek videos." It calls list_namespaces and list_retrievers to find what it can search, then execute_retriever with your words as the query, and answers with the clip and its start and end seconds. When we ran this task against a test namespace, the query "rocket launch" returned the TROPICS satellite launch clip first.

    Claude Code



    Add the retrieval server with an API key from Mixpeek Studio:
    claude mcp add --scope user --transport http mixpeek-retrieval \
      https://mcp.mixpeek.com/retrieval/mcp \
      --header "Authorization: Bearer YOUR_API_KEY"
    Run claude mcp list to confirm it connected, then start a session in any project.

    A task to try: "Search my footage for every segment where our logo is on screen, and list each one with its video and start time." The agent runs your retriever with that query and returns segments with timestamps, which it can then group by video or write into a file.

    Other clients



    Any client that connects to remote MCP servers over HTTP and lets you set a header can use the retrieval server with the same URL and Authorization: Bearer YOUR_API_KEY. Sign-in to the app server from Claude Desktop and claude.ai custom connectors is not enabled yet; use Claude Code or Cursor in the meantime.

    No Mixpeek account yet? The agent can sign up



    An agent working without a browser can create its own Mixpeek organization and get a key in one call. Give it the email of the person it works for:
    curl -X POST https://api.mixpeek.com/v1/signup/agent \
      -H 'Content-Type: application/json' \
      -d '{"email":"[email protected]","agent_name":"my-agent","accept_terms":true}'
    The response carries api_key (shown once), a namespace to send as X-Namespace, a bucket, a retriever and next_steps: upload a file to the bucket, then run the retriever on it. The key works at once on a starter allowance of credits. The person at that email gets one message to keep the key or block it, and an unconfirmed key expires 72 hours after signup. Put the key in the retrieval server's Authorization header above and the agent can search what it just uploaded. The agent signup reference lists every field and error.

    Key Takeaways



  26. MCP is the emerging standard for connecting AI agents to external capabilities. Building your multimodal tools as MCP servers makes them accessible to every major AI platform.
  27. Most MCP servers today are text-only. Multimodal MCP servers -- tools that let agents see, hear, and read -- are a significant competitive advantage.
  28. Design tools that accept natural language input and return structured data with confidence scores.
  29. Scope tools narrowly: one tool per capability, not one tool that does everything.
  30. Latency matters in the agent loop. Target sub-2-second response times for all tools.
  31. Secure your MCP server with authentication, input validation, and least-privilege access.


  32. Frequently Asked Questions



    How do I let an AI agent look through my own video library?



    Index the library first, then give the agent a search tool over that index. Indexing cuts each video into timestamped segments and records what is seen, said and written on screen in each one. The agent calls the tool with a plain-language query and gets back segments with start and end times. As Ethan Steininger, Mixpeek's founder, puts it, agents "cannot watch a video, scan a photo for a logo, or search audio by what was said" without a primitive for perceiving it. The search tool is that primitive. With Mixpeek, connect Claude Code to the hosted retrieval server:
    claude mcp add --scope user --transport http mixpeek-retrieval \
      https://mcp.mixpeek.com/retrieval/mcp \
      --header "Authorization: Bearer YOUR_API_KEY"

    Can Claude or ChatGPT watch the videos in my library directly?



    Only a few at a time. Models that accept video sample frames into the context window. Gemini's docs, for example, sample at 1 frame per second, which comes to about 100 tokens per second of video at low resolution, so a 1M-token context holds about 3 hours of footage. A library of thousands of hours will not fit, and the model would re-read every frame on every question. An index reads each video once and lets the agent pull only the moments that match.

    What does an MCP tool for video search return to the agent?



    Return structured results the agent can reason over and cite: the video id, start and end seconds, a relevance score, and the evidence that matched, such as a transcript line or detected on-screen text. Keep the payload small. Ten results with timestamps and short evidence give the agent enough to answer or to ask a follow-up, and they fit easily in context.
    {"results": [{"video_id": "vid_123", "start": 64.0, "end": 71.5, "score": 0.83,
      "evidence": {"transcript": "the new pricing goes live on Monday"}}]}

    Do I have to upload my videos somewhere for an agent to search them?



    No. Mixpeek reads your files where they already live, in S3, GCS or any bucket, and turns what's in them into data your software can search, classify and moderate. You connect the bucket, Mixpeek processes the files, and the agent searches the results through the MCP tool. The source videos stay in your storage.

    How do I connect Claude to Mixpeek's video search with MCP?



    Use the hosted server at https://mcp.mixpeek.com/retrieval/mcp with your API key as a Bearer token, as in the command above. Its tools search your namespace and run your retrievers. To give an agent exactly one search, install the per-retriever server with pip install mixpeek-mcp-retriever. It exposes three tools: search runs the retriever, describe returns its input fields and stages, and explain walks through what each stage does. Setup for Cursor, Claude Code and other clients is in the section above on connecting Mixpeek to your agent, client by client.

    Related Resources



  33. Model Context Protocol -- glossary entry explaining the standard
  34. Multimodal Embeddings -- how vector representations enable cross-modal search
  35. Context Engineering -- the discipline of building the right context for AI systems
  36. Multimodal RAG -- retrieval-augmented generation across modalities
  37. Documentation -- getting started with Mixpeek
  38. Managed Mixpeek

    Put multimodal search to work

    Connect a bucket and Mixpeek runs the whole multimodal search pipeline for you: extraction, indexing, and search over your own objects. No models to wire up, nothing to host.

    Start with Managed
    MVS · bring your own

    Already have vectors?

    Keep your embeddings on your own cloud and run dense, sparse, and BM25 search directly on object storage. From $25/mo.

    Start with MVS

    Give your agent something to search

    Run a hosted retriever with no account, or let your agent sign up and search its own files through the Mixpeek MCP server.

    Try a hosted retrieverAgent signup