Quick Start: Metadata API Context MCP Tools

The Metadata API Context MCP tools provide contextual information about Salesforce metadata types to help generate accurate Salesforce metadata files when working with the Metadata API.

Required Editions
Available in: Professional, Enterprise, Unlimited, Developer, sandbox, and scratch orgs that have API enabled.

Metadata API Context MCP Tools are a beta service that is subject to the Beta Services Terms at Agreements - Salesforce.com or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the Product Terms Directory. Use of this beta service is at the Customer’s sole discretion.

Note

For a given metadata type, these tools give you:

  • complete field definitions
  • valid values
  • constraints
  • examples

They’re a useful resource for creating valid Salesforce metadata XML files when you need to generate them programmatically, or want to ensure accuracy.

Server NameTool NameTool Description
platform/salesforce-api-contextget_metadata_type_sectionsReturns valid context sections available for a metadata type.
platform/salesforce-api-contextget_metadata_type_contextReturns metadata context for the requested metadata type sections.
platform/salesforce-api-contextget_metadata_type_fieldsReturns field names and field-column metadata for a metadata type.
platform/salesforce-api-contextget_metadata_type_fields_propertiesReturns field properties for the specified field.
platform/salesforce-api-contextsearch_metadata_typesSearches metadata type names for a provided string and returns a list of matching metadata types.

These MCP tools are part of the Salesforce API Context MCP Server, which is hosted in Salesforce.

With this feature, you might make API calls to your org. API usage counts against your org’s API quota.

  • Prerequisites: Set Up Salesforce Hosted MCP Servers

    The Salesforce API Context MCP server is one of many Salesforce Hosted MCP Servers. To use the Salesforce API Context MCP server, you must first set up the Salesforce Hosted MCP Server.

  • Step 1: Configure an MCP Client

    Configure a client to connect to MCP servers hosted in your Salesforce org. In this quick start guide, we provide guidance on how to configure Agentforce Vibes, Cursor, and Claude.

  • Step 2: Test Your Connection to the MCP Server

    Use simple prompts to test your client’s connection to the Salesforce API Context MCP server you configured.

  • Step 3 (Optional): Configure a Rule

    ​​To help the MCP server function optimally, you can create a rule that guides your AI assistant, such as Agentforce Vibes or Cursor Agent, to call the Metadata API Context MCP tools. An AI rule is a plain-text file like markdown that provides specific instructions, context, or constraints to your AI assistant.