Connects Claude to the Newegg PC Builder MCP service. This skill is fully dynamic: it discovers available tools at runtime and lets the LLM decide which tool to call and how to fill its parameters. No tool names or parameter names are hard-coded, so the skill continues to work even after the MCP server updates its API.
MCP Endpoint: https://apis.newegg.com/ex-mcp/endpoint/pcbuilder Script: scripts/mcp_client.py
Always start by listing available tools. Never assume tool names or parameters from previous runs or documentation.
bash
python scripts/mcp_client.py list_tools
The output contains, for each tool:
name — identifier to use when callingdescription — what it does (may be empty; infer from name + schema)inputSchema.properties — available parameters with types and descriptionsinputSchema.required — mandatory parametersRead the list_tools output and decide:
inputSchema.propertiesquestion, query, text): pass the user's
request as a natural-language string describing their needbash
python scripts/mcp_client.py call <tool_name> '<json_arguments>'
Tool name and arguments are determined at runtime from Step 2. Example:
bash
python scripts/mcp_client.py call v2allin '{"question": "gaming PC RTX 5090 9800X3D best price"}'
Windows PowerShell (important)
PowerShell parses outer double quotes before Python runs. Using \"...\" inside "..." often breaks the JSON string (you may see errors like Got: {\ or “invalid JSON”). Prefer one of:
Single-quote the whole JSON (no backslash escapes needed): powershell
python scripts/mcp_client.py call v2allin '{"question": "gaming PC RTX 3070"}'
JSON in a file (most reliable for long or nested payloads): powershell
Set-Content -Path args.json -Encoding utf8 '{"question": "gaming PC RTX 3070"}'
python scripts/mcp_client.py call v2allin @args.json
Stdin (pipe or redirect): powershell
'{"question": "gaming PC RTX 3070"}' | python scripts/mcp_client.py call v2allin -
The script supports @path\to\file.json and - for stdin so shells never need to escape inner double quotes.
Where to change things
mcp_client.py in sync — document PowerShell rules here, and use @file / - in the client to avoid quoting bugs.~/.agents; updating the skill is the right place for portable behavior.Parse the JSON output. Common response shapes:
json
{ "result": { "summary": "...", "popular": [...], "valued": [...] } }
summary non-null → use as the primary answer textpopular / valued arrays present → list the buildsisError: true → report the error and suggest retrySituationActionlist_tools returns 0 toolsReport service unavailable; answer from training knowledgeTool description is emptyInfer purpose from name + parameter namesSchema has no requiredTreat all params as optional; pass what you haveAll response fields nullNo data for this query; say so and fall back to general knowledgeHTTP error on list_toolsReport error; do not proceed to call stepHTTP error on callRetry once; if still failing, fall back to general knowledgeMultiple tools matchPick most specific; briefly note the choice
scripts/mcp_client.py uses Python standard library only (3.6+, no pip needed).
Handles both application/json and text/event-stream responses automatically.
text
python scripts/mcp_client.py list_tools
→ prints all tools with full parameter schemas
python scripts/mcp_client.py call <tool_name> '<json_args>'
→ calls the tool and prints the JSON response
python scripts/mcp_client.py call <tool_name> @args.json
→ reads JSON arguments from a UTF-8 file (good on Windows)
echo '<json>' | python scripts/mcp_client.py call <tool_name> -
→ reads JSON from stdin
Errors go to stderr with a non-zero exit code. Invalid JSON prints a short hint for PowerShell users.