Connect an AI agent

This marketplace can be operated by AI agents over MCP: listings, pages, blog posts, taxonomies, SEO fields and site settings.

MCP endpoint
https://rallycarsmarket.com/mcp
Streamable HTTP · JSON-RPC 2.0 · 2025-06-18, 2025-03-26, 2024-11-05 · Authorization: Bearer <token>

1. Create a token

Every agent authenticates with its own token, and the token decides what it may do.

  1. Sign in to the administration and open "API & integrations".
  2. Create a token, tick the scopes the agent needs (for full content work: listings:write, content:write, taxonomy:write, settings:read, settings:write, stats:read).
  3. Copy the token – it is shown only once – and keep it secret; anyone holding it can act with those permissions.

2. Point your client at the endpoint

Claude (desktop app, Claude Code)

{
    "mcpServers": {
        "rallycarsmarket": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-remote",
                "https://rallycarsmarket.com/mcp",
                "--header",
                "Authorization: Bearer YOUR_TOKEN"
            ]
        }
    }
}

Anthropic API (MCP connector)

{
    "model": "claude-opus-5",
    "mcp_servers": [
        {
            "type": "url",
            "url": "https://rallycarsmarket.com/mcp",
            "name": "rallycarsmarket",
            "authorization_token": "YOUR_TOKEN"
        }
    ],
    "messages": [
        {
            "role": "user",
            "content": "List the car classes that have no intro text and write one for each."
        }
    ]
}

OpenAI (Responses API)

{
    "model": "gpt-5",
    "tools": [
        {
            "type": "mcp",
            "server_label": "rallycarsmarket",
            "server_url": "https://rallycarsmarket.com/mcp",
            "headers": {
                "Authorization": "Bearer YOUR_TOKEN"
            },
            "require_approval": "never"
        }
    ],
    "input": "Find active listings without photos and hide them."
}

Google Gemini (python google-genai)

from google import genai
from mcp.client.streamable_http import streamablehttp_client

async with streamablehttp_client(
        "https://rallycarsmarket.com/mcp",
        headers={"Authorization": "Bearer YOUR_TOKEN"}) as (read, write, _):
    session = await ClientSession(read, write).__aenter__()
    await session.initialize()
    client = genai.Client()
    response = await client.aio.models.generate_content(
        model="gemini-2.5-pro",
        contents="Write meta descriptions for the pages that have none.",
        config=genai.types.GenerateContentConfig(tools=[session]),
    )

n8n

MCP Client node
  Transport:     HTTP Streamable
  Endpoint URL:  https://rallycarsmarket.com/mcp
  Authentication: Header Auth → Name: Authorization, Value: Bearer YOUR_TOKEN

3. What the agent can do

The server exposes these tools. Tools the token has no scope for are refused with an explanation.

ToolWhat it does
get_site_structureStart here. Returns the content model (listings, pages, posts, taxonomies), allowed enum values, URL patterns, SEO configuration, editable settings and what this token may do.
search_listingsFind car or part listings with the same filters as the public search. Returns compact records; use get_listing for the full record.
get_listingFull listing record: all specifications, equipment, photos, statistics, promotions and seller.
create_listingCreate a car or part listing. The listing is owned by the token owner unless owner_email points to another account. [requires scope: listings:write]
update_listingPartial update – send only the fields you want to change. [requires scope: listings:write]
set_listing_statusChange the status (active, suspended, hidden, sold, draft, pending). The owner can be notified by email with a reason. [requires scope: listings:write]
delete_listingPermanently deletes a listing together with its photos. Cannot be undone. [requires scope: listings:write]
add_listing_imageDownloads an image from a public URL, converts it to WebP renditions and attaches it to the listing. [requires scope: listings:write]
grant_listing_promotionGrants featured / top / highlight visibility for a number of days without a payment. [requires scope: promotions:write]
list_contentLists CMS pages or blog posts with their SEO fields and URLs.
get_contentReturns the full record including the HTML body.
create_contentCreates a CMS page or a blog post. HTML is allowed in content; pages also support placeholders such as {{cookie_table}}. [requires scope: content:write]
update_contentPartial update of a page or post, including its SEO fields. How to fill them: seo.writing_rules in get_site_structure. [requires scope: content:write]
delete_contentPermanently removes a CMS page or blog post. [requires scope: content:write]
list_faqsFrequently asked questions with their category and the URL they appear on. Categories are `categories` rows with type=faq (list_taxonomy kind=faq_categories).
create_faqAdds one question and answer to a FAQ category. The answer is HTML. It appears on /faq, on /faq/{category} and wherever {{faq:category-slug}} is used: a page or article body, or the intro and below-results text of a class, make, model or part category page. [requires scope: content:write]
update_faqPartial update of one question: send only what changes. [requires scope: content:write]
delete_faqPermanently removes one question. Set is_active = false with update_faq to hide it instead. [requires scope: content:write]
list_taxonomyReference data needed to fill listing fields and to build category pages.
create_taxonomyAdds a new make, model, car class, part category, journal category or FAQ category. For categories, type picks which one and parent_id makes it a subcategory. [requires scope: taxonomy:write]
update_taxonomyUpdates a make, model, car class or part category: name, slug, intro text above the results, SEO text below them and the meta title/description of that page. Field limits and house rules: seo.writing_rules in get_site_structure. [requires scope: taxonomy:write]
get_settingsAll editable settings grouped as in the admin area, with their current values, labels and allowed options (site name, SEO defaults, Google Analytics ID, homepage grids, moderation, cookies, email). [requires scope: settings:read]
update_settingsUpdates one or more settings, e.g. {"google_analytics_id":"G-XXXX","hero_title":"..."}. Only keys from get_settings are accepted. Landing-page SEO fields follow seo.writing_rules in get_site_structure. [requires scope: settings:write]
get_seo_reportSitemap and robots status, Google Analytics / Search Console configuration, structured data in use, content that is missing meta descriptions or photos, and the rules for writing those fields.
get_statsSite overview plus daily impressions, views and contacts, and the best performing listings. [requires scope: stats:read]

