Sanity CMS Logo

Sanity CMS

Official

Integrates with Sanity CMS to enable direct content creation, querying, and management through speci...

112 views
0 installs
Updated Sep 9, 2025
Not audited
Integrates with Sanity CMS to enable direct content creation, querying, and management through specialized tools for documents, datasets, schemas, releases, and embeddings
  1. Log in to Your Sanity.io Project

  2. Select the Relevant Project

    • From your Sanity dashboard, select the project you want to connect to the MCP server.
  3. Find Your Project ID

    • In the project overview or under project settings, locate your Project ID and copy it.
  4. Get the Dataset Name

    • Go to your project's datasets (often found in the main dashboard or under "Datasets").
    • Identify the dataset you wish to use (commonly named production, but could be different).
    • Copy the dataset name.
  5. Generate an API Token

    • In your Sanity project dashboard, go to SettingsAPITokens.
    • Click "Add new token".
    • Create a new token for MCP server usage.
    • Choose appropriate permissions:
      • For read-only usage: Select the viewer role.
      • For editing content: Select editor or developer.
    • Important: Copy and store the token securely when it is shown—it will only be shown once!
  6. Determine Your User Role

    • Decide on the user role for the MCP server:
      • Use developer for full access to all MCP tools.
      • Use editor for content management only.
  7. Fill in the FastMCP Connection Interface

    • Click your "Install Now" button for adding ENVs in your FastMCP interface.
    • Enter the following values:
      • SANITY_PROJECT_ID: (Paste your copied Project ID)
      • SANITY_DATASET: (Paste your dataset name)
      • SANITY_API_TOKEN: (Paste the API token you just generated)
      • MCP_USER_ROLE: (Enter either developer or editor as chosen in the previous step)
  8. Save and Continue

    • Save the connection. Your MCP server can now interact with your Sanity content!

Security Tip: Use different API tokens for development and production environments, never share or commit your token, and periodically rotate your token for maximum security.

Quick Start

View on GitHub

More for Content Management

View All →

More for Developer Tools

View All →

Report Issue

Thank you! Your issue report has been submitted successfully.