@marocain/mcp-server
MCP server for Marocain Investments that enables discovering, scoring, and analyzing Moroccan luxury real estate, along with submitting enquiries through the platform.
README
@marocain/mcp-server
The official Model Context Protocol server for marocain.investments — bringing {GIN}, our authored real-estate intelligence for Morocco, into any MCP client (Claude Desktop, IDEs, agents).
Discover, score and analyse Moroccan luxury real estate — then submit an enquiry that's routed on-platform. All the analysis is free; contact with the agent is always intermediated by the platform.
What is {GIN}?
{GIN} is the platform's proprietary scoring DNA. Instead of one blurry "AI score", it speaks with two coherent pillars fused into one honest verdict:
- {GIN} Quality — how good the asset is (vision view/structural/condition + location + yield + WC 2030 catalyst + trust).
- {GIN} Deal — how good the buy is (asking price vs. the M-Value AVM, adjusted for city momentum).
- Fused verdict — one buy/hold/pass headline that can never disagree with the numbers ("Prime asset, priced to buy", "Cheap — verify condition", …).
It's the difference between a good property and a good deal — the question generic scores never answer. It's honest by design: an overpriced listing is told it's overpriced.
Install
No install needed — run it straight from npm:
npx -y @marocain/mcp-server
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"marocain": {
"command": "npx",
"args": ["-y", "@marocain/mcp-server"]
}
}
}
Tools
Eleven tools — eight read-only analysis tools, a moat-safe enquiry tool, and two commerce tools (discover + order paid services).
Analyse (free)
| Tool | What it does |
|---|---|
search_listings |
Search AI-graded Moroccan listings by city, typology, price, rooms, free-text. |
get_listing |
Full detail for one listing — price (USD/MAD), AI scores, M-Value AVM, trust, {GIN} pillars + verdict. |
get_gin_score |
The {GIN} verdict: Quality + Deal pillars + the fused buy/hold/pass headline. |
get_market |
Macro market facts for a city or national scope (median price, supply, momentum, WC 2030 / TGV catalysts). |
listing_derive |
AI-derived one-paragraph investment memo for a listing (6 languages). |
semantic_search |
Conceptual / vector search across the catalogue and the authored guides (Foreign Buyer's Playbook, Morocco-vs-Dubai, AI-scoring methodology, residency, city theses). |
gin_ask |
Ask T{AI]GIN, the agentic investment analyst, a one-shot question — it plans, searches, scores with the {GIN} pillars and answers with citations. |
gin_deal_memo |
A structured, honest investor deal memo for one listing (verdict, M-Value, yield, strengths, risks, district read, next steps). |
Enquire & transact
| Tool | What it does |
|---|---|
request_service |
Submit a buyer enquiry / request a viewing — routed on-platform to the listing's verified agent. Returns a reference, never any contact. |
list_services |
The transactable service catalogue + EUR prices — buyer services (AI staging, viral content, reservation, appraiser, visitation — note the live API product_type id is spelled visaitation — the €199 AI business plan, lawyer / financing / commercialization) and agent services (listing boost, photo relight). |
order_service |
Order any service. Instant products return a Stripe checkout_url (pay on-platform); request-only products return a tracked order_id. Never returns contact. |
Payments: card checkout for instant products may be briefly unavailable while the platform reconnects its payment processor — request-based services and buyer enquiries work regardless.
order_servicereports this cleanly.
Discover → analyse → enquire
The model is simple and the same for everyone: all the intelligence is free (it's lead-gen), and the only way to make contact is through the platform (that's the moat, and how agents are billed).
- Discover & score with
search_listings/get_gin_score/semantic_search. - Go deep with
get_listing/gin_deal_memo/gin_ask. - Enquire with
request_service— it routes the buyer's interest to the listing's verified agent and returns a reference. You never receive the agent's phone, email or WhatsApp; the platform intermediates contact.
Most of the catalogue is still being onboarded by agents.
request_serviceroutes to a listing's claimed, verified agent; for a listing without one yet it returns a clear note instead of routing.
Example response shapes
get_gin_score({ id }) → the authored verdict:
{
"id": "…",
"title": "…",
"price_usd": 9630000,
"gin_verdict": { "key": "prime_value", "label": "Prime asset, priced to buy", "tone": "strong" },
"gin_quality": 76,
"gin_deal": 64,
"m_value_usd": 9100000,
"trust": { "title_verified": false, "fcr_status": "unknown" }
}
request_service({ listing_id, buyer_name, buyer_email, message }) → an on-platform reference, no contact:
{ "ok": true, "kind": "lead", "lead_id": "…", "status": "requested", "routed": true }
Moat-safe by design
No tool ever returns an agent's or seller's contact. On top of the public API hiding the phone, this server redacts the origin-portal deep link (source_url / source_listing_id) and the agent / agency name from listing payloads — so a downstream agent can't route a user off-platform to the seller. The single conversion path is request_service, which routes a buyer enquiry through marocain's own lead flow and returns a reference, never any contact. Discover, score and analyse freely; contact is always intermediated by the platform.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
request timed out after 30000ms |
Upstream slow or unreachable. | Retry. Bump MAROCAIN_TIMEOUT_MS if your network is high-latency. |
The Marocain API returned an error (403) |
Rare — Vercel platform-level anti-bot on very bursty traffic. | Back off and retry. |
valid buyer_email required (from request_service) |
A buyer name + valid email are mandatory so the agent can reply. | Supply both. |
listing_unclaimed (from request_service) |
The listing has no claimed agent yet, so the enquiry can't be routed. | Try a claimed/verified listing; check back as agents onboard. |
ignoring disallowed MAROCAIN_API_BASE |
You set MAROCAIN_API_BASE to a non-HTTPS or non-allowlisted host. |
Leave it unset (the default is correct). |
Configuration
| Env var | Default | Purpose |
|---|---|---|
MAROCAIN_API_BASE |
https://marocain.investments |
Override the API origin (testing only; must be HTTPS + allowlisted). |
MAROCAIN_TIMEOUT_MS |
30000 |
Per-request upstream timeout. |
Related
- Skills catalog:
@hei33enberg/luxury-skills(npm) — the machine-readable capability catalog this server draws from. - Live API:
https://marocain.investments/api/public/*· AEO manifest:/llms.txt.
Releasing
Publishing to npm is automated by a GitHub Action (publish-mcp) in the platform repo:
# bump the version, commit, push — the Action publishes @marocain/mcp-server
npm version patch # or minor / major (edits package.json)
git push --follow-tags
Local npm test runs the unit tests (CI runs them on Node 18/20/22); CI additionally runs the black-box MCP handshake smoke (node test/smoke.mjs) on Node 20.
License
MIT © marocain.investments
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。