The eBay MCP Server works with any MCP-compatible client. This guide covers popular alternatives to Claude Desktop and Cursor, plus instructions for building custom integrations.
Supported Clients
Cline (VS Code) MCP support in Visual Studio Code
Windsurf IDE AI-powered code editor with MCP
Continue.dev Open-source coding assistant
Custom Clients Build your own MCP integration
Python Scripts Programmatic access via Python
TypeScript/Node.js Native JavaScript integration
Prerequisites
For all clients, you need:
eBay MCP Server installed and configured
eBay Developer credentials (Client ID and Secret)
Node.js 18+ installed
Basic understanding of MCP concepts
Cline (VS Code Extension)
Cline is a popular MCP-enabled extension for Visual Studio Code.
Installation
Install Cline Extension
Open VS Code
Go to Extensions (Cmd/Ctrl + Shift + X)
Search for “Cline”
Click Install
Or install via command line: code --install-extension cline.cline
Configure MCP Servers
Cline uses a configuration file for MCP servers. Location:
macOS/Linux: ~/.cline/mcp_settings.json
Windows: %USERPROFILE%\.cline\mcp_settings.json
Create or edit the file: {
"mcpServers" : {
"ebay" : {
"command" : "node" ,
"args" : [ "/absolute/path/to/ebay-mcp-server/build/index.js" ],
"env" : {
"EBAY_CLIENT_ID" : "YourAppId-12345" ,
"EBAY_CLIENT_SECRET" : "YourCertId-67890" ,
"EBAY_ENVIRONMENT" : "sandbox"
}
}
}
}
Replace /absolute/path/to/ebay-mcp-server with your actual installation path
Reload VS Code
Open Command Palette (Cmd/Ctrl + Shift + P)
Type “Developer: Reload Window”
Press Enter
Cline will now connect to the eBay MCP Server.
Test the Connection
Open Cline panel in VS Code
Type: “List my eBay fulfillment policies”
Cline should use the eBay MCP tools to fetch your policies
Check Cline’s documentation for the latest configuration format, as it may vary by version
Windsurf IDE
Windsurf is an AI-first IDE with native MCP support.
Installation
Install Windsurf
Download from windsurf.ai (or check current official site) Available for macOS, Windows, and Linux.
Locate Configuration File
Windsurf configuration location (may vary by version):
macOS: ~/Library/Application Support/Windsurf/mcp.json
Windows: %APPDATA%\Windsurf\mcp.json
Linux: ~/.config/Windsurf/mcp.json
Check Windsurf’s documentation for the exact location in your version
Add eBay MCP Server
Edit the MCP configuration file: {
"mcpServers" : {
"ebay" : {
"command" : "node" ,
"args" : [ "/absolute/path/to/ebay-mcp-server/build/index.js" ],
"env" : {
"EBAY_CLIENT_ID" : "YourAppId-12345" ,
"EBAY_CLIENT_SECRET" : "YourCertId-67890" ,
"EBAY_ENVIRONMENT" : "sandbox" ,
"EBAY_USER_ACCESS_TOKEN" : "v^1.1#i^1#..." ,
"EBAY_USER_REFRESH_TOKEN" : "v^1.1#i^1#..."
}
}
}
}
Restart Windsurf
Fully quit and restart Windsurf for changes to take effect.
Continue.dev
Continue is an open-source AI coding assistant with MCP support.
Installation
Install Continue Extension
For VS Code:
Open Extensions
Search for “Continue”
Install the extension
For JetBrains IDEs:
Download from continue.dev/docs
Configure MCP Server
Continue uses ~/.continue/config.json for configuration. Edit the file to add MCP server: {
"models" : [ ... ],
"mcpServers" : {
"ebay" : {
"command" : "node" ,
"args" : [ "/absolute/path/to/ebay-mcp-server/build/index.js" ],
"env" : {
"EBAY_CLIENT_ID" : "YourAppId" ,
"EBAY_CLIENT_SECRET" : "YourCertId" ,
"EBAY_ENVIRONMENT" : "sandbox"
}
}
}
}
Reload Continue
Reload your IDE or restart Continue extension.
Generic MCP Client Setup
For any MCP-compatible client, follow this general pattern:
Most MCP clients use this configuration structure:
{
"mcpServers" : {
"ebay" : {
"command" : "node" ,
"args" : [ "/path/to/ebay-mcp-server/build/index.js" ],
"env" : {
"EBAY_CLIENT_ID" : "your_client_id" ,
"EBAY_CLIENT_SECRET" : "your_client_secret" ,
"EBAY_ENVIRONMENT" : "sandbox"
}
}
}
}
Environment Variables
You can reference environment variables instead of hardcoding credentials:
{
"mcpServers" : {
"ebay" : {
"command" : "node" ,
"args" : [ "/path/to/ebay-mcp-server/build/index.js" ],
"env" : {
"EBAY_CLIENT_ID" : "${EBAY_CLIENT_ID}" ,
"EBAY_CLIENT_SECRET" : "${EBAY_CLIENT_SECRET}" ,
"EBAY_ENVIRONMENT" : "${EBAY_ENVIRONMENT:-sandbox}"
}
}
}
}
Then set environment variables in your shell:
export EBAY_CLIENT_ID = "YourAppId-12345"
export EBAY_CLIENT_SECRET = "YourCertId-67890"
export EBAY_ENVIRONMENT = "sandbox"
Programmatic Integration
Build custom integrations with Python or TypeScript.
Python Integration
Use the MCP Python SDK to connect to eBay MCP Server:
Create Python Client
import asyncio
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
async def main ():
# Configure eBay MCP Server
server_params = StdioServerParameters(
command = "node" ,
args = [ "/path/to/ebay-mcp-server/build/index.js" ],
env = {
"EBAY_CLIENT_ID" : "YourAppId" ,
"EBAY_CLIENT_SECRET" : "YourCertId" ,
"EBAY_ENVIRONMENT" : "sandbox"
}
)
# Connect to server
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
# Initialize connection
await session.initialize()
# List available tools
tools = await session.list_tools()
print ( f "Available tools: { len (tools.tools) } " )
# Call a tool
result = await session.call_tool(
"getFulfillmentPolicies" ,
arguments = { "marketplace_id" : "EBAY_US" }
)
print ( "Fulfillment Policies:" , result)
# Run the client
asyncio.run(main())
Run Your Script
python ebay_mcp_client.py
TypeScript/Node.js Integration
Use the MCP TypeScript SDK:
Install Dependencies
npm install @modelcontextprotocol/sdk
Create TypeScript Client
import { Client } from '@modelcontextprotocol/sdk/client/index.js' ;
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js' ;
async function main () {
// Configure eBay MCP Server transport
const transport = new StdioClientTransport ({
command: 'node' ,
args: [ '/path/to/ebay-mcp-server/build/index.js' ],
env: {
EBAY_CLIENT_ID: process . env . EBAY_CLIENT_ID ! ,
EBAY_CLIENT_SECRET: process . env . EBAY_CLIENT_SECRET ! ,
EBAY_ENVIRONMENT: 'sandbox'
}
});
// Create MCP client
const client = new Client ({
name: 'ebay-client' ,
version: '1.0.0'
}, {
capabilities: {}
});
// Connect to server
await client . connect ( transport );
// List tools
const { tools } = await client . listTools ();
console . log ( `Available tools: ${ tools . length } ` );
// Call a tool
const result = await client . callTool ({
name: 'getInventoryItems' ,
arguments: {
limit: 10
}
});
console . log ( 'Inventory Items:' , result );
// Clean up
await client . close ();
}
main (). catch ( console . error );
Compile and Run
npx tsx ebay-mcp-client.ts
Web-Based Clients
Integrate eBay MCP Server into web applications.
Using HTTP/SSE Transport
The eBay MCP Server can run in SSE (Server-Sent Events) mode for web clients:
Start Server in SSE Mode
Modify server configuration to use HTTP transport: # Set transport mode
export MCP_TRANSPORT = sse
export MCP_PORT = 3000
# Start server
cd /path/to/ebay-mcp-server
npm start
Connect from Web Client
// Example using fetch API
async function callEbayTool ( toolName , args ) {
const response = await fetch ( 'http://localhost:3000/mcp/tools/call' , {
method: 'POST' ,
headers: {
'Content-Type' : 'application/json' ,
},
body: JSON . stringify ({
name: toolName ,
arguments: args
})
});
return await response . json ();
}
// Use the tool
const policies = await callEbayTool ( 'getFulfillmentPolicies' , {
marketplace_id: 'EBAY_US'
});
console . log ( policies );
SSE mode is currently experimental. Check the eBay MCP Server documentation for current support status.
Configuration Best Practices
Security
Don’t: {
"env" : {
"EBAY_CLIENT_ID" : "YourActualClientId" , // ❌ Bad!
"EBAY_CLIENT_SECRET" : "YourActualSecret"
}
}
Do: {
"env" : {
"EBAY_CLIENT_ID" : "${EBAY_CLIENT_ID}" , // ✅ Good!
"EBAY_CLIENT_SECRET" : "${EBAY_CLIENT_SECRET}"
}
}
Use environment variables or secret management tools.
Use separate configs per environment
Maintain different configuration files:
mcp_config.sandbox.json - For testing
mcp_config.production.json - For live operations
Add both to .gitignore
Set proper file permissions
# Restrict access to config files
chmod 600 ~/.client/mcp_settings.json
# Make sure .env is not readable by others
chmod 600 /path/to/ebay-mcp-server/.env
Enable connection pooling
For high-volume applications, reuse MCP client connections: # Python example
class EbayMCPPool :
def __init__ ( self ):
self ._session = None
async def get_session ( self ):
if not self ._session:
# Create connection
self ._session = await create_mcp_session()
return self ._session
Cache frequently accessed data to reduce API calls: import { LRUCache } from 'lru-cache' ;
const cache = new LRUCache ({
max: 500 ,
ttl: 1000 * 60 * 5 // 5 minutes
});
async function getInventoryItems () {
const cached = cache . get ( 'inventory' );
if ( cached ) return cached ;
const result = await client . callTool ({
name: 'getInventoryItems'
});
cache . set ( 'inventory' , result );
return result ;
}
Error Handling
async function callToolWithRetry (
toolName : string ,
args : any ,
maxRetries = 3
) {
for ( let i = 0 ; i < maxRetries ; i ++ ) {
try {
return await client . callTool ({ name: toolName , arguments: args });
} catch ( error ) {
if ( i === maxRetries - 1 ) throw error ;
// Exponential backoff
await new Promise ( resolve =>
setTimeout ( resolve , Math . pow ( 2 , i ) * 1000 )
);
}
}
}
Troubleshooting
Client can't find MCP server
Possible causes:
Wrong path to server
Server not built
Node.js not in PATH
Solutions:
Verify server path:
ls /path/to/ebay-mcp-server/build/index.js
Build server:
cd /path/to/ebay-mcp-server && npm run build
Check Node.js:
which node
node --version
Cause: Server takes too long to start or authenticate.Solutions:
Increase timeout in client configuration
Check network connectivity
Verify credentials are correct
Test server independently:
cd /path/to/ebay-mcp-server
npm start
Tools not appearing in client
Cause: Invalid or expired credentials.Solutions:
Verify credentials in eBay Developer Portal
Regenerate user tokens:
cd /path/to/ebay-mcp-server
npm run setup
Check environment matches credentials (Sandbox vs Production)
Building Custom Integrations
Creating a Custom MCP Client
Choose Your Framework
Select based on your needs:
Python: Best for data science, automation scripts
TypeScript/Node.js: Best for web apps, serverless functions
Go: Best for high-performance services
Rust: Best for system-level integrations
Install MCP SDK
Python
TypeScript
Other Languages
Implement Client Logic
Follow MCP client protocol:
Establish transport (stdio, HTTP, etc.)
Send initialization message
List available tools
Call tools with proper parameters
Handle responses and errors
Close connection gracefully
Add eBay-Specific Features
Rate limit handling
Token refresh logic
Error recovery
Result caching
Batch operations
Example: Slack Bot Integration
from slack_bolt import App
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
app = App( token = os.environ[ "SLACK_BOT_TOKEN" ])
@app.command ( "/ebay-orders" )
async def check_orders ( ack , command , say ):
await ack()
# Connect to eBay MCP Server
server_params = StdioServerParameters(
command = "node" ,
args = [ "/path/to/ebay-mcp-server/build/index.js" ],
env = {
"EBAY_CLIENT_ID" : os.environ[ "EBAY_CLIENT_ID" ],
"EBAY_CLIENT_SECRET" : os.environ[ "EBAY_CLIENT_SECRET" ],
"EBAY_ENVIRONMENT" : "production"
}
)
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
# Get recent orders
result = await session.call_tool(
"getOrders" ,
arguments = { "limit" : 5 }
)
# Format and send to Slack
await say( f "Recent orders: { result } " )
app.start( 3000 )
Next Steps
Additional Resources