MCPAI agentsNotebooksREST API

Ask in plain English, answer with live listings: MarketCheck over MCP

What the hosted MCP server exposes, how to connect Claude and your own code, when REST is still the better call, and a research notebook that logs every tool call behind its answers.

MarketCheck6 min read

For developers, data analysts and AI engineers

The Model Context Protocol (MCP) is an open standard that lets an AI model call external tools in a structured way. MarketCheck's MCP server wraps the REST API into a set of such tools, so a model can search listings, price a car, decode a VIN or read a car's listing history by deciding which tool to call, instead of you writing each request by hand.

That changes who writes the query: with REST your code decides every call in advance, while over MCP the model picks the tool and its arguments for each question, against the same data.

In short. Point any MCP client at https://api.marketcheck.com/mcp?api_key=YOUR_API_KEY. The hosted server speaks Streamable HTTP, and the API key in the URL is the only credential. Use MCP when you cannot predict the path to an answer and REST when you can. Log every tool call so the answers can be checked.

What the server exposes

The standard tools, as the docs describe them:

Tool What it returns Endpoint behind it
search_active_cars Live listings from dealers, private sellers or auctions, with facets and stats /v2/search/car/active and its private-party and auction siblings
search_past_90_days Expired and inferred-sold dealer listings from the last 90 days /v2/search/car/recents
predict_price_with_comparables A predicted market price plus comparable listings (US) /v2/predict/car/us/marketcheck_price/comparables
decode_vin_neovin Trim, engine, options, colors and MSRP for a VIN /v2/decode/car/neovin/{vin}/specs
get_car_history Every listing a VIN has had, with prices and dates /v2/history/car/{vin}
search_uk_active_cars, search_uk_recent_cars UK live and past-90-day listings /v2/search/car/uk/active, /v2/search/car/uk/recents
get_server_info The server's capabilities, tool list and usage guidance Server metadata

Results are trimmed for a model. Large objects (dealer details, build specs, full photo arrays) are stripped by default to save tokens, and include_dealer_object, include_build_object and fetch_all_photos bring them back for a single call. The server also accepts a number sent as a string, which models sometimes do, and it steers the model toward a facets call before a filtered search so that make, model and trim values match exactly. It also publishes MCP resources, such as car://search/facets for filter values, that a client can read before calling a tool.

Tool calls consume your plan the same way the REST request behind each tool would, with no MCP surcharge.

Connect a client

The hosted URL is all most clients need:

  • Claude Desktop. Add it as a custom connector under Customize, then Connectors, with the URL above. Claude Desktop does not accept a remote Streamable HTTP URL in claude_desktop_config.json; the docs describe an mcp-remote bridge for anyone who prefers a config file.
  • Cursor and Windsurf. Add the URL as a remote MCP server in the editor's MCP settings.
  • ChatGPT. Remote MCP servers go in as custom connectors in developer mode, where your plan allows it. OpenAI's help pages have the current steps.
  • Your own code. Any MCP client library that speaks Streamable HTTP can connect. The notebook below uses the Claude Agent SDK.

You can also run the server yourself from github.com/MarketcheckHub/marketcheck-api-mcp (Python 3.12 or later). It runs over STDIO for desktop clients or as an HTTP service with --mode streamable-http, and reads the key from MARKETCHECK_API_KEY, which keeps it out of any URL.

To confirm the connection, ask the question the docs use: "Search for Toyota Camry listings in California." The client should call search_active_cars and come back with live listings.

MCP or REST?

MCP REST
Who picks the calls The model, per question Your code, fixed in advance
Best for Exploration and assistants Scheduled jobs and product features
What comes back Results trimmed for a model The full documented response
Credentials Key inside the server URL api_key on every request
Repeatability The path can differ between runs The same call returns the same shape

One way to use both: explore a question over MCP, then freeze the version that matters into a REST job. The tool log in the notebook below turns that into a copy step, because the logged inputs use the parameter names of the REST endpoint behind each tool, apart from a few MCP-only switches such as include_dealer_object.

An analyst's desktop session

  1. Analyst asks in plain English
  2. Facets to find exact values
  3. Search with those values
  4. Analyst checks the numbers

A pricing or research analyst with Claude Desktop connected can ask what similar cars are listed for, or how a VIN was priced over its life, without writing a request. The docs trace empty results to filter values that do not match exactly, so this is the pattern they recommend:

Tool callstext
# Step 1: discover valid values
search_active_cars(facets="make,model,body_type,powertrain_type", rows=1, state="CA")

# Step 2: search with the validated values
search_active_cars(make="Toyota", powertrain_type="HEV,PHEV", state="CA")

Ask for the tool call behind every number, since the client shows each call and its arguments, and always give miles and a ZIP for price questions: predict_price_with_comparables falls back to 50,000 miles and ZIP 50501 (Des Moines, Iowa) when they are missing.

