Using Walmart Developer Docs MCP to accelerate API integration

Connect your AI-powered coding assistant to Walmart Marketplace APIs using the Model Context Protocol (MCP) server for faster integration development.

Note: The Walmart Developer Docs MCP is currently available to solution > Note: The Walmart Developer Docs MCP is currently available to approved solution providers only, but will soon be available to approved sellers as well.

The Walmart Developer Docs MCP gives your AI-powered coding assistant direct access to Walmart Marketplace API documentation for the US and Global markets. Instead of switching between your coding assistant and the developer portal, you can ask questions, generate code, and debug integration issues — all from within your coding assistant. The source documentation is refreshed daily, ensuring your assistant has access to the latest available documentation.

Note: The market-specific APIs in Canada, Mexico, and Chile will soon be retired. The Global Marketplace APIs support all markets and are the recommended integration path going forward.

What is MCP?

Model Context Protocol (MCP) is an open standard that connects AI assistants to external data sources. When connected to the Walmart Marketplace MCP server, your AI coding assistant can

  • Look up endpoint details, required headers, and request/response schemas
  • Generate working API call examples in your language of choice
  • Help debug authentication errors and validate request payloads against the live schema
  • Walk you through multi-step workflows such as listing items or fulfilling orders

Prerequisites

Before setting up the MCP server, ensure you have:

  1. A supported AI coding assistant — VS Code, Codex, Cursor, or Claude Desktop
  2. An active Marketplace developer or seller account — required to make live API calls

Note: The MCP server provides access to API documentation and schemas. To execute actual API calls, you will still need valid credentials. Refer to the Introduction to Walmart Marketplace APIs for more information.


Connect to Walmart Developer Docs MCP

Install in VS Code

Use either of these two options to install the Walmart Marketplace MCP in your VS Code.

Option A: Workspace-level setup

Add this to your .vscode/mcp.json file in your workspace:

{ "servers": { "walmart-marketplace": { "type": "http", "url": "https://developer.walmart.com/mcp" } }
}

Option B: User-level setup (available in all workspaces)

  1. Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  2. Search for "MCP: Add Server"
  3. Enter the server URL: https://developer.walmart.com/mcp
  4. Name the server: walmart-marketplace

To learn more, refer to the VS Code MCP documentation.


Available MCP tools

The Walmart Marketplace Developer Docs MCP equips your AI assistant with five specialized tools for discovery, schema inspection, and seamless API integration across Walmart's marketplace ecosystem.

ToolPurposeWhat it helps your AI do
list_marketplace_api_specsLists all API specifications for a specified marketDiscover which API sets (e.g., US, Global, Inventory, Orders) are available for your target market.
search_marketplace_apisSearches operations and schemas within a specific API specificationQuickly locate endpoints, objects, and attributes without manual browsing.
list_api_operationsFilters operations by method, tags, or market criteriaNarrow down endpoints relevant to your exact task (e.g., GET methods for orders).
get_operation_specReturns detailed schema for a specific API operationInspect exact parameter requirements, payload schemas, and response formats.
get_auth_requirementsProvides authentication requirements and security schemesRetrieve required auth headers, token endpoints, and signature specifications.

Your AI assistant detects and surfaces these tools automatically once connected. If you are building a custom MCP client or verifying tool availability directly, send a tools/list request with your access token

Security best practice: Use restricted API keys scoped only to the permissions your agent requires. Never embed production credentials in source code — use environment variables or a secrets manager.

The MCP server is compatible with any MCP-capable agent framework, including the OpenAI Responses API and Anthropic Claude.


Authenticate and connect your AI coding assistant

Once you are set up in your AI coding assistant, you will need to authenticate through an external web page.

  • In your AI coding assistant, select the Walmart Marketplace MCP server and select Connect. This will open an external sign-in page in your web browser.

  • Enter your email address and then select the Continue button.

  • Enter your password and then select the Sign In button.

After successfully entering your credentials, the sign-in page will automatically close, and you will be redirected back to your AI coding assistant.

Once you return to your AI coding assistant, verify the MCP server is connected by entering a prompt to ensure you receive a response:

@walmart-marketplace How do I authenticate with the Walmart Marketplace API?


Use case 1: Setting up API authorization

Business scenario

