Skip to content

Add Amazon SP-API MCP Server #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 13, 2025
Merged

Add Amazon SP-API MCP Server #139

merged 7 commits into from
Aug 13, 2025

Conversation

hichenai
Copy link
Contributor

@hichenai hichenai commented Aug 5, 2025

This PR introduces a comprehensive Model Context Protocol (MCP) server that enables natural language interaction with Amazon's Selling Partner API through MCP clients.

The Amazon SP-API MCP Server covers 324 endpoints across 50 categories.

This includes comprehensive coverage of all major SP-API functionality areas:

Major categories with highest endpoint counts:

  • FBA inbound operations: 45 endpoints
  • Amazon Shipping API: 20 endpoints
  • Direct Fulfillment Shipping: 20 endpoints
  • Services: 17 endpoints
  • Selling Partner APIs for Fulfillment Outbound: 14 endpoints
  • Messaging: 13 endpoints
  • Amazon Seller Wallet Open Banking API: 12 endpoints

Key functional areas covered:

  • Order management (10 endpoints)
  • Inventory management (4 endpoints)
  • Pricing (8 endpoints)
  • Reports (9 endpoints)
  • Feeds (6 endpoints)
  • Finances (5 endpoints)
  • Notifications (8 endpoints)
  • And many more specialized APIs

Summary

  • New Feature: Complete SP-API MCP server implementation with 11,459+ lines of code
  • Architecture: Modular TypeScript design with authentication, catalog management, and API execution tools
  • Integration: Ready-to-use with Claude Desktop and other MCP-compatible clients

Key Features

  • Natural Language API Exploration: Discover SP-API endpoints through conversational queries
  • Intelligent Request Execution: Authenticated SP-API calls with automatic parameter validation
  • Smart Response Processing: Human-readable responses with insights and recommendations
  • Real-time Authentication: Automatic OAuth2 token management and request signing
  • Comprehensive Catalog: Built-in knowledge of all SP-API endpoints

Components Added

  • Core Server (src/index.ts): Main MCP server with stdio transport
  • Authentication (src/auth/): OAuth2 token management and request signing
  • API Catalog (src/catalog/): OpenAPI/Swagger processing and endpoint discovery
  • Tools (src/tools/): API execution and catalog exploration tools
  • Type System (src/types/): Comprehensive TypeScript definitions
  • Testing (tests/): Test suite with drill-down functionality

Configuration

  • Environment-based configuration for SP-API credentials
  • Configurable response token limits and logging levels
  • Ready-to-use setup instructions for Claude Desktop integration

Files Added

  • 24 new files including source code, configuration, tests, and documentation
  • Complete package.json with dependencies and development tools
  • TypeScript configuration and Jest testing setup

jcjiacheng
jcjiacheng previously approved these changes Aug 6, 2025
Copy link
Contributor

@jcjiacheng jcjiacheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@leonardonakagawa leonardonakagawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be clear that the customer needs to download the swagger files from models repo and place it into a folder.

Altoguh, after doing this and the server running locally. Claude is not being able to find the swagger folder and files.

…t clarification

- Add clear instructions for downloading and setting up SP-API model files
- Clarify prerequisite about downloading swagger files from models repository
- Update configuration section to clarify environment variable methods
- Specify that MCP server uses stdio transport for communication

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@hichenai
Copy link
Contributor Author

I think we should be clear that the customer needs to download the swagger files from models repo and place it into a folder.

Altoguh, after doing this and the server running locally. Claude is not being able to find the swagger folder and files.

Thanks @leonardonakagawa. The PR has been updated

@hichenai hichenai requested a review from jcjiacheng August 13, 2025 08:47
Copy link
Contributor

@jcjiacheng jcjiacheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@hichenai hichenai merged commit 69d0e49 into amzn:main Aug 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants