MCP Servers

Model Context Protocol — 4 sub-servers for focused context. Connect Claude Desktop, Cursor, or any MCP client.

Overview

Instead of one monolithic MCP server with all 23 tools, DuLieu.dev exposes 4 focused sub-MCP servers. Connect only the ones you need — smaller tool lists mean less context window consumed by tool definitions.

Quick Setup

1. Get an API key

Sign in at /settings with Google and create an API key.

2. Generate your MCP URL

Encode your API key as base64url to create an opaque URL:

echo -n 'dl_YOUR_API_KEY' | base64 | tr '+/' '-_' | tr -d '='

3. Add to Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json. Add one or more sub-servers:

{
  "mcpServers": {
    "dulieu-finance": {
      "url": "https://dulieu.dev/mcp/dulieu-finance/YOUR_BASE64URL_TOKEN"
    },
    "dulieu-weather": {
      "url": "https://dulieu.dev/mcp/dulieu-weather/YOUR_BASE64URL_TOKEN"
    },
    "dulieu-retail": {
      "url": "https://dulieu.dev/mcp/dulieu-retail/YOUR_BASE64URL_TOKEN"
    },
    "dulieu-reference": {
      "url": "https://dulieu.dev/mcp/dulieu-reference/YOUR_BASE64URL_TOKEN"
    }
  }
}

Or use the monolithic https://dulieu.dev/mcp/YOUR_TOKEN for all 23 tools in one server.

Authentication

Option A: Opaque URL (recommended for desktop clients)

https://dulieu.dev/mcp/{server_name}/{YOUR_BASE64URL_TOKEN}

The URL contains your API key — treat it as a secret.

Option B: Bearer token

POST https://dulieu.dev/mcp/{server_name}
Authorization: Bearer dl_YOUR_API_KEY

Sub-MCP Servers

Each sub-server exposes a focused subset of tools. Smaller tool lists = less context window consumed.

dulieu-finance

Financial data: exchange rates, gold, silver, interest rates, commodities

5 tools
get_exchange_rates

Vietnam exchange rates (VND vs USD, EUR, JPY, etc.) from Vietcombank. Returns buy/sell/transfer rates.

date, from, to, previous
get_gold_prices

Vietnam gold prices in nghìn VND/chỉ from multiple sources (DOJI, SJC, PNJ, etc.). 1 chỉ = 3.75g.

date, from, to, previous
get_silver_prices

Vietnam silver prices in nghìn VND/lượng (tael) or nghìn VND/kg. 1 lượng = 37.5g.

date, from, to, previous
get_interest_rates

Vietnam bank deposit interest rates (% per year) for various terms (1-12 months). Up to 41 banks.

date, from, to, previous, bank
get_commodities

International commodity prices: crude oil (WTI, Brent), coffee (Robusta, Arabica), gold/silver world spot.

date, from, to, previous, symbol
Opaque: https://dulieu.dev/mcp/dulieu-finance/YOUR_TOKEN
Bearer: POST https://dulieu.dev/mcp/dulieu-finance

dulieu-weather

Weather data for 70+ Vietnamese cities

2 tools
get_weather

Weather for 70+ Vietnamese cities (all province capitals + tourist destinations). Temperature in °C.

date, from, to, previous, city
get_weather_forecast

5-day weather forecast for 70+ Vietnamese cities. Includes min/max temp, humidity, conditions.

date, from, to, previous, city
Opaque: https://dulieu.dev/mcp/dulieu-weather/YOUR_TOKEN
Bearer: POST https://dulieu.dev/mcp/dulieu-weather

dulieu-retail

Consumer prices: fuel, coffee, pepper, groceries, drugs, electronics

6 tools
get_fuel_prices

Vietnam fuel prices (E5 RON 92, RON 95, Diesel, Mazut) in VND/liter.

date, from, to, previous
get_coffee_prices

Vietnam domestic coffee prices (VND/kg) by region (Đắk Lắk, Lâm Đồng, Gia Lai, Đắk Nông).

date, from, to, previous
get_pepper_prices

Vietnam pepper prices (VND/kg) by region, plus India Kochi international prices.

date, from, to, previous
get_grocery_prices

Grocery prices from Vietnamese supermarkets (Lotte Mart, Coop Online, MM Vietnam, etc.). COICOP classified.

date, from, to, previous, store, category, limit
get_drug_prices

Pharmacy/drug prices from Vietnamese pharmacies (Pharmacity, Long Châu). COICOP 06 classified.

date, from, to, previous, store, limit
get_electronics_prices

Electronics prices from Vietnamese retailers. Returns product name, brand, category, price, store.

