- eBay Developer account
- Client ID and Client Secret from eBay Developer Portal
What Are Client Credentials?
Client credentials (also called “application-level authentication”) use only your eBay App ID and Cert ID to authenticate API requests.Quick Setup
.envAutomatic Authentication
Lower Rate Limits
Limited Access
When to Use Client Credentials
- ✅ Good For
- ❌ Not Recommended For
- 🔄 Upgrade Path
- Getting started - Quickest way to try the MCP server
- Development - Test and learn the APIs
- Testing - Validate your workflows
- Low-volume usage - Occasional API exploration
- Public data - Accessing non-user-specific information
- Setup in minutes
- No browser authorization needed
- Simple configuration
- Perfect for learning
Quick Setup Guide
Step 1: Get Your Credentials
Sign in to eBay Developer Portal
Navigate to Application Keys
- Click My Account in the top right
- Select Application Keys from the dropdown
Create or Select Application
- Click Create an Application Key
- Choose Sandbox environment (for testing)
- Fill in application details
- Click Create
- Select your existing application
- Choose Sandbox or Production tab
Copy Your Credentials
- App ID (Client ID):
YourAppName-YourApp-SBX-1234abcd-567890ab - Cert ID (Client Secret):
SBX-1234abcd-5678-90ab-cdef-1234
- App ID (Client ID):
YourAppName-YourApp-PRD-1234abcd-567890ab - Cert ID (Client Secret):
PRD-1234abcd-5678-90ab-cdef-1234
Step 2: Configure the MCP Server
- Using Environment Variables
- Using MCP Client Config
- Using Docker
.env file in the project root:Step 3: Verify Setup
Validate Configuration
Start the Server
Test API Access
“What eBay marketplaces are available?”This calls a public endpoint that works with client credentials.
How Client Credentials Work
Understanding the authentication flow:Server Startup
- Loads
EBAY_CLIENT_IDandEBAY_CLIENT_SECRETfrom environment - Checks for user tokens (none found for client credentials mode)
- Enters client credentials mode
Obtain Application Token
Receive Token
Use Token for API Calls
Automatic Renewal
- Server automatically requests a new token
- Uses refreshed token for subsequent calls
- No manual intervention needed
Available Operations
What Works with Client Credentials
Public Endpoints
Public Endpoints
- Get marketplace information
- View eBay policies (generic)
- Access public metadata
- Query eBay programs
- Get location details
getEbayMarketplacesgetReturnPolicyTypesgetPaymentPolicyCategories
What Doesn’t Work
User-Specific Data
User-Specific Data
- User’s inventory items
- Seller’s orders
- Personal analytics
- Account-specific settings
Seller Operations
Seller Operations
- Create/update listings
- Manage offers
- Process orders
- Handle returns
- Update inventory
Marketing & Promotions
Marketing & Promotions
- Create campaigns
- Manage promotions
- View campaign analytics
- Optimize promoted listings
Rate Limits
Daily Limit
Fixed at 1,000 requests per day for all client credentials, regardless of account type. What this means:- ~42 requests per hour
- ~0.7 requests per minute
- Resets daily at UTC midnight
Managing Rate Limits
- Monitor Usage
- Optimize Usage
- Upgrade When Needed
-
In eBay Developer Portal:
- View Application Keys → Analytics
- See real-time request counts
- Monitor daily/monthly trends
-
In Server Logs:
Logs show each API call:
-
Via Rate Limit Headers:
eBay includes rate limit info in responses:
Troubleshooting
Authentication Fails on Startup
Authentication Fails on Startup
- Incorrect Client ID or Secret
- Wrong environment (Sandbox vs Production mismatch)
- Typos or extra spaces in
.env
- Verify credentials in eBay Developer Portal
- Check
EBAY_ENVIRONMENTmatches credential type - Remove quotes and extra spaces from
.envvalues:
Rate Limit Exceeded
Rate Limit Exceeded
- Wait until UTC midnight for reset
- Upgrade to user tokens for higher limits:
- Implement request caching
- Optimize API call patterns
- Use batch operations
- Consider user tokens for production
Some Tools Don't Work
Some Tools Don't Work
- Inventory management
- Order fulfillment
- Marketing/promotions
- Seller analytics
Upgrading to User Tokens
Ready for full API access? Here’s how to upgrade:Keep Existing Client Credentials
Run OAuth Setup
.env:Server Automatically Switches
Fallback to Client Credentials
Security Best Practices
Protect Your Credentials
Protect Your Credentials
- Store in
.envfile - Add
.envto.gitignore - Use environment variables in production
- Set file permissions:
chmod 600 .env
- Commit to version control
- Share publicly or in screenshots
- Hardcode in source files
- Send via email or chat
Separate Sandbox and Production
Separate Sandbox and Production
- Isolate testing from production
- Easier credential rotation
- Better security boundaries
Monitor Usage
Monitor Usage
-
In eBay Developer Portal:
- Review API usage analytics
- Check request patterns
- Monitor for unexpected spikes
-
Set up alerts:
- Email when approaching rate limits
- Notify on authentication failures
- Alert on unusual activity patterns
-
Log analysis:
Review logs for suspicious patterns.
Rotate Credentials
Rotate Credentials
- Generate new credentials in portal
- Update
.envwith new values - Test new credentials work
- Delete old credentials from portal
- Every 90 days minimum
- Immediately if compromised
- Before/after team member changes
Next Steps
Upgrade to OAuth
Understand Rate Limits
Explore Available Tools
Best Practices
Comparison: Client Credentials vs User Tokens
- Setup Complexity
- API Access
- Rate Limits
- Use Cases
- ✅ 2-3 minutes setup
- ✅ No browser authorization
- ✅ Just add ID and Secret
- ✅ Works immediately
- ⚠️ 10-15 minutes setup
- ⚠️ OAuth flow required
- ⚠️ Browser authorization needed
- ⚠️ Additional configuration