Skip to main content
Glama

πŸ›οΈ Sheypoor MCP

Model Context Protocol server for Sheypoor β€” Iran's largest classifieds marketplace.

license node MCP

Search listings Β· Get product details Β· Manage your account Β· Chat Β· Bookmark β€” all from Claude, Cursor, or any MCP host.


What is this?

sheypoor-mcp is an MCP server that exposes the Sheypoor marketplace as tools an LLM can call. Ask Claude:

"Find the 5 cheapest iPhone 15 Pro Max in Tehran with images."

…and it will chain list_provinces β†’ search_listings β†’ get_listing β†’ produce a table.


Related MCP server: divar-mcp

Preview

Kilocode MCP Screenshot


Use the hosted Cloudflare Worker β€” no install needed:

Remote URL: https://sheypoor-mcp.farhamaghdasi.workers.dev/

MCP host config

Any MCP host that supports remote HTTP/SSE transport. Point it at:

{
  "mcpServers": {
    "sheypoor": {
      "type": "remote",
      "url": "https://sheypoor-mcp.farhamaghdasi.workers.dev/"
    }
  }
}

Restart your MCP host after saving. The tools should appear automatically.


Local install

If you prefer running it locally, or want to develop:

git clone https://github.com/farhamaghdasi/sheypoor-mcp.git
cd sheypoor-mcp
pnpm install
pnpm build
node dist/bin.js

Then point your MCP host at node dist/bin.js as a local stdio command.


From source (development)

git clone https://github.com/farhamaghdasi/sheypoor-mcp.git
cd sheypoor-mcp
pnpm install
pnpm typecheck
pnpm test
pnpm lint
pnpm build

Layout:

src/
β”œβ”€β”€ bin.ts              CLI entry
β”œβ”€β”€ index.ts            public exports
β”œβ”€β”€ client/             HTTP client (reusable without MCP)
β”œβ”€β”€ mcp/                MCP server (tools, resources, prompts)
└── util/               logger, throttle, paths
tools/legacy-py/        frozen Python reference
docs/                   architecture + API notes

Tools

Tool

Purpose

search_listings

Search with query/city/category/price/sort

search_listings_all

Auto-paginate up to N pages

get_search_suggestions

Autocomplete a prefix

get_popular_searches

Trending terms

get_listing

Full listing detail by ID

get_listing_from_url

Full listing detail from a URL

get_listing_images

Full-size image URLs

list_categories

Top-level categories

get_category_tree

Full or partial category tree

search_categories

Fuzzy-match a category

list_provinces

Iranian provinces

list_cities

Cities of a province

login_start / login_complete

Phone + SMS login

logout

Clear cookies

whoami

Authenticated profile

get_my_listings

Your listings

get_my_bookmarks

Your saved listings

get_my_wallets

Payment wallets

get_chat_rooms

Chat room list

get_chat_unread

Unread message count

Resources

  • sheypoor://categories

  • sheypoor://locations

  • sheypoor://versions

Prompts

  • find_cheapest

  • analyze_listing

  • market_snapshot

  • compare_listings


Configuration

All config is via environment variables:

Var

Default

Purpose

SHEYPOOR_COOKIE_FILE

OS config dir

Cookie jar path

SHEYPOOR_LOG_LEVEL

info

pino level

SHEYPOOR_TIMEOUT_MS

20000

HTTP timeout

SHEYPOOR_MIN_DELAY_MS

500

Min throttle

SHEYPOOR_MAX_DELAY_MS

1500

Max throttle

Example:

{
  "mcpServers": {
    "sheypoor": {
      "command": "npx",
      "args": ["-y", "sheypoor-mcp"],
      "env": {
        "SHEYPOOR_COOKIE_FILE": "/Users/me/.config/sheypoor-mcp/cookies.json",
        "SHEYPOOR_LOG_LEVEL": "debug"
      }
    }
  }
}

Programmatic use

import { SheypoorClient } from "sheypoor-mcp";

const cli = new SheypoorClient();

// Search
const page = await cli.search.page({ q: "Ψ’ΫŒΩΩˆΩ†", city: "tehran", sort: "cheapest" });
for (const listing of cli.search.extractListings(page)) {
  console.log(listing.id, listing.title);
}

// Detail
const detail = await cli.listing.detail("466838381");
console.log(detail.title, detail.phone, detail.images.length);

// Auth
const pending = await cli.auth.start("09000000000");
// ... user receives SMS ...
const tokens = await cli.auth.complete(pending, "1234");
console.log("Logged in:", tokens.userName);

Cloudflare Worker