An assistant inside your product

  1. Question from your app
  2. decode_vin_neovin
  3. predict_price_with_comparables
  4. get_car_history
  5. Answer with the evidence attached

When a sales or support assistant in your own product needs market context, run the MCP connection on your server so the key never reaches a browser. The chain in the flow is the docs' valuation workflow. The decode confirms the build before the price call, so the comparables match the right trim, and the history adds how the same car was priced before. Allow only the tools the assistant needs and cap tool round trips per question. Return the tool results with the answer so your interface can show its evidence.

A research notebook that shows its work

Put the same connection in a Jupyter notebook and each cell can hold a plain-English question whose answer arrives with the exact tool calls behind it.

  1. Question in a notebook cell
  2. MarketCheck tool calls
  3. Tool log and answer in the notebook
  4. Keepers become REST jobs

The helper below uses the Claude Agent SDK with the hosted server attached:

research.pypython
# pip install claude-agent-sdk; set ANTHROPIC_API_KEY and MARKETCHECK_API_KEY
import os
from claude_agent_sdk import AssistantMessage, ClaudeAgentOptions, ResultMessage, ToolUseBlock, query

MARKETCHECK = {
    "type": "http",
    "url": f"https://api.marketcheck.com/mcp?api_key={os.environ['MARKETCHECK_API_KEY']}",
}

OPTIONS = ClaudeAgentOptions(
    mcp_servers={"marketcheck": MARKETCHECK},
    tools=[],  # no built-in file, shell or web tools: MarketCheck is the only source
    allowed_tools=[
        "mcp__marketcheck__search_active_cars",
        "mcp__marketcheck__search_past_90_days",
        "mcp__marketcheck__predict_price_with_comparables",
        "mcp__marketcheck__decode_vin_neovin",
        "mcp__marketcheck__get_car_history",
    ],
    system_prompt=(
        "Answer US car-market questions with the MarketCheck tools only. "
        "Run a facets query before filtering on make, model or trim. "
        "Prices are dealer asking prices, or last listed prices for past listings. "
        "For every number, name the tool call it came from and how many listings it rests on."
    ),
    max_turns=12,  # a ceiling on tool round trips per question
)

async def ask(question: str) -> str | None:
    async for message in query(prompt=question, options=OPTIONS):
        if isinstance(message, AssistantMessage):
            for block in message.content:
                if isinstance(block, ToolUseBlock):
                    print(f"  {block.name.removeprefix('mcp__marketcheck__')}  {block.input}")
        elif isinstance(message, ResultMessage):
            return message.result
    return None

# In the next cell (Jupyter allows top-level await):
# print(await ask("Which 2022 Toyota RAV4 trims sold fastest in Texas in the last 90 days?"))

tools=[] removes the SDK's built-in tools, so the model has no source except MarketCheck. The printed log comes first, so before reading the answer the analyst can check whether "sold fastest" became a search_past_90_days call with sold=true in TX, and which stats it asked for. When a question earns a permanent place, copy the logged arguments into a REST call against the endpoint in the table above and schedule it.

Limits to design around

  • The key rides in the URL. Anyone holding the connector URL can spend your quota. Create a separate key for MCP clients in the developer portal with an expiry date, and delete it if the URL leaks.
  • Exact values. Empty results usually mean a guessed make, model or trim, so run a facets query first.
  • Row counts. search_active_cars returns 5 rows unless asked (up to 50). Any dealer identifier routes it to the dealer inventory endpoint, which returns up to 1,500 listings in one call, a lot of context for a model.
  • Past 90 days. search_past_90_days needs a location or dealer filter and a radius of 100 miles or less. It takes one of facets, stats or range_facets in each call.
  • Coverage. Price prediction is US only. Canada has active and 90-day search, and the UK has its own two tools.
  • Shared limits. MCP traffic uses your plan's rate limit and monthly quota. On a 429, back off and retry; if it keeps happening, check whether the quota is spent.
  • Verify before publishing. Re-run the logged input as a REST call and read the full response before a number goes into a report.

Who this is for

Analysts who want live market answers without writing requests, and developers who are either adding market data to an assistant or learning the shape of the API through conversation before they commit to REST code.

Start here

  1. Create a free account and copy your API key. Start on the Free tier for development; current plans are on the pricing page.
  2. Add the hosted URL to Claude Desktop as a custom connector and ask the Camry test question.
  3. Paste the notebook helper into Jupyter and ask something you already know the answer to.
  4. Read the MCP server docs for every tool's parameters.

Start building on the Free tier.

The Free tier is for development and testing, on the same endpoints you will use in production. When you go live, pick a plan on the pricing page.

More use cases

All use cases