A new seller wants to connect their order management system to Walmart Marketplace to retrieve orders automatically, update inventory and pricing, and ship orders programmatically. Before making any API calls, the seller must authenticate with Walmart's APIs.

Goal

Enable secure API access using Walmart's authentication model so the seller can make successful API calls.

Use case 1: Step-by-step workflow

Read through the step-by-step workflow and use the suggested prompt in each step.

Step 1: Obtain API credentials: Retrieve your Client ID and Client Secret from the Walmart Developer Portal.

Sandbox first: Use your sandbox credentials to test against https://sandbox.walmartapis.com before switching to production. Sandbox credentials are separate from production credentials and are available from the Developer Portal.

Step 2: Generate an access token: Walmart uses OAuth 2.0 client credentials for authentication. Request an access token using your Client ID and Client Secret.

Prompt: Show me how to generate an OAuth access token for the Walmart Marketplace API. Include the token endpoint, required headers, and a sample cURL command.

Token behavior:

  • Access tokens expire after 15 minutes
  • There is no refresh token — request a new token when the current one expires
  • Build token caching into your integration to avoid unnecessary round trips

Step 3: Send an authenticated request and validate your setup

Each API request must include these headers:

HeaderDescription
WM_SEC.ACCESS_TOKENOAuth access token from Step 2
WM_CONSUMER.CHANNEL.TYPEA unique ID to track the consumer request by channel.
WM_QOS.CORRELATION_IDUnique request identifier (UUID) for tracing
WM_SVC.NAMEName of the Walmart service being called
Content-Typeapplication/json
Acceptapplication/json

Prompt: Generate a Python 3 script to request a Walmart Marketplace access token using my Client ID and Client Secret, then call GET /v3/orders with all required headers. Print the response body and handle 401 Unauthorized, 403 Forbidden, and INVALID_TOKEN errors.

If the script returns a valid orders response, your authentication setup is complete.

ErrorCauseFix
401 UnauthorizedInvalid or expired tokenRegenerate access token
403 ForbiddenInsufficient permissionsCheck API key scopes
INVALID_TOKENMalformed token headerVerify header format

Use case 1: Success criteria

  • Access token generated successfully
  • Test API call returns a valid response
  • No authentication errors

Use case 2: Listing a new item for sale

Business scenario

A seller wants to list a new product (for example, a wireless keyboard) and make it buyable on Walmart Marketplace. This requires a sequence of API calls.

Goal

Successfully publish a new, buyable item via API.

Use case 2: Step-by-step workflow

Step 1: Retrieve category requirements: Before listing, determine what attributes are required for your product category.

Prompt: How do I retrieve the required attributes for the Electronics Accessories category before creating an item?

Step 2: Create the item

Prompt: Generate a complete item creation payload for a wireless keyboard in the Electronics Accessories category. Include all required fields.

Step 3: Set the price

Prompt: Show the API call to set the price for SKU WK-123 at $29.99 USD.

Step 4: Update inventory: An item must have available inventory to become buyable.

Prompt: Update inventory for SKU WK-123 with a quantity of 250.

Step 5: Verify publish status

Prompt: How do I check whether SKU WK-123 is published and buyable?

Note: After submitting an item and updating its price and inventory, allow time for the changes to be processed and reflected on Walmart.com. An item may have a PUBLISHED status before it becomes visible and buyable. Verify the item's publication status, active price, and available inventory before troubleshooting.

API call sequence

  1. GET /v3/items/spec -> Retrieve category schema
  2. POST /v3/feeds (items) -> Create item
  3. POST /v3/feeds (price) -> Set price
  4. PUT /v3/inventory -> Update inventory
  5. GET /v3/items/{sku} -> Check publish status

Use case 2: Common errors

ErrorCauseFix
Missing attributesRequired category fields omittedCheck schema from Step 1
Image URL invalidURL not publicly accessible or wrong formatUse HTTPS URLs to hosted images
Price out of rangeBelow minimum or above maximumCheck category price rules
Item not buyableInventory is 0Complete Step 4
GTIN validationInvalid UPC/EAN formatVerify check digit

Use case 2: Success criteria

  • Item status = PUBLISHED
  • Inventory > 0
  • Price is active
  • Item is visible and buyable on Walmart.com

Troubleshooting

VS Code

If attempting to authenticate the MCP server in VS Code and the authentication popup does not display, click Settings and then click the Start server button.


Additional resources


Did this page help you?