The Worker is deployed at https://sheypoor-mcp.farhamaghdasi.workers.dev/.

To deploy your own:

wrangler deploy

See wrangler.toml for configuration. The Worker uses WebStandardStreamableHTTPServerTransport and in-memory cookies by default. For persistent cookies, configure a KV binding in wrangler.toml.


Not affiliated with Sheypoor. Reverse-engineered from public traffic. Respect robots.txt and Sheypoor's Terms of Service. Do not scrape personal data, do not spam, and do not use the analytics endpoint (track_click) unless simulating a genuine user.


License

MIT

Available Tools

21 tools
get_category_treeA

Return the full category tree (or a subtree if parentId is given).

Inputs: parentId.

get_chat_roomsA

List the authenticated user's chat rooms (in-app messaging).

Inputs: page.

get_chat_unreadA

Return the number of unread chat messages.

Inputs: no named parameters.

get_listingA

Fetch full details of a Sheypoor listing by numeric ID. Returns title, price, seller, images, description, breadcrumbs, phone, actions.

Inputs: id (required).

get_listing_from_urlB

Fetch full details of a Sheypoor listing from its canonical URL.

Inputs: url (required).

get_listing_imagesB

Return only the full-size image URLs for a listing.

Inputs: id (required).

get_my_bookmarksB

List the authenticated user's saved/bookmarked listings.

Inputs: page, size.

get_my_listingsA

List the authenticated user's listings. Requires login.

Inputs: page, size, status.

get_my_walletsA

List the authenticated user's payment wallets.

Inputs: no named parameters.

get_search_suggestionsA

Get autocomplete suggestions for a search prefix in a given city.

Inputs: prefix (required), city.

list_categoriesA

List top-level Sheypoor categories with their IDs and slugs.

Inputs: no named parameters.

list_citiesA

List cities within a province (by province slug or name fragment).

Inputs: province (required).

list_provincesA

List all Iranian provinces with their IDs and slugs.

Inputs: no named parameters.

login_completeA

Complete Sheypoor login with the SMS code. Persists cookies for future sessions.

Inputs: code (required), sessionId (required).

login_startA

Start Sheypoor login. Sends an SMS code to the given Iranian mobile number. Returns a sessionId you must pass to login_complete along with the code the user receives.

Inputs: phone (required).

logoutA

Log out of Sheypoor: clear cookies and tokens.

Inputs: no named parameters.

search_categoriesA

Fuzzy-search categories by name (Persian or English substring).

Inputs: query (required).

search_listingsA

Search Sheypoor listings. Returns one page of results (default 24). Supports free-text query, city, category, region, price range, and sorting.

Inputs: city, page, sort, query, +6 more.

search_listings_allA

Search Sheypoor listings and auto-paginate. Returns a merged list of up to N pages. Use this when the user wants 'all' or 'many' results.

Inputs: city, sort, query, maxPages, +4 more.

whoamiA

Return the authenticated user's profile.

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 21 tools

    Disambiguation4/5

    Most tools target clearly distinct resources or actions, and descriptions do a good job separating close variants like search_listings vs search_listings_all and get_listing vs get_listing_from_url. A few category-related tools overlap conceptually, but their scope is explained well enough to avoid serious misselection.

    Naming Consistency4/5

    The set consistently uses lowercase snake_case and mostly follows list_/search_/get_/get_my_ patterns. Minor irregularities like login_start/login_complete, logout, and whoami break the strict verb_noun convention but are still predictable.

    Tool Count3/5

    At 21 tools, the server sits in the heavy range and includes several closely related variants such as search_listings/search_listings_all and multiple category browsing tools. Each tool has a plausible purpose, but the surface could likely be consolidated without losing capability.

    Completeness2/5

    The tool set covers browsing, searching, authentication, and read-only account data well, but it lacks core marketplace lifecycle operations: no create/update/delete listing, no bookmark management, and no chat messaging beyond unread counts. These are significant gaps that will block common seller and buyer workflows on Sheypoor.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to search Snappfood restaurants and SnappMarket stores across Iran, compare true order costs including packaging and delivery, read menus, minimum orders, ETAs and reviews, and surface live flash deals. All operations are read-only, with no login, basket, ordering or payment access.
      8
      21
      319 PyPI
      38
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to search and read Divar classified ads across Iranian cities, covering homes, cars, phones and more, with price statistics, deal finding, fair-price appraisal, ad comparison and map browsing. It is read-only, needs no account or API key, and returns compact JSON with prices in Toman.
      8
      31
      296 PyPI
      1
      MIT