Purpose
ikman-gateway provides a more standardized access layer for ikman.lk, a large Sri Lankan classifieds marketplace. Because the original site's user experience was poor, the project author reverse-engineered its platform and built a RESTful API gateway while also providing a headless MCP server, making it easy for AI clients or automation tools to call classified ad data.
Main capabilities
- RESTful API gateway: provides endpoints for searching ads, retrieving a single ad's details, and querying categories and locations.
- MCP server: based on the official @modelcontextprotocol/sdk, supporting both stateful SSE and Stdio transports.
- 4 MCP tools:
- ikman_search_ads: search classified ads by keyword, category, location, minimum/maximum price, condition and sorting (cheapest, expensive, newest).
- ikman_get_ad_details: retrieve full specifications, high-definition images, verified seller phone numbers and shop details.
- ikman_list_categories: browse 296 category and subcategory slugs.
- ikman_list_locations: browse 27 districts and 332 cities/suburbs.
- Category mapping engine: automatically maintains category mappings in memory, converting human-readable slugs (such as mobile-phones, colombo) into ikman's internal numeric IDs (such as 2003, 1506).
- Caching strategy: search queries use a 2-minute in-memory TTL cache, while category and location data use a 1-hour cache.
- Price sorting: the REST API supports real price sorting.
Usage
The project provides an online deployed instance:
- Base URL:https://ikman-gateway-production.up.railway.app
- Interactive OpenAPI / Swagger UI:https://ikman-gateway-production.up.railway.app/api/docs
- Remote MCP SSE endpoint:https://ikman-gateway-production.up.railway.app/mcp/sse
- Health check: GET /health or GET /api/v1/health
MCP client integration:
- Claude Desktop: configure in claude_desktop_config.json, either run via npx or use a locally built node command pointing to dist/bin/mcp-stdio.js.
- Cursor: add in Settings -> Features -> MCP -> Add New MCP Server, with Command set to npx -y ikman-gateway.
- Antigravity / remote SSE: configure the remote SSE endpoint in ~/.gemini/config/mcp_config.json.
Local development requires Node.js >= 18.x. The repository includes a Jest test suite covering logic such as price parsing, spam detection, image URL parsing, specification dictionary mapping, contact information extraction, lowest price sorting, pagination calculation and spam price cleaning.
Use cases
Suitable for developers, AI client users and automated workflows that need programmatic access to ikman.lk classified ad data. It can be used to search for products and view ad details, categories and locations in tools that support MCP, such as Claude Desktop and Cursor.
Limitations
The project materials do not state ikman.lk's access rate limits, data usage terms or commercial use license; users must confirm the platform's policies themselves before use. The project uses the MIT License. The materials do not provide further information beyond pricing, costs or platform compatibility.