Token scopes

Give each agent the narrowest set that still lets it finish its job.

ScopeWhat it does
meAct as the token owner: own profile, listings, favourites, support messages
listings:readRead all listings incl. non-public statuses
listings:writeEdit any listing, change status, delete
promotions:writeGrant or revoke listing promotions
users:readRead users
users:writeUpdate user status / role
messages:readRead support conversations
messages:writeReply to support conversations
content:writeCreate and update pages & blog posts
taxonomy:writeManage makes, models, categories
settings:readRead site settings and SEO configuration
settings:writeChange site settings (Google Analytics ID, SEO defaults, homepage, moderation...)
stats:readRead site and listing statistics
orders:readRead orders and payments
orders:writeMark orders paid / cancelled

House rules for agents

  • Call get_site_structure first: it returns the content model, allowed values, URL patterns and the tools this token may use.
  • Search before writing and send only the fields you change – updates are partial.
  • Listing SEO is generated automatically; pages, posts, makes, models and categories have editable meta fields – see "Writing SEO fields" below for the limits.
  • FAQ: create_faq / update_faq write the questions, their categories are categories rows with type=faq, and {{faq:category-slug}} drops a whole category into any page or article.
  • Deletions are permanent. When in doubt, set a listing to "hidden" instead of deleting it.
  • Rate limit: 600 MCP requests per minute per token. Errors arrive as JSON-RPC errors or as results with isError = true.

How to do the work

The tool list says what is possible; these say what is correct. An agent that follows them produces listings and texts that need no cleaning up afterwards. The same steps come back from get_site_structure as playbooks, so an agent can read them itself.

Publishing a listing

  1. Read get_site_structure, then list_taxonomy (makes, models, car_categories or part_categories, features) and use the ids it returns. Never guess an id.
  2. search_listings first with the make, model and price. The same car offered twice is the most common mistake an agent makes.
  3. Required on every listing: category_id, country_code, currency, item_condition, price_type, title. Everything else may be omitted, and an empty field is better than a guessed one.
  4. If the model is not in the taxonomy, put the text in make_other / model_other. Do not create_taxonomy for one listing - a new make or model is a decision about the whole catalogue.
  5. Never invent homologation, technical passport, roll cage or validity data, and never invent a rebuild mileage. These are safety and legal claims the seller answers for; leave the field empty when the source does not state it.
  6. Numbers are validated. A value outside the allowed range is refused with the range in the error message - read it instead of retrying. Write the real figure: 1997, not 2 for a 2.0 engine.
  7. Write the title as a buyer searches: "{Year} {Make} {Model} {key spec}". Listings have no meta fields - the title and the description are the SEO.
  8. Pictures: add_listing_image takes a public URL or a data:image/...;base64 payload, up to 10 per listing; the first one becomes the cover.
  9. Moderation is off: a listing is public the moment it is created. Build it as a draft and set_listing_status to active when it is complete.
  10. The listing belongs to the token owner unless owner_email names another account.
  11. Never touch listings with is_demo = 1 and never purge demo data unless the owner asked in that same request.

