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 15 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 15 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-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"}}}'