Hello November: Singletons, Media Library + MCP server, App SDK TypeGen, and activity feed export

Written by Kelsey Bernius, John Siciliano

There’s probably a function that hides the "add" button on site settings somewhere in your Studio. As of this month, you can delete it. Singleton document types now have first-class support in Sanity (in beta). Other November releases let your agent work in Media Library, extend TypeGen support to App SDK (beta), and send your organization's activity to a bucket you own. Sounds like less chores for us humans, and we are down with that.

Singleton document types are in beta

A singleton is a document type with exactly one instance, like your navigation, site settings, or homepage. Until now, the Studio still offered "add" and "duplicate" on those types, so teams wrote custom code to hide them. If that code broke, or nobody wrote it, an editor could end up with a second copy of your site settings.

Sanity config now has a document property that accepts singleton types. Register your singleton there, and the Studio hides the multi-document UI for it and surfaces the document in the structure builder. If an editor on your team ever accidentally created a second copy of your site settings by accident, they will no more.

If you already maintain custom singleton code, there is a skill that migrates it to the official support.

PortableText [components.type] is missing "sanityVideo"

The Sanity MCP server now works with Media Library

Uploading an image from a URL or fixing a batch of asset titles is routine work that nobody wants to open an app for. If Media Library is enabled in your organization, your agent can now handle it through the Sanity MCP server. Your agent can:

User interface card for publishing an image titled "Spring campaign portrait," displaying a thumbnail of a person in a coat, metadata including editorial license and photographer A. Lindqvist, and "Discard" and "Publish" buttons.

Writes are validated against your library schema and run with the permissions of the signed-in user. The tools do not delete assets or collections, change aspect definitions, or place assets in folders, which limits what a misfiring agent can touch. Read the docs.

App SDK TypeGen is in beta

If you build custom apps on Sanity, you have probably written a type for a query and then rewritten it when the query changed. App SDK TypeGen shipped in beta on Oct. 13 with SDK React 3.9.0 and generates those types for you.

You configure it per dataset in sanity.cli.ts under typegen.resources, and it writes one types file for each dataset. The useDocument, useQuery, and useDocumentProjection hooks infer their types from those files automatically, so you don't pass types to the hooks yourself. It needs Sanity CLI 8.16.0 or later and Sanity SDK React 3.9.1 or later.

TypeGen replaces the experimental TypeGen packages. If you are still on those, this is the one to move to.

Activity Feed Export is generally available on selected Enterprise plans

Enterprise organizations on selected plans can now send activity feed management events to their own Google Cloud Storage bucket. Once Enterprise Support enables it for your organization, an organization admin connects a bucket in Manage under Settings > Activity feed export and grants Storage Object Creator to the service account shown there. After that, Sanity starts a new export at five past every hour, UTC, covering the previous complete hour.

Files arrive as gzipped NDJSON mapped to OCSF 1.9.0, and each batch comes with a manifest that lists event counts and a SHA-256 checksum. The export covers management activity such as membership and role changes, API token lifecycle, security configuration, and project and dataset administration. Document and asset content changes are outside its scope. Your security and compliance teams get an audit trail in a standard schema, in a bucket you own.

Activity Feed Export is separate from log drains. Log drains deliver logs per project, while Activity Feed Export works per organization in Manage. If you are not sure it is enabled for your organization, Enterprise Support can confirm.

Community spotlight

Maciej Trzciński runs a sales pipeline on Sanity. Sales offers are not an obvious content problem. Maciej Trzciński treated them like one and built a system to prepare them in Sanity.

Deals sync in from Pipedrive. AI researches the client and drafts the offer from past projects. An approval step built with Sanity Workflows (in beta now) checks it, and one click sends a branded PDF and email to the client. The pipeline tracks each deal until it is won or lost.

What Maciej did not expect was how easy it is to manage through MCP. As he describes it, the content model is the same one you would use for a website, pointed at a different job.

He has also published a Sanity plugin to npm, a schema visualizer.

Follow Maciej on LinkedIn to see what he builds next.

Psst: Maciej is part of Sanity Pioneers, our community program for practitioners building with AI and Sanity. Pioneers get early access to betas, extra AI credits, and a direct line to the engineering team. Learn more or apply at sanity.io/pioneers.

That’s, it, that’s the post. Join us on Discord to see community projects and new releases as they ship. See you all in December.