To build an AI agent with Sanity, connect an MCP-capable application to Sanity Context for scoped, read-only content access, then let your application provide the agent loop and user interface. Start by choosing between live GROQ queries and a pre-indexed Knowledge Base, verify retrieval against a known document, and add writes only through a separate write-capable path with deliberate permissions.
How the agent, Sanity, and MCP fit together
Sanity’s Content Lake stores content as structured documents. Instead of asking an agent to interpret a page dump, you can expose fields such as titles, authors, categories, and body content as addressable data. Sanity describes this structure as queryable and reusable across channels. The Content Lake supports GROQ and GraphQL queries; see Sanity’s Content Lake documentation and its platform overview.
As an Amazon Associate I earn from qualifying purchases.
Sanity Context is the hosted context server in this design. Sanity describes it as a Model Context Protocol (MCP) server that gives agents structured, read-only access to content. It can expose a schema-aware view within the scope you configure, but it does not run the agent loop, generate the conversation behavior, supply your application UI, or write to the dataset. Your MCP-compatible harness or application handles those responsibilities. Read Sanity Context documentation for the service boundary and modes.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problems- Content Lake: stores the documents and schema that provide the source material.
- Sanity Context: makes an appropriately scoped, read-only content view available to an MCP client.
- Your application: runs the model and agent loop, chooses when to call tools, and presents the result to users.
Choose GROQ or Knowledge Base mode
The right mode depends on whether the agent needs live structured records or answers drawn from material collected and indexed in advance. Sanity’s Context overview describes both options; its Context reference covers the GROQ-mode search behavior.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
| Mode | Best fit | How content is accessed | Important consideration |
|---|---|---|---|
| GROQ | Questions about structured records, fields, and current dataset content | Queries the live dataset within the schema and document scope allowed by the MCP configuration | Search options include keyword, semantic, and hybrid search; keyword search uses exact tokens, with no fuzzy matching or stemming, so misspellings may return no result. |
| Knowledge Base | Answers based on material assembled from datasets, websites, and files | Uses knowledge indexed ahead of time | Confirm the indexed material and its freshness suit the task; it is not the same access model as querying the live dataset. |
For GROQ mode, Sanity documents keyword search ranked with BM25, semantic search over dataset embeddings, and hybrid search with selectable boosting. That gives you options for retrieval, not a guarantee that every query will find the intended document. If exact structured fields matter, make the question and retrieval strategy precise; if the answer needs to span a prepared set of sources, consider the Knowledge Base route.
What you need before connecting
Sanity’s Context quick start documents the setup prerequisites. For dataset-backed use, prepare:
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
- A Sanity organization with Context enabled.
- A Sanity project containing the content you want the agent to read.
- A deployed schema for the dataset source. The quick start specifies Studio v5.1.0 or later for schema deployment.
- An MCP-capable application or coding-agent harness that will run the agent loop.
- An endpoint configuration and authentication appropriate to the client and the intended read scope.
Sanity’s quick start describes installing its Context skill and running a guided setup that inspects the project. It also shows a sample using createMCPClient from @ai-sdk/mcp, a Context MCP URL, and an organization token. These are documented setup examples, not a requirement to use that particular harness: the documentation also points to manual configuration. Follow the current quick start for exact endpoint and credential handling rather than guessing values.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Connect the endpoint and verify read access
Keep the first pass read-only. Configure the MCP client in your application using the Context endpoint and credentials that the organization and client support, then ask the agent for a known item from the configured content scope. Sanity’s quick start suggests using the create-agent-with-sanity-context skill with a coding agent to guide setup; it is an optional setup aid, not the agent runtime itself.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
- Confirm the source. Identify a document and field you expect the agent to retrieve, and check that the document belongs to the project and dataset you intend to expose.
- Configure Context. Use the current endpoint and authentication instructions in Sanity’s quick start for your MCP client. Restrict access to the content needed for this use case.
- Ask a narrow test question. Request a known field or a fact explicitly present in the test document. Avoid beginning with a broad question that could be answered from general model knowledge.
- Check grounding. Compare the answer with the source document. If your client exposes tool calls or retrieved content, inspect those too; a plausible response alone does not establish that retrieval succeeded.
- Test a realistic query. Once the known-document check passes, try a representative user question and confirm that the returned content remains within the intended scope.
For a development assistant rather than an application’s runtime agent, Sanity separately documents npx sanity@latest mcp configure and Agent Toolkit skills and plugins. This configures an AI coding workflow; it should not be confused with configuring the runtime Context endpoint used by your own application. See Sanity’s AI tools setup documentation.
Scope access before adding capabilities
Read-only access is a useful first boundary: the agent can retrieve and reason over authorized content without being able to change it. Decide which project, dataset, documents, or other supported scope belongs in the agent’s view, and use credentials whose role and permissions match that scope. Do not assume that a model prompt is an access-control mechanism; enforce access through the configured service and credentials.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
If retrieval fails, check the endpoint URL, the authentication method and token type expected by the client, whether the schema is deployed, and whether the requested content falls inside the configured scope. Those checks correspond to the prerequisites and access model in Sanity’s quick start and Context reference. For keyword search, also check spelling: Sanity documents exact-token matching without fuzzy matching or stemming.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Add content changes only through a write-capable route
Sanity Context is the read-only option; use a separately documented write-capable route if the agent must change content. Two Sanity-documented paths are the hosted Sanity MCP server and the Content Agent API. They have different interfaces and permission models, so choose one deliberately rather than treating Context as if it can write.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Sanity MCP server
Sanity hosts its MCP server at https://mcp.sanity.io. Its documentation says the server follows Anthropic’s official MCP specification and works with MCP-compatible clients. It documents OAuth by default or token authentication, with operations governed by the token’s role and permissions. The available tools include development and editorial operations such as schema exploration, GROQ queries, project tasks, and content or document changes. Review Sanity’s MCP server documentation and grant only the permissions needed for the intended tasks.
Content Agent API
For a custom content agent, Sanity’s Content Agent API offers another path. Its content-agent npm package is a Vercel AI SDK provider with stateful multi-turn .agent() threads and stateless .prompt() calls. The API documentation shows read and write capabilities configured independently and scoped with filters. See Sanity’s Content Agent API documentation.
Sanity lists a deployed schema, an Editor-level or higher project token, an organization ID, Node.js 18 or later, and a Sanity Studio v5.1.0 or later opened at least once after deployment among the API prerequisites. It also states that calls consume AI credits and that read-only queries cost less than write operations; the documentation cited here does not provide a specific price to quote. Treat that consumption and the stronger impact of writes as part of the design: keep read and write capabilities separate where possible, scope filters carefully, and require an appropriate application-level confirmation for consequential changes.
Build a safe first version
A practical first release can answer questions about content without changing it. Begin with a narrowly scoped source, verify retrieval using known documents, and make the application’s tool behavior observable enough to diagnose whether an answer came from retrieved content. Only add a mutation path when the task actually requires it, with a credential and scope designed for that path.
Quick Recap
- Use GROQ mode when the application needs live, schema-backed dataset access; use Knowledge Base mode when the relevant material is prepared and indexed from multiple sources.
- Test a known document before evaluating broad or ambiguous user questions.
- Keep the agent’s content scope and credentials aligned with the users and tasks it serves.
- Use a separately configured write-capable service for mutations, and distinguish the agent’s proposed change from an authorized write.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




