Haraj MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Haraj MCP Serversearch marketplace for used cars in Riyadh"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Haraj Model Context Protocol (MCP) Server
A production-grade Model Context Protocol (MCP) server for Haraj, built for Next.js, Vercel Serverless, and Supabase. Connects AI models (such as ChatGPT) to Haraj accounts for listing management, marketplace discovery, messaging, image processing, and bulk operations.
Features
Multi-User OAuth 2.0 and DCR: Built-in Dynamic Client Registration (RFC 7591) and Client ID Metadata Document support. Allows instant one-click connection in AI clients without manually setting client IDs or client secrets.
Persistent Serverless Storage: Integrated with Supabase PostgreSQL to persist multi-user sessions, authorization codes, and refresh tokens across stateless Vercel Serverless invocations.
Marketplace Intelligence: Search listings across Haraj, compute market price distributions (median, cheapest, highest, outliers), and generate optimized listing titles and descriptions.
Buyer Conversations: Inspect buyer contact inquiries, draft responses, and send replies securely with mandatory user confirmation and idempotency protection.
Security Auditing: Structured audit log tracking for all write actions, session revocation, permissions checking, and full ad snapshot exporting and restoration.
Interactive Chat Widgets: Provides custom HTML/JS widgets for real-time listing cards, engagement dashboards, and sign-in management within supported AI clients.
Related MCP server: Salla MCP Server
How to Get Your Haraj Session Token
To connect your Haraj account, obtain your JWT session token using any of the following methods:
Method 1: Chrome / Browser DevTools (Recommended)
Open haraj.com.sa in your web browser and sign in.
Press
F12(or right-click and select Inspect) to open Developer Tools.Select the Network tab.
Refresh the page or click any section.
Click any request sent to
graphql.haraj.com.saunder the Network list.Look under Request Headers for
Authorization: Bearer eyJ....Copy the token string starting with
eyJ...(exclude the wordBearer).
Method 2: Application Storage
Open Developer Tools (
F12) onharaj.com.sa.Go to the Application tab (or Storage tab in Firefox).
Expand Local Storage and select
https://haraj.com.sa.Look for the key named
haraj_tokenortoken.Copy the value string starting with
eyJ....
How to Connect Deployed Server to LLMs and AI Clients
Once your Vercel deployment URL (for example https://your-app-domain.vercel.app) is live, connect your AI client using one of the following methods:
Option 1: Connecting ChatGPT / Web-Based AI Clients
Open your AI client settings or Custom GPT configuration page.
Add a new Model Context Protocol (MCP) tool server.
Enter your deployed server endpoint:
https://your-app-domain.vercel.app/mcpWhen prompted for authorization, the server uses Dynamic Client Registration (DCR) automatically.
If a sign-in card or link is returned, click the link to open your server login page.
Paste your Haraj Session Token starting with
eyJ...and click Save & Connect.
Option 2: Connecting Claude Desktop / Local MCP Clients
Add the server to your local MCP configuration file (claude_desktop_config.json):
{
"mcpServers": {
"haraj": {
"command": "npx",
"args": ["-y", "haraj-private-mcp"],
"env": {
"HARAJ_TOKEN": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}
}
}
}Option 3: Connecting Antigravity IDE / Cursor / AGY CLI
Add the Streamable HTTP transport URL to your workspace .gemini/antigravity/mcp_config.json:
{
"mcpServers": {
"haraj-mcp": {
"url": "https://your-app-domain.vercel.app/mcp",
"transport": "streamable-http"
}
}
}Deployment Guide (Vercel + Supabase)
Step 1: Create Supabase Table
In your Supabase project SQL Editor, run:
create table if not exists public.haraj_sessions (
subject text primary key,
data jsonb not null,
updated_at timestamp with time zone default timezone('utc'::text, now()) not null
);Step 2: Configure Environment Variables
Set the following environment variables in your Vercel Project Settings:
NEXT_PUBLIC_SUPABASE_URL=https://your-supabase-project.supabase.co
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=your-supabase-anon-key
SUPABASE_SECRET_ROLE_KEY=your-supabase-service-role-key
OAUTH_ISSUER=https://your-app-domain.vercel.app
OAUTH_SIGNING_SECRET=your-random-32-byte-signing-secretStep 3: Deploy to Vercel
git push origin mainVercel automatically detects the configuration from vercel.json and deploys your serverless MCP endpoints.
Complete Tool Directory
Marketplace & Intelligence
haraj_search_marketplace: Search all public listings across Haraj platform, filter by city/price, and find market deals.haraj_compare_market_prices: Compute price statistics (median, cheapest, highest, outliers) and suggest competitive pricing.haraj_suggest_listing: Generate optimized titles and structured description text based on top market competitors.
Messaging & Conversations
haraj_list_conversations: List buyer conversations filtered by ad ID or unread status.haraj_get_conversation: Retrieve complete message thread history for a specific buyer and listing.haraj_draft_reply: Save response draft for user review before sending.haraj_send_reply: Send confirmed reply to buyer with mandatory confirmation and idempotency token.haraj_list_messages: View buyer contact inquiries on owned listings.haraj_get_chat: Retrieve buyer inquiry details.haraj_reply_message: Send direct message response.
Security, Admin & Auditing
haraj_session_expiry: Check exact expiration timestamp, token fingerprint, and renewal status.haraj_revoke_sessions: Disconnect account and clear stored session records across memory and database layers.haraj_audit_log: View structured audit log history for all write and edit operations.haraj_permissions: Check active security permissions and scopes assigned to the session.haraj_test_connection: Execute API ping diagnostic to measure response latency and upstream health.haraj_session_status: Verify session connectivity and current account owner.haraj_whoami: Resolve identity claims and verified username.haraj_login_link: Generate one-time session sign-in URL.haraj_logout: Disconnect current session.haraj_server_health: Check server build version and widget registrations.
Ad Management & Quality
haraj_list_ads: Fetch pageable list of user listings.haraj_get_ad: Retrieve single ad details, body text, and images.haraj_find_ads: Search and rank user ads across pages.haraj_ad_doctor: Diagnose quality issues and receive prioritized fix lists.haraj_show_ads: Render interactive UI card list of listings.haraj_show_ad: Render interactive UI detail card with engagement metrics.
Write & Editing
haraj_validate_ad: Test ad content validity before publishing.haraj_create_ad: Publish new listing to Haraj with user confirmation.haraj_edit_ad: Edit listing title, price, body, or photos (supports dry-run mode).haraj_refresh_ad: Bump ad to top of search results (with cooldown protection).haraj_get_refresh_eligibility: Check whether ad is eligible for refresh bump.
Bulk Operations
haraj_bulk_refresh: Refresh multiple listings in parallel with rate-limit handling.haraj_bulk_stats: Fan-out performance stats across account listings.haraj_bulk_edit: Edit price or content across multiple listings simultaneously.haraj_bulk_doctor: Run health diagnostics across all account listings.
Image Pipeline
haraj_upload_image: Process, resize, and upload single JPEG/PNG/WebP image to Haraj storage.haraj_upload_images: Upload multiple images in parallel.haraj_attach_images: Attach uploaded image references to existing listing.
Snapshots & Backups
haraj_export_ads: Export full ad metadata and image links to JSON format.haraj_restore_ad_snapshot: Preview or restore listing state from exported snapshot.
Verification
Run TypeScript compilation, linting, and unit tests:
npm run checkLicense
Distributed under the MIT License. See LICENSE for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables AI assistants to interact with Haravan e-commerce platforms via MCP protocol for natural language management of stores. Provides 7 smart analytics tools for insights and 63 base tools for CRUD operations on products, orders, customers, and inventory.Last updated16Apache 2.0
- Alicense-qualityDmaintenanceBridges AI assistants to Salla e-commerce stores for natural language operations on products, orders, and analytics.Last updated7MIT
- Alicense-qualityCmaintenanceExposes Kuwait's 4Sale marketplace to LLM agents through 62 tools for searching listings, evaluating prices, detecting scams, and more, enabling live-data-driven answers.Last updated2MIT
- Alicense-qualityCmaintenanceEnables AI agents to search, compare, buy, and sell products across multiple e-commerce platforms through 13 marketplace tools.Last updated1MIT
Related MCP Connectors
Search and discover advertiser products through an open marketplace for AI agents.
Give AI agents the LinkedIn tools to find, qualify, engage, and follow up with prospects.
Connect AI agents to bank accounts, transactions, balances, and investments.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/primeoak/Haraj-Mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server