pik-mcp
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.
README
pik-mcp
An MCP server that exposes the
OLX.ba marketplace API (base URL https://api.olx.ba,
documentation) as tools an LLM client can call:
authenticate, browse and manage listings, read categories/attributes/locations, and
run sponsorship/discount actions.
Setup
npm install
npm run build
Copy .env.example to .env and fill in your OLX credentials:
OLX_USERNAME=your-username-or-email
OLX_PASSWORD=your-password
OLX_DEVICE_NAME=pik-mcp # optional
OLX_BASE_URL=https://api.olx.ba # optional
The server logs in with these credentials on the first tool call, caches the bearer token in memory, and automatically re-authenticates if the token expires (HTTP 401). Credentials are never written to stdout (the MCP transport); logs go to stderr.
Running
pik-mcp speaks MCP over stdio. Point any MCP client at node dist/index.js.
Claude Desktop / Claude Code config
{
"mcpServers": {
"olx": {
"command": "node",
"args": ["C:/Users/dkasi/Documents/Projects/pik-mcp/dist/index.js"],
"env": {
"OLX_USERNAME": "your-username-or-email",
"OLX_PASSWORD": "your-password"
}
}
}
}
Inspect / debug
npm run inspect # opens @modelcontextprotocol/inspector against the server
Tools
| Group | Tools |
|---|---|
| Auth | whoami, login_status |
| Listings (read) | search_listings, get_listing, get_user_listings |
| Categories | list_categories, get_category_children, get_category, get_category_attributes, get_category_brands, get_category_models, suggest_category, find_category |
| Locations | list_countries, list_cities, get_city, list_country_states, get_canton_cities |
| Listings (write) | create_listing, update_listing, publish_listing, refresh_listing, get_refresh_limits, get_listing_limits, finish_listing, hide_listing, unhide_listing, delete_listing |
| Images | upload_listing_image, delete_listing_image, set_main_listing_image |
| Sponsored / discount | get_sponsor_price, sponsor_listing, set_listing_discount, finish_listing_discount |
Destructive tools (delete_listing, finish_listing, image delete) and paid tools
(sponsor_listing, set_listing_discount) are flagged via MCP annotations and their
descriptions. refresh_listing may consume a paid refresh once the free quota is
exhausted — check get_refresh_limits first.
Searching listings
search_listings performs full-text search over OLX (GET /search). It is
public and works without credentials, so you can browse even before setting up
login. It accepts typed filters — q, category_id, brand_id, city_id,
price_from/price_to, state (condition id, e.g. 2 = used), created_gte
(e.g. "-24 hours"), per_page, page, sort_by/sort_order — plus an
extra_params object passed through verbatim for advanced keys such as attribute
filters (attr, attr_encoded).
By default it returns a compact summary per listing (id, title, price,
category/brand/city ids, condition, date, cover image, and a
https://olx.ba/artikal/{id} URL) alongside pagination meta and category
aggregations. Pass raw: true to get the full untrimmed API payload.
Typical create-and-publish flow
suggest_category/find_category→ pick acategory_idget_category_attributes→ see required attributes;get_category_brands/get_category_modelsif applicableget_city(orlist_cities) → pick acity_idcreate_listing→ returns a DRAFT listing idupload_listing_image→ attach photos;set_main_listing_imagefor the coverpublish_listing→ makes it visible in search
Notes / limitations
- The documented API exposes no generic "search all listings" endpoint. Browsing is
done via categories + a user's listings (
get_user_listings). - Some success messages from OLX are in Bosnian (e.g. "Oglas je uspjesno objavljen") and are passed through as-is.
Project layout
src/
index.ts entry point (stdio transport)
server.ts builds McpServer, registers all tool groups
config.ts env-based configuration
olx/
client.ts HTTP client: auth, token cache, 401 retry, error mapping
types.ts response shapes
tools/ one file per resource group
util/ shared zod schemas + result formatting
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。