Skip to main content
Glama

olx-mcp-api

An MCP (Model Context Protocol) server for OLX classifieds, using the public JSON API that OLX itself uses — no browser automation, no HTML parsing, no authentication required.

Works with any OLX locale: olx.pl, olx.ro, olx.pt, olx.bg, olx.ua.

Tools

Tool

Endpoint

Description

search_offers

GET /api/v1/offers/

Search by phrase, category, region/city/district + radius, price range, private/business seller, sorting, pagination (up to 50/page, ~1000 total)

get_offer

GET /api/v1/offers/{id}/

Full description, all photos, parameters, seller info

resolve_olx_url

GET /api/v1/friendly-links/query-params/{path}/

Experimental. Converts an OLX search URL (e.g. /elektronika/krakow/) into category_id, city_id, etc.

Responses are trimmed to a compact format to reduce token usage.

Related MCP server: letgo-mcp

Quick Start (npx — no installation needed)

The easiest way to use this server is with npx. No cloning or building required.

Claude Desktop

Edit the Claude Desktop config file for your OS:

OS

Path

macOS

~/Library/Application Support/Claude/claude_desktop_config.json

Windows

%APPDATA%\Claude\claude_desktop_config.json

Linux

~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "olx": {
      "command": "npx",
      "args": ["-y", "github:explicite/olx-mcp-api"],
      "env": { "OLX_BASE_URL": "https://www.olx.pl" }
    }
  }
}

Claude CLI

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "olx": {
      "command": "npx",
      "args": ["-y", "github:explicite/olx-mcp-api"],
      "env": { "OLX_BASE_URL": "https://www.olx.pl" }
    }
  }
}

Restart Claude Desktop / Claude CLI after saving.

Manual Installation (from source)

git clone https://github.com/explicite/olx-mcp-api.git
cd olx-mcp-api
npm install
npm run build
npm test

Then use the local path in your config:

{
  "mcpServers": {
    "olx": {
      "command": "node",
      "args": ["/absolute/path/to/olx-mcp-api/dist/index.js"],
      "env": { "OLX_BASE_URL": "https://www.olx.pl" }
    }
  }
}

Windows path example: C:\\Users\\yourname\\src\\olx-mcp-api\\dist\\index.js

OLX_BASE_URL

Change the base URL to target a different OLX country:

Value

Country

https://www.olx.pl

Poland (default)

https://www.olx.ro

Romania

https://www.olx.pt

Portugal

https://www.olx.bg

Bulgaria

https://www.olx.ua

Ukraine

Requirements

  • Node.js 18 or later (for manual install)

  • For npx usage: Node.js 18+ with npm

Limitations

  • Phone numbers (/offers/{id}/limited-phones/) require a logged-in session — not supported.

  • get_offer takes a numeric id from search results, not the ID embedded in the HTML link (...-IDxxxx.html).

  • This uses the unofficial frontend API. It may change without notice. The official OLX Partner API is available but requires OAuth app registration and is intended for managing your own listings.

License

MIT

Available Tools

3 tools
get_offerSzczegóły ogłoszenia OLXA

Full details of one offer by its numeric id (the "id" from search_offers): description, all photos, params, seller.

NameRequiredDescriptionDefault
idYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full burden. It does useful work by enumerating what comes back (description, all photos, params, seller), implicitly signaling a read-only single-record fetch, but it says nothing about failure behavior for a missing/expired id, permissions, or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence covering purpose, parameter source, and return contents with no filler. The parenthetical is well placed rather than tacked on at the end.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter tool with no output schema, the description covers what the agent needs to call it and what to expect back. Minor gaps remain around error cases and whether photo/param fields are always present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the schema only constrains id to a positive integer with no description, so the description fully compensates: it specifies 'numeric id' and traces the value's provenance to the 'id' field returned by search_offers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Full details of one offer') and pins it to a single numeric id, which cleanly separates it from the list-oriented search_offers sibling. An agent can tell immediately that this is the single-record fetch, not a search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells the agent the 'id' value comes from search_offers, which is the key usage precondition and establishes the search-then-fetch workflow. It does not address the resolve_olx_url sibling (when to start from a URL instead), so no true when-not guidance is present.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

resolve_olx_urlZamień link OLX na parametryA

