Prerequisites
Before configuring, you need:- eBay Developer account (Sign up here)
- An eBay application with API credentials
- The server installed on your system
Need credentials?
Follow Step 1 of the Quickstart Guide to get your eBay Developer credentials
Configuration Methods
The eBay MCP Server supports three configuration methods:Interactive Setup
Recommended for beginnersGuided wizard with validation
Automatic Setup
For quick configurationEdit
.env then run setupManual Setup
For advanced usersComplete control over all settings
Method 1: Interactive Setup (Recommended)
The easiest way to configure your server:What the Wizard Does
1
Environment Selection
Choose your eBay environment:
- Sandbox: For testing (recommended initially)
- Production: For live operations
2
Credential Input
Enter your eBay credentials:
- Client ID (from eBay Developer Portal)
- Client Secret (from eBay Developer Portal)
- Redirect URI (default:
http://localhost:3000/callback)
3
OAuth Flow (Optional)
Generate user access tokens for full API access:
- Wizard generates an authorization URL
- Opens your browser automatically
- You authorize the application on eBay
- Wizard captures the OAuth code
- Exchanges code for access and refresh tokens
- Saves tokens securely in
.env
User tokens provide 10,000-50,000 requests/day vs 1,000 for client credentials
4
Confirmation
The wizard confirms successful configuration and shows:
- Environment (Sandbox/Production)
- Authentication method (User tokens/Client credentials)
- Expected rate limits
Method 2: Automatic Setup
For users who prefer to edit configuration files:1
Create .env File
2
Edit Configuration
Open
.env in your editor:3
Run Automatic Setup
- Validates your credentials
- Initiates OAuth flow for user tokens
- Tests API connectivity
- Confirms successful configuration
Method 3: Manual Configuration
For complete control over all settings:1
Create .env File
2
Configure All Variables
Edit
.env with all required and optional variables:3
Validate Configuration
Test your configuration:This checks:
- All required variables are set
- Credentials are valid format
- API connectivity works
- Tokens are valid (if provided)
Environment Variables Reference
Required Variables
| Variable | Description | Example |
|---|---|---|
EBAY_CLIENT_ID | Your eBay App ID | YourAppName-YourApp-SBX-1234abcd-567890ab |
EBAY_CLIENT_SECRET | Your eBay Cert ID | SBX-1234abcd-5678-90ab-cdef-1234 |
EBAY_ENVIRONMENT | API environment | sandbox or production |
EBAY_REDIRECT_URI | OAuth redirect URI | http://localhost:3000/callback |
Optional Variables (User Tokens)
| Variable | Description | Format |
|---|---|---|
EBAY_USER_ACCESS_TOKEN | User access token | v^1.1#i^1#... (long string) |
EBAY_USER_REFRESH_TOKEN | User refresh token | v^1.1#i^1#... (long string) |
EBAY_USER_TOKEN_EXPIRY | Token expiry time | 2024-12-31T23:59:59.000Z |
Optional Variables (Server Settings)
| Variable | Description | Default | Options |
|---|---|---|---|
MCP_TRANSPORT | MCP transport type | stdio | stdio, sse |
LOG_LEVEL | Logging verbosity | info | error, warn, info, debug |
LOG_REQUESTS | Log all API requests | false | true, false |
Authentication Modes
The server supports two authentication modes:User Tokens (Recommended)
- Overview
- Setup
- Rate Limits
Best for:
- Full API access (all 230+ tools)
- High rate limits (10,000-50,000 requests/day)
- Production usage
- Automated seller operations
- Requires OAuth 2.0 authorization
- User authorizes your application
- Tokens automatically refresh
- Secure token storage in
.env
Client Credentials (Fallback)
- Overview
- Setup
- Limitations
Best for:
- Testing basic functionality
- App-level operations only
- Development/testing
- No OAuth flow needed
- Automatic authentication
- Only requires Client ID and Secret
- Used when no user tokens are present
- Limited API access
Switching Environments
Sandbox to Production
1
Create Production App
- Visit eBay Developer Portal
- Create a new application
- Select Production environment
- Note your production credentials
2
Update Configuration
Edit
.env:3
Generate Production Tokens
4
Verify Production Setup
Security Best Practices
Protect Your .env File
Protect Your .env File
Never commit Set proper file permissions:For production deployments:
.env to version control:- Use environment variables (not
.envfiles) - Use secret management services (AWS Secrets Manager, Azure Key Vault, etc.)
Rotate Credentials Regularly
Rotate Credentials Regularly
For production:
- Generate new credentials in eBay Developer Portal
- Update your
.envfile - Regenerate user tokens:
npm run setup - Delete old credentials from eBay portal
- Rotate every 90 days minimum
- Immediately if credentials are compromised
Use Separate Credentials per Environment
Use Separate Credentials per Environment
Best practice:
- Separate Sandbox credentials
- Separate Production credentials
- Never use production credentials for testing
Monitor API Usage
Monitor API Usage
Track your usage to prevent hitting limits:Use eBay tools to check rate limits:
- Monitor via eBay Developer Portal
- Check current usage with
getRateLimitStatustool - Set up alerts before hitting limits
Troubleshooting
Configuration validation fails
Configuration validation fails
Check these common issues:
- Typos in Client ID or Secret
- Extra spaces or quotes in
.envvalues - Wrong environment (Sandbox credentials in Production mode)
- Expired user tokens
OAuth flow fails
OAuth flow fails
Common causes:
- Redirect URI mismatch
- Application not configured for OAuth
- Browser blocking popups
- Verify redirect URI in eBay Developer Portal matches
.env - Add
http://localhost:3000/callbackto your app’s OAuth settings - Allow popups from the setup wizard
Tokens expire immediately
Tokens expire immediately
Possible issues:
- System clock is incorrect
- Token expiry timestamp is wrong format