A Model Context Protocol (MCP) server that provides seamless integration with eBay's APIs through AI assistants and development tools.
This MCP server enables AI assistants (Claude Desktop, Cursor, Cline, VS Code extensions, etc.) to interact with eBay's comprehensive API ecosystem. It provides tools for API document retrieval, endpoint discovery, and direct API invocation, making it easy to integrate eBay marketplace functionality into AI-powered workflows.
- API Discovery: Automatically discover and explore eBay API endpoints
- Dynamic Tool Generation: Generate tools based on OpenAPI specifications
- Multi-Environment Support: Works with both sandbox and production environments
- Comprehensive API Coverage: Supports eBay's full API ecosystem
- Type-Safe Operations: Built with TypeScript for robust API interactions
- MCP Integration: Compatible with popular MCP hosts and AI assistants
- Node.js: Version 22 or higher
- eBay Developer Account: Required for API access tokens
- MCP Host: Claude Desktop, Cursor, Cline, or other MCP-compatible application
git clone <repository-url>
cd ebay-api-mcp-server-node-local
npm installnpm run build
# or
yarn buildSet the following environment variables:
EBAY_CLIENT_TOKEN: Your eBay API access token (required)EBAY_API_ENV: API environment - "sandbox" or "production" (default: "production")
curl -v https://api.ebay.com/identity/v1/oauth2/token \
-H "Accept: application/json" \
-H "Accept-Language: en_US" \
-u "CLIENT_ID:CLIENT_SECRET" \
-d "grant_type=client_credentials"For sandbox testing, use https://api.sandbox.ebay.com/identity/v1/oauth2/token
- Create a POST request to
https://api.ebay.com/identity/v1/oauth2/token - Set Authorization to Basic Auth with your Client ID and Client Secret
- Add form data:
grant_type=client_credentials - Send the request
Response format:
{
"access_token": "your_access_token_here",
"expires_in": 7200,
"token_type": "Application Access Token"
}npm start
# or
yarn startEBAY_CLIENT_TOKEN='your_token_here' EBAY_API_ENV='production' npm startYou can also run the server using npx in several ways:
Option 1: Run the built server directly
# First build the project
npm run build
# Then run with npx
npx node dist/index.jsOption 2: Run with environment variables
# Build first
npm run build
# Run with environment variables
EBAY_CLIENT_TOKEN='your_token_here' EBAY_API_ENV='production' npx node dist/index.jsOption 3: Use npx to run npm scripts
npx npm run build
npx npm startOption 4: Run TypeScript directly (if you have ts-node)
npx ts-node src/index.ts- Create a
.vscodefolder in your project root - Create
mcp.jsonwith the following configuration:
{
"servers": {
"ebay-api-mcp-server": {
"type": "stdio",
"command": "node",
"args": ["./dist/index.js"],
"env": {
"EBAY_API_ENV": "production",
"EBAY_CLIENT_TOKEN": "YOUR_ACCESS_TOKEN"
}
}
}
}Add to your Claude Desktop MCP configuration:
{
"mcpServers": {
"ebay-api": {
"command": "node",
"args": ["/path/to/ebay-api-mcp-server/dist/index.js"],
"env": {
"EBAY_CLIENT_TOKEN": "YOUR_ACCESS_TOKEN",
"EBAY_API_ENV": "production"
}
}
}
}Configure in your Cursor MCP settings with similar JSON structure as above.
Once configured, you can ask your AI assistant to:
- "Find an API for marketplace account deletion notifications"
- "Search for product listing APIs"
- "Get documentation for the Trading API"
- "Invoke the getBuyerRequirements endpoint"
Authentication Errors
- Verify your
EBAY_CLIENT_TOKENis valid and not expired - Ensure you're using the correct environment (sandbox vs production)
- Check that your eBay developer account has the necessary permissions
MCP Connection Issues
- Verify the path to
dist/index.jsin your MCP configuration - Ensure Node.js is in your system PATH
- Check that the server builds successfully with
npm run build
API Errors
- Review eBay API documentation for endpoint-specific requirements
- Verify your token has the necessary scopes for the APIs you're trying to access
- Check rate limiting and usage quotas
For issues related to:
- eBay API: Consult the eBay Developer Documentation
- MCP Protocol: Visit the Model Context Protocol documentation
- This Server: Open an issue in this repository