Convert an olx.pl search URL or path (e.g. "https://www.olx.pl/elektronika/krakow/q-lutownica/?search[dist]=30") into API params (category_id, city_id, region_id, filters). Use the result in search_offers. Experimental endpoint.

NameRequiredDescriptionDefault
urlYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral burden. It usefully discloses that the endpoint is experimental and lists the output parameters, but it does not describe error behavior, validation rules, or side effects for malformed or non-OLX URLs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three short sentences with no wasted wording. It front-loads the conversion purpose, then gives the example and the downstream usage note.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter converter with no annotations and no output schema, the description covers the essential context: accepted input forms, an example, the output fields produced, and the intended downstream tool. It is only slightly incomplete on failure modes and strict URL validation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must clarify the single required url parameter. It does so by stating that the input may be a full OLX search URL or a path and by giving a concrete example with a query string, though it does not define accepted domains or validation details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: convert an olx.pl search URL or path into API parameters, and it enumerates the resulting fields category_id, city_id, region_id, and filters. It also distinguishes the tool from search_offers by telling the agent to use the result there.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear usage context: use this tool when starting from an OLX search URL or path, then pass the result to search_offers. It provides a concrete example URL, but it does not explicitly state when not to use it or describe alternative paths for forming a search directly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_offersSzukaj ogłoszeń OLXA

Search OLX offers via the public JSON API. Location/category must be numeric IDs — get them with resolve_olx_url (e.g. "/elektronika/krakow/") if you only know names. Returns compact offers plus total count and nextOffset.

NameRequiredDescriptionDefault
limitNo
queryNoSearch phrase, e.g. "lutownica"
cityIdNo
offsetNo
sortByNorelevance
priceToNo
regionIdNo
ownerTypeNo
priceFromNo
categoryIdNo
distanceKmNoRadius around cityId/districtId
districtIdNo
extraFiltersNoRaw OLX params, e.g. {"filter_enum_state[0]":"used"} (as returned by resolve_olx_url)
skipPromotedNo

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full burden, and it discloses meaningful behavior: it is a public JSON API, returns compact offers plus total count and nextOffset for pagination. It omits auth requirements and rate limits, which is a minor gap for a read-only search tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three compact sentences, zero waste. The core action is front-loaded, with the ID precondition and return shape following in logical order.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter search tool with no output schema, the description covers the essentials: API nature, ID requirements, and return shape including total count and nextOffset. It is nearly complete, with only filter-specific semantics and rate/auth context left implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 21% schema coverage across 14 parameters, the description must compensate, and it does add key meaning: location/category params require numeric IDs resolvable via resolve_olx_url, and nextOffset maps to offset. However, it leaves many filters (priceFrom/priceTo, ownerType, skipPromoted, distanceKm) unexplained beyond the schema, so compensation is only partial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: "Search OLX offers via the public JSON API." This clearly differentiates it from the sibling get_offer (single fetch) and resolve_olx_url (ID resolution). It is clear without explicitly naming what it is not.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent to resolve_olx_url when only names are known, stating the numeric-ID precondition. This is strong alternative-routing guidance. It does not name exclusions such as when to prefer get_offer, but the context is clear enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • First observedget_offer
    • First observedresolve_olx_url
    • First observedsearch_offers

TDQS

A4.3/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct role: search_offers finds listings, get_offer retrieves full details for one listing, and resolve_olx_url converts human-readable URLs into API parameters. There is no overlap in purpose, and the descriptions explicitly explain how the tools relate.

Naming Consistency5/5

All tool names use consistent snake_case with a verb_noun structure: get_offer, resolve_olx_url, and search_offers. The inclusion of 'olx' in resolve_olx_url is a minor domain-specific detail but does not break the pattern.

Tool Count5/5

Three tools is a well-scoped set for a read-only search API: one for discovery, one for detail retrieval, and one for input normalization. Each tool earns its place without redundancy.

Completeness4/5

The surface covers the core read-only workflow of resolving a URL, searching offers, and fetching offer details. Minor gaps exist, such as no direct category/city lookup tools, but resolve_olx_url provides a workaround for common cases.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Exposes the OLX.ba marketplace API as MCP tools, enabling LLM clients to authenticate, browse and manage listings, read categories/attributes/locations, and run sponsorship/discount actions.
    35
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for OLX marketplace. Enables AI assistants to search listings, get offer details, track prices over time, and compare offers across OLX Poland and other supported countries.
    63 npm
    4
    MIT