date, from, to, previous, store, category, brand, limit
Opaque: https://dulieu.dev/mcp/dulieu-retail/YOUR_TOKEN
Bearer: POST https://dulieu.dev/mcp/dulieu-retail

dulieu-realestate

Vietnamese real-estate listings (batdongsan.com.vn + guland.vn) + geo resolver + planning/zoning map layers

8 tools
resolve_geo

Resolve a Vietnamese location — a name (e.g. 'Q7, Nguyễn Thị Thập', 'HCM Tân Thuận') or a Google Maps URL/short-url — to structured admin units (province/district/ward), coordinates, and a batdongsan.com.vn geo mapping. Cached.

q
get_realestate_listings

Real-estate listings from batdongsan.com.vn + guland.vn. Sale & rent, all property types. Filter by source (guland.vn|batdongsan.com.vn), transaction (ban|cho-thue), type slug, province (ho-chi-minh, lam-dong, da-nang, ha-noi, quang-ngai), district, date range.

date, from, to, previous, transaction, type, province, district, source, limit
get_realestate_planning

Guland planning/zoning map (quy hoạch) tile layers per province — land-use planning 2021-2030 (land-2030), general planning (qh-chung), and base land layer, each with an {z}/{x}/{y} XYZ tile URL template, max zoom, source year, and GSO admin codes. Optionally filter by province key.

province
get_realestate_land_prices

Official government land-price schedule (Bảng giá đất 2026) from guland.vn — per street/segment × land type (Đất ở, Đất thương mại dịch vụ, …), priced by 4 position tiers (Vị trí 1-4) in VNĐ/m². Filter by province key, ward (partial), land_type (partial), q (street name search).

province, ward, land_type, q, limit
get_realestate_agents

Real-estate sellers — agencies, brokers & individual sellers (nhatot.com + guland.vn) with their active-listing counts (live_ads), ratings, verified/company flags, shop name & address. Filter by source, province key, q (name/shop search), companies=true (agencies only). Ordered by activity.

source, province, q, companies, limit
get_realestate_summary

Real-estate market snapshot — median price, median price/m² (robust to outliers), avg price/m² (trimmed) & avg area grouped by province × transaction × property type.

province
estimate_realestate_price

Estimate the price of a specific property from comparable crawled listings. Picks the most specific tier with enough comps (project → street → ward → district → province), takes the median price/m², and scales by area. Returns the estimate + a low–high band + the comps used + a confidence level. Set refresh=true to ALSO fetch a targeted realtime source query (nhatot keyword) + upsert before estimating, so project/street tiers reflect the freshest listings. Descriptive only — floor / alley width / lot depth are not modeled.

province, district, ward, street, project, type, transaction, area, refresh
fetch_realestate_live

On-demand realtime fetch + upsert (no estimate). Searches the nhatot Chợ Tốt gateway by keyword (project → street → district) and upserts arriving listings/agents into the DB. Use to freshen comps for a specific project/street before estimating or listing. Returns the queries run + fetched/upserted counts.

province, district, street, project, max_pages
Opaque: https://dulieu.dev/mcp/dulieu-realestate/YOUR_TOKEN
Bearer: POST https://dulieu.dev/mcp/dulieu-realestate

dulieu-reference

Reference data: daily summary, province merge map

2 tools
get_daily_summary

Today's summary of all Vietnamese economic data: exchange rates, gold, silver, weather, fuel, coffee, pepper, interest rates, electronics.

(none)
get_provinces_merge

Vietnam 2025 province/ward administrative reorganization. 63 to 34 provinces, 3,321 merged wards. Returns before/after metrics (Population, Area, Density, GRDP, Budget) for all provinces.

province
Opaque: https://dulieu.dev/mcp/dulieu-reference/YOUR_TOKEN
Bearer: POST https://dulieu.dev/mcp/dulieu-reference

Rate Limits

MCP requests count against the same daily limit as REST API calls. Free: 100/day, Pro: 10,000/day, Unlimited: no limit. All sub-servers share the same rate limit pool per API key. Requests are logged to /api/stats.

Response Metadata

Every tool response includes _meta with timing and rate limit info:

{
  "_meta": {
    "response_time_ms": 12,
    "plan": "pro",
    "daily_limit": 10000,
    "daily_used": 42,
    "daily_remaining": 9958
  }
}

Test with curl

List tools on a sub-server:

curl -X POST https://dulieu.dev/mcp/dulieu-weather/YOUR_TOKEN \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Call a tool on a sub-server:

curl -X POST https://dulieu.dev/mcp/dulieu-finance/YOUR_TOKEN \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_exchange_rates","arguments":{"date":"2025-05-24"}}}'