Publishing a page or an article

  1. list_content first. If something on the topic exists, update_content it - a second page on the same subject competes with the first one in search results.
  2. A post needs a category_id from list_taxonomy kind=journal_categories; a page does not.
  3. content is raw HTML and is stored exactly as sent - nothing is sanitised and nothing is escaped. Send only body markup: p, h2, h3, ul, ol, li, strong, em, a, blockquote, table, img. Never script, style, iframe or on* attributes, and never an h1: the template renders the title as the h1.
  4. The slug is the URL and there is no automatic redirect: set it once, from the title, and do not change it afterwards. A duplicate slug is refused.
  5. excerpt is the summary shown in the journal list - write it, do not let it be cut from the body.
  6. meta_title and meta_description follow seo.writing_rules; meta_keywords stays empty.
  7. cover_image_url downloads and attaches the cover; the image must be public and must be yours to use.
  8. status defaults to draft. Set status=published when the text is finished, and published_at only to schedule or backdate.
  9. Link out of the article with descriptive anchors, two or three at most. The closing "rally cars for sale" line is added by the template - do not write your own copy of it.
  10. Drop a whole FAQ category into the body with {{faq:<category-slug>}}; it renders the questions and the FAQPage data. An unknown or empty category renders nothing.
  11. Write about rallying, not about the marketplace. The CTA block under every article already sells.

Working on SEO fields

  1. Run get_seo_report. It names the exact pages missing a meta description, an intro text or photos - work from that list, not from a crawl of your own.
  2. Read seo.writing_rules before writing a single field. The limits come from the renderer, so a field that fits is a field that will not be truncated.
  3. Leaving a field empty is valid and keeps the generated default. Never store a placeholder, a "TODO" or a repeated template sentence.
  4. Landing pages (home, cars, parts, makes, journal, faq) have no record of their own: they are edited with update_settings, group "Landing pages SEO & texts".
  5. Listings have no meta fields at all. If a listing reads badly in search results, fix its title and description.
  6. Never change a slug to improve a keyword. URLs are a contract; the traffic loss costs more than the keyword gains.
  7. Re-run get_seo_report when you are done and report the counts before and after.

Boundaries

  1. Content you create over MCP or the REST API lives in the database. There is nothing to commit: git holds the code, not the content.
  2. You cannot change code, templates, settings pages or the database schema through these tools, and you should not ask to.
  3. Delete nothing you did not create in the same session. set_listing_status hidden and is_active=false are reversible; delete_listing and delete_content are not.
  4. Work only on what you were asked for. Do not "tidy up" other listings, texts or taxonomy rows you happen to pass.
  5. If a tool refuses you, read the error: it names the missing scope or the failed rule. Do not retry the same call.

Writing SEO fields

Meta titles, descriptions, keywords and the intro / below-results texts of category pages are editable over MCP. These limits come from the renderer itself, and get_site_structure returns the same rules machine readable as seo.writing_rules.

  • Run get_seo_report first: it names the exact pages missing a meta description or intro text.
  • meta_title: up to 42 characters and without the site name — " | RallyCarsMarket" is appended automatically.
  • meta_description: 120-165 characters; anything over 170 is truncated with an ellipsis. It is reused as og:description.
  • meta_keywords (posts only): leave it empty — it is rendered into <head> and ignored by search engines.
  • description and content_bottom are unescaped HTML shown on the first results page only: p, h2, h3, ul, ol, li, strong, em, a. No script, style, iframe, h1, on* event attributes — the page already has its own <h1>.
  • Listings have no meta fields: edit title and description instead.
  • Landing pages (home, cars, parts, makes, journal, faq) are filled through update_settings, group "Landing pages SEO & texts".
  • FAQ questions have no meta fields: the question is the heading, the answer is the indexable text, and both feed FAQPage structured data. Insert a category into a page or article with {{faq:<category-slug>}}.
  • An empty field keeps the generated default and is not an error. Never store a placeholder.

Machine readable entry points

If your agent reads documentation on its own, point it at these URLs.

  • /llms.txt — short site and tool summary in Markdown
  • /mcp — endpoint description in JSON (GET), MCP protocol over POST
  • /api/v1/openapi.json — OpenAPI document of the REST API