This release is a pre-release and may not be stable for production use.
Walmart Marketplace APIs
MCP server for Walmart Marketplace APIs — items, orders, inventory, prices, promotions, feeds, reports, returns, fulfillment, and more.
Exposes spec-driven discovery (list_endpoints, describe_endpoint), a generic API proxy (call_endpoint), feed upload and file download helpers, and a runtime spec refresher (refresh_specs). The AI agent discovers endpoints from bundled OpenAPI specs then calls them; the server handles OAuth2 token acquisition, refresh, and Walmart's required headers automatically. Base addresses are hardcoded per environment, so the config file carries nothing but credentials.
Features
- Spec-driven discovery — 28 bundled OpenAPI specs covering 234 operations, refreshable at runtime
- Any endpoint — call by operation id or raw method+path; no code changes when APIs evolve
- Automatic OAuth2 — tokens fetched, cached per credential, refreshed before expiry, retried once on 401. The client secret never leaves token acquisition
- Multi-advertiser — many seller credentials per region and environment, selected per call
- Multi-region, multi-environment — production and sandbox
- Required Walmart headers (
WM_SEC.ACCESS_TOKEN,WM_SVC.NAME,WM_QOS.CORRELATION_ID,WM_MARKET,WM_GLOBAL_VERSION,WM_SANDBOX,WM_PARTNER_ID) injected server-side and hidden from the agent - Large responses truncated with full data available via MCP resource URI
Requirements
- Python 3.13+
- Walmart Marketplace client ID and client secret per seller (Developer Portal)
Quick start
Set up your config (see Configuration), then run the server:
# Run directly with uvx (no clone needed)
npx -y @modelcontextprotocol/inspector uvx mcp-walmart-marketplace
# Or run from source
git clone https://github.com/alyiox/mcp-walmart-marketplace.git
cd mcp-walmart-marketplace
uv sync
npx -y @modelcontextprotocol/inspector uv run mcp-walmart-marketplace
Configuration
The config file lives under your home directory at ~/.config/mcp-walmart-marketplace/config.json.
Windows note:
~maps to%USERPROFILE%, so the full path is%USERPROFILE%\.config\mcp-walmart-marketplace\config.json.
1. Create the config directory and copy the example
mkdir -p ~/.config/mcp-walmart-marketplace
cp config.example.json ~/.config/mcp-walmart-marketplace/config.json
2. Edit ~/.config/mcp-walmart-marketplace/config.json
{
"response_cache_ttl": 3600,
"truncate_threshold": 1024,
"regions": {
"primary": {
"production": {
"credentials": [
{
"client_id": "11111111-2222-3333-4444-555555555555",
"client_secret": "acme-client-secret-goes-here",
"advertisers": [
{ "id": 1000001, "partner_id": "10000000001" },
{ "id": 1000002 }
]
}
]
},
"sandbox": {
"credentials": [
{
"client_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"client_secret": "acme-sandbox-client-secret-goes-here",
"advertisers": [{ "id": 1000001 }]
}
]
}
}
}
}
| Config field | Description |
|---|---|
response_cache_ttl |
Seconds to keep truncated responses in memory (default 3600) |
truncate_threshold |
Response byte limit before truncation (default 1024) |
regions.<R> |
Region label — case-insensitive, free-form. Groups advertisers; it does not change which host is called |
regions.<R>.<E> |
Environment — exactly production or sandbox |
…<E>.credentials[] |
One entry per Walmart client credential |
…credentials[].client_id |
Walmart client ID (UUID) |
…credentials[].client_secret |
Walmart client secret, as plain text |
…credentials[].advertisers |
Sellers this credential serves, each {"id": …} with an optional "partner_id" |
Keep the config file readable only by you — it holds client secrets in plain text.
Everything else is fixed by the server: base URLs (marketplace.walmartapis.com for production, sandbox.walmartapis.com for sandbox), WM_SVC.NAME, the client_credentials grant, and the per-operation WM_MARKET / WM_SANDBOX header values.
Regions
A region is a namespace, not a route. Base addresses are fixed by the server per environment, so every region reaches the same Walmart hosts. The level exists so advertiser ids only have to be unique within one region — the same id under two regions can mean different sellers with different credentials.
Partner IDs
Add partner_id to a seller that has a Walmart Partner ID:
"advertisers": [
{ "id": 1000001, "partner_id": "10000000001" },
{ "id": 1000002 }
]
Two payments operations — payments:getTaxForms and payments:downloadTaxForm — require it as the WM_PARTNER_ID header. Calling one for a seller configured without a partner id fails with a message telling you to add it, rather than a Walmart 400. Every other operation ignores it, so most entries are just {"id": …}.
Advertisers
advertiser_id is required on every tool that reaches the network; there is no default. Read the wmm://config resource to discover which advertiser ids are configured. It reports region, environment, and advertiser ids only — never client ids or secrets.
Tools
| Tool | Purpose |
|---|---|
list_endpoints |
List operations across the bundled specs, filtered by query, domain, tag, or method |
describe_endpoint |
One operation plus its schema closure, with server-managed headers stripped |
call_endpoint |
Execute any operation by id or raw method+path |
upload_feed |
Upload a feed file (multipart) for a feed type |
download_file |
Download a report, label, or other binary to a local path |
refresh_specs |
Re-pull specs from the ReadMe api-registry into the user cache |
Resources
| URI | Contents |
|---|---|
wmm://config |
Configured regions, environments, and advertiser ids |
wmm://responses/{request_id} |
Full body of a truncated response |
wmm://curl/{request_id} |
Equivalent cURL command for a previous request |
MCP host examples
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"walmart-marketplace": {
"command": "uvx",
"args": ["mcp-walmart-marketplace"]
}
}
}
Claude Code
Add to your Claude Code MCP config:
{
"mcpServers": {
"walmart-marketplace": {
"command": "uvx",
"args": ["mcp-walmart-marketplace"]
}
}
}
Codex
[mcp_servers.walmart-marketplace]
command = "uvx"
args = ["mcp-walmart-marketplace"]
OpenCode
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"walmart-marketplace": {
"type": "local",
"enabled": true,
"command": ["uvx", "mcp-walmart-marketplace"]
}
}
}
GitHub Copilot
{
"inputs": [],
"servers": {
"walmart-marketplace": {
"type": "stdio",
"command": "uvx",
"args": ["mcp-walmart-marketplace"]
}
}
}
Specs
The 28 bundled specs come from the ReadMe api-registry that backs
developer.walmart.com. They load from the user cache dir first
(~/.cache/mcp-walmart-marketplace/specs/) and fall back to the copy shipped in
the wheel, so refresh_specs takes effect immediately without a reinstall.
The files on disk are stored verbatim as the registry served them, so the bundle is the source of truth and a refresh diff shows exactly what Walmart changed. Reduction happens on load, which keeps it a runtime policy rather than something baked into the files:
- Oversized examples are dropped. There are 3,514 inline
examplepayloads totalling 4.13 MB, but the median is 16 bytes and two/v3/items/taxonomypayloads account for 3.25 MB. Everything at or underMAX_EXAMPLE_BYTES(1 KB) survives — 97% of them, for ~133 KB — so format hints for dates, skus, and identifiers stay available while the monsters never reach an agent. x-readmeis removed — docs-platform rendering metadata, not API detail.
Cost of loading all 28 specs is ~80 ms once per process; results are cached per
spec and invalidated by file mtime, so a refresh_specs takes effect
immediately. describe_endpoint output is 5.1 KB at the median and 88 KB at the
worst (six order-management operations inline very large response schemas).
To rebuild the bundled copies:
uv run python scripts/fetch_specs.py # all
uv run python scripts/fetch_specs.py order-management
Caveats
The specs and the API disagree about authentication. 76 operations declare a Basic Authorization header built from the client id and secret, and fulfillment-management and insights-management appear to require it instead of an access token. Probed against production, that is wrong: Basic alone returns 401, the access token alone returns 200, on every service tested. This server therefore sends WM_SEC.ACCESS_TOKEN on every request and never sends the client secret anywhere except /v3/token. If you diff its behavior against the reference docs, that gap is deliberate.
WM_SVC.NAME cannot be read from the specs. 103 operations declare the literal placeholder string "Walmart Service Name" and only 100 the real value, so it is fixed at Walmart Marketplace, which live calls confirm.
Not every documented endpoint is reachable with seller credentials. GET /v3/utilities/apiStatus returns HTTP 520 Unable to route request, naming wm_svc.name: PARTNERMANAGEMENTSERVICES and wm_svc.env: prod as the expected headers — but sending exactly those still returns 520. It appears to belong to a service that 3P credentials cannot reach, and the error message is a red herring. Expect a handful of similar cases across 234 operations.
Report endpoints negotiate content strictly. They reject Accept: */* with a 406 listing what they can produce, so Accept is derived from the media types the operation declares for its success responses (preferring application/json when offered). If you add an endpoint whose spec declares no response content, it falls back to */* and may 406.
Live coverage is thin. Seven operations across five domains have returned 200 against production — feed-management, advertising, fulfillment-management, insights-management, settings-management — including two report downloads that arrive as real Excel workbooks. The other ~227 are wired from the specs and have never been called. Discovery and request construction are covered by tests; upstream behavior is not.
Two known upstream failures, neither a client bug: fulfillment-management:getInventoryHealthReport answers 520 WFS_INTERNAL_SERVER_ERROR, and feed-management:getFeedErrorReport answers 404 for a feed that processed cleanly.
Sandbox is unverified. Walmart issues sandbox credentials separately from production, and nothing here has run against sandbox.walmartapis.com. The WM_SANDBOX: v2 handling — which opts into the dynamic sandbox and changes response semantics rather than just routing — is implemented from the specs, not observed.
upload_feed is untested end to end. It is exercised by unit tests against a scripted transport only — the sole way to verify it live is to submit a real feed, which mutates a live catalog. download_file has been verified against production.
The cross-host redirect path is unexercised. download_file sheds credentials when a redirect leaves Walmart's host, which matters if a report is ever served from signed storage. Every download observed so far returned its bytes directly, in one hop, so that branch has only unit-test coverage.
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_walmart_marketplace-0.1.0a1.tar.gz.
File metadata
- Download URL: mcp_walmart_marketplace-0.1.0a1.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
675d1224932532fdd5edb5b55190cb7484c2f919c181ce7b7d14d4db8dc4a6f5
|
|
| MD5 |
2b01acb7af0484b50f4ff7f8ca254ad6
|
|
| BLAKE2b-256 |
b11ac9d2b3b281a6731e7f1c6b1f3481425063a19a3f49aa4332c8ee67e357c7
|
Provenance
The following attestation bundles were made for mcp_walmart_marketplace-0.1.0a1.tar.gz:
Publisher:
ci.yml on alyiox/mcp-walmart-marketplace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_walmart_marketplace-0.1.0a1.tar.gz -
Subject digest:
675d1224932532fdd5edb5b55190cb7484c2f919c181ce7b7d14d4db8dc4a6f5 - Sigstore transparency entry: 2542076900
- Sigstore integration time:
-
Permalink:
alyiox/mcp-walmart-marketplace@8d5a476647d7d0148c58aca9dd55e8345142130b -
Branch / Tag:
refs/tags/0.1.0a1 - Owner: https://github.com/alyiox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@8d5a476647d7d0148c58aca9dd55e8345142130b -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcp_walmart_marketplace-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: mcp_walmart_marketplace-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06d5e0488cff10a87691e8ba10dc2d9307d900064d1150db7d2436de747e70ca
|
|
| MD5 |
0ded4297ff773bbc4c207acb4e103435
|
|
| BLAKE2b-256 |
1e1b4346a19d7e11c4fd5f05a80260d3691098ada058179bea55f8fcfddf1c87
|
Provenance
The following attestation bundles were made for mcp_walmart_marketplace-0.1.0a1-py3-none-any.whl:
Publisher:
ci.yml on alyiox/mcp-walmart-marketplace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_walmart_marketplace-0.1.0a1-py3-none-any.whl -
Subject digest:
06d5e0488cff10a87691e8ba10dc2d9307d900064d1150db7d2436de747e70ca - Sigstore transparency entry: 2542077686
- Sigstore integration time:
-
Permalink:
alyiox/mcp-walmart-marketplace@8d5a476647d7d0148c58aca9dd55e8345142130b -
Branch / Tag:
refs/tags/0.1.0a1 - Owner: https://github.com/alyiox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@8d5a476647d7d0148c58aca9dd55e8345142130b -
Trigger Event:
push
-
Statement type: