milligold-mcp
This read-only MCP server lets an AI agent retrieve Milli.gold's 18k gold prices, price history, and platform statistics.
Get the current 18k gold price in Rial per milligram, Rial per gram, and Toman per gram, with a Tehran-time timestamp.
Retrieve daily, weekly, or monthly price history with first/last prices, high, low, and change percent; optionally thin the series to 2–50 points.
Read Milli.gold platform statistics including users, trades, gold traded/held, burned gold, branches, and representatives.
Use the server without an API key or login; it only performs read-only requests and cannot buy, sell, or access wallets.
Click on "Deploy 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., "@milligold-mcpWhat's the current 18k gold price per gram on Milli.gold?"
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.
milligold-mcp: Milli.gold price MCP server for AI agents
Give your AI agent the live 18k gold price from Milli.gold (میلی). An unofficial, read-only MCP server for Milli.gold, an Iranian online platform for 18k gold sold by the milligram: the live gold price per gram, day, week and month price history, and platform statistics, all from Claude, Cursor or Copilot.
For AI agents · Quick start · What it can do · Tools · Good to know · FAQ · فارسی
For AI agents
What: unofficial MCP server (model context protocol) for the public price and statistics endpoints of milli.gold. A gold price API for Iran in tool form.
Install:
uvx milligold-mcporclaude mcp add milligold -- uvx milligold-mcp. Transport: stdio. Needs uv (Python 3.10+).Auth: none, no API key or account. Optional
MILLIGOLD_MCP_PROXY(HTTP proxy URL, or a comma-separated list); system proxy settings are ignored.Access: read-only, so no confirmation is needed before calling any tool. It cannot log in, trade or read a wallet.
Tools: 3, all prefixed
mg_. Typical sequence:mg_get_price->mg_price_history.Use when: the user asks for the current 18k gold price per gram on Milli.gold, how it moved over a day, week or month, or Milli.gold's headline numbers.
Do not use when: the user wants to buy or sell gold, needs a market-wide quote, or wants dollar, coin or crypto prices (see tgju-mcp).
Output: compact JSON. Milli.gold quotes Rial per milligram of 18k gold; replies also carry Rial per gram and Toman per gram. Times are Tehran time.
Machine-readable:
server.jsonand the iran-mcp catalog (TOOLS.md,servers.json,llms.txt).
Related MCP server: gold-mcp
Why
Milli.gold sells 18k melted gold by the milligram, so its price is quoted per milligram, in Rial. The site shows the
price per gram, and the numbers are easy to misread by a factor of 10 or 1000. An agent with milligold-mcp reads
the quote straight from the public endpoints and does the unit conversion for you:
You: What is the Milli.gold gold price right now, and is it up or down this week?
Agent: calls
mg_get_price()->mg_price_history(period="WEEKLY")One gram of 18k gold costs 26,890,000 Toman on Milli.gold (268,900 Rial per milligram). Over the past week it moved by the percentage shown in
change_percent, between the week's low and high.
Illustrative example with the price from the site's own unit explanation; prices change all the time.
What it can do
Live price of 18k gold on Milli.gold: Rial per milligram, Rial per gram and Toman per gram, with the Tehran-time timestamp
Price history for the last day, week or month, with first, last, high, low and change percent
Platform statistics: users, trade transactions, gold traded and held (kg), burned gold (kg), branches and representatives
Read-only by design: no login, no trading, no wallet
Example prompts:
"What is the 18k gold price per gram on Milli.gold right now?"
"Show me Milli.gold's gold price for the last month. What were the high and the low?"
"Is gold up or down today on Milli.gold? Give me the change in percent."
"How many users and how much gold does Milli.gold report?"
قیمت طلای ۱۸ عیار در میلی الان هر گرم چند تومان است؟
نمودار قیمت طلا در میلی در یک هفته گذشته چطور بوده؟
امروز قیمت طلا در میلی بالا رفته یا پایین آمده؟
Quick start
You need uv. No API key or account.
claude mcp add milligold -- uvx milligold-mcpSettings → Developer → Edit Config, then add:
{
"mcpServers": {
"milligold": { "command": "uvx", "args": ["milligold-mcp"] }
}
}Click Install in Cursor above, or add the Claude Desktop block to ~/.cursor/mcp.json.
Click Install in VS Code above, or add to .vscode/mcp.json:
{
"servers": {
"milligold": { "type": "stdio", "command": "uvx", "args": ["milligold-mcp"] }
}
}codex mcp add milligold -- uvx milligold-mcpOr add to ~/.codex/config.toml:
[mcp_servers.milligold]
command = "uvx"
args = ["milligold-mcp"]Add to ~/.gemini/settings.json:
{
"mcpServers": {
"milligold": { "command": "uvx", "args": ["milligold-mcp"] }
}
}Add the Claude Desktop block to ~/.codeium/windsurf/mcp_config.json.
It's a standard stdio MCP server: run uvx milligold-mcp, or pip install milligold-mcp and run milligold-mcp.
Tools
All 3 tools are read-only and return compact JSON.
Tool | What it does |
| Gets the current Milli.gold price of 18k melted gold in Rial per milligram, Rial per gram and Toman per gram, with the Tehran-time timestamp |
| Gets the 18k gold price series for a day, week or month ( |
| Gets Milli.gold's headline numbers: users, trade transactions, gold traded (kg), user balances (kg), burned gold (kg), branches and representatives |
How it works
AI agent (Claude, Cursor, Copilot, ...)
│
│ MCP over stdio
▼
milligold-mcp (runs on your machine)
│
│ HTTPS
└──────▶ milli.gold price, price history, platform reportmilligold-mcp runs locally and calls three public, login-free endpoints of milli.gold: the live price, the price
widget series and the overall report. There is no hosted server in between and no API key.
Chrome-like client. Requests go through a Chrome-impersonating HTTP client, because the site sits behind ArvanCloud.
ArvanCloud 307 + cookie. ArvanCloud sometimes answers with a redirect to the same URL plus a cookie. The server retries once and keeps the cookie, so you never see it.
15 s cache. Repeated calls within 15 seconds reuse the answer instead of hitting the site again.
Read-only. Only GET requests, only to milli.gold. System proxy variables are ignored on purpose.
Good to know
Units. The site quotes
price18in Rial per milligram, and 1 gram = 1000 mg. So 268,900 Rial/mg x 1000 = 268,900,000 Rial/g, and Rial / 10 = 26,890,000 Toman/g, which matches "price of 1 gram of 18k gold" on the site.Tehran time.
as_ofand historytimevalues are Tehran time (UTC+3:30).Milli.gold's own price. It is the platform's quote for 18k melted gold, with no tax or making charge. It is not a market-wide quote and not the tgju price, so expect small differences from other sources.
History stats follow the site. The high, low and change for a week or a month include the day's peak and the live price, like the Milli.gold page does.
pointsonly thins the returned series; it does not change the stats.Statistics are rounded totals that the company publishes, with weights in kilograms.
What it does not do. No buying or selling, no login, no wallet or account data.
FAQ
Yes: milligold-mcp is an unofficial MCP server with 3 read-only tools. It calls the public price and statistics
endpoints that milli.gold itself serves; no API key is needed.
Add the server with claude mcp add milligold -- uvx milligold-mcp (or the matching config in
Quick start), then ask "What is the 18k gold price per gram on Milli.gold?" in English or Persian.
Milli.gold quotes Rial per milligram. Every reply also carries Rial per gram (x 1000) and Toman per gram (Rial per gram / 10).
tgju-mcp reads tgju.org: dollar, euro, gold, coins, crypto and commodity
prices across the Iranian market. milligold-mcp reads one platform, Milli.gold, and gives that platform's own gold
price per milligram and its history. Use tgju-mcp for market rates and wide comparisons; use milligold-mcp when the
question is about the price on Milli.gold specifically.
No, and that's deliberate. It has no login and only reads public data.
It is unofficial and not affiliated with Milli.gold. It is read-only, runs on your machine and is free under the MIT license.
Not by default. If requests are blocked from your network, set MILLIGOLD_MCP_PROXY to an HTTP proxy. System proxy variables are ignored on purpose.
Use the full path to uvx (where uvx on Windows, which uvx on macOS/Linux) as command.
Configuration
Variable | Default | Meaning |
| unset | Optional HTTP proxy URL for milli.gold requests. A comma-separated list is used one at a time: the next proxy takes over when one is blocked or cannot connect. System proxy settings are ignored |
فارسی: سرور MCP قیمت طلای میلی
milligold-mcp یک سرور MCP غیررسمی و فقط‌خواندنی برای میلی (Milli.gold)، پلتفرم آنلاین خرید و فروش طلای ۱۸ عیار آب‌شده به‌صورت میلی‌گرمی، است. این سرور به دستیار هوش مصنوعی شما (Claude، Cursor، Copilot و ...) اجازه می‌دهد قیمت لحظه‌ای طلا، تاریخچه قیمت و آمار پلتفرم را بخواند.
چه کارهایی می‌کند
قیمت هر گرم طلای ۱۸ عیار در میلی: ریال به ازای هر میلی‌گرم، ریال به ازای هر گرم و تومان به ازای هر گرم.
تاریخچه قیمت روز، هفته و ماه گذشته، با اولین، آخرین، بیشترین و کمترین قیمت و درصد تغییر.
آمار پلتفرم: تعداد کاربران، تعداد معاملات، طلای معامله‌شده و نگه‌داری‌شده (کیلوگرم)، طلای سوزانده‌شده و تعداد شعبه‌ها و نمایندگی‌ها.
نکته‌ها
فقط خواندنی است: خرید و فروش نمی‌کند، وارد حساب نمی‌شود و به کیف پول دسترسی ندارد.
قیمت، قیمت خود میلی است (بدون مالیات و اجرت)، نه قیمت بازار و نه قیمت tgju؛ برای نرخ دلار، سکه و ارز دیجیتال از tgju-mcp استفاده کنید.
هر ۱ گرم برابر ۱۰۰۰ میلی‌گرم است؛ ۲۶۸٬۹۰۰ ریال به ازای هر میلی‌گرم یعنی ۲۶٬۸۹۰٬۰۰۰ تومان برای هر گرم.
زمان‌ها به وقت تهران است. پاسخ‌ها ۱۵ ثانیه نگه داشته می‌شوند.
روی سیستم خود شما اجرا می‌شود و کلید API لازم ندارد.
نصب (اول uv را نصب کنید). در Claude Code:
claude mcp add milligold -- uvx milligold-mcpدر Claude Desktop، Cursor و بقیه برنامه‌ها همان تنظیم بخش Quick start را بگذارید.
نمونه پرسش‌ها
«قیمت طلای ۱۸ عیار در میلی الان هر گرم چند تومان است؟»
«قیمت طلا در میلی در یک ماه گذشته بیشترین و کمترین چقدر بوده؟»
«امروز طلای آب‌شده در میلی گران‌تر شده یا ارزان‌تر؟»
«آمار میلی را بگو: چند کاربر و چقدر طلا؟»
کلیدواژه‌ها: قیمت طلا، قیمت طلای ۱۸ عیار، خرید طلا آنلاین، طلای آب‌شده، قیمت هر گرم طلا، طلای دیجیتال، میلی.
Development
git clone https://github.com/sepehr071/milligold-mcp && cd milligold-mcp
uv sync
uv run ruff check . && uv run ruff format --check .
uv run python -m pytest -q # offline unit tests
uv run python -m pytest -m live -q # calls milli.gold
uv buildTools live in src/milligold_mcp/gold.py; each is a typed async function with a docstring that tells the agent when
to use it. Releases: bump the version in pyproject.toml and server.json, then push a v* tag.
Related servers
tgju-mcp for dollar, euro, gold, coin, crypto and commodity prices from tgju.org
iran-crypto-mcp for cryptocurrency prices on Iranian exchanges
tsetmc-mcp for Tehran Stock Exchange data
iran-mcp: catalog of all Iranian-service MCP servers
Disclaimer
Unofficial and not affiliated with or endorsed by Milli.gold. It is read-only and uses public endpoints of milli.gold, which can change without notice. Prices are informational and not financial advice.
Author
Built and maintained by Sepehr Radmard (سپهر رادمرد). Connect on LinkedIn or follow @sepehr071 on GitHub for more MCP servers for Iranian websites, all listed in iran-mcp. If this saves you time, a star on the repo helps other people find it.
License
Available Tools
3 toolsmg_get_priceMilli.gold live gold priceARead-onlyIdempotent
Get the current Milli.gold price of 18k melted gold, in Rial per milligram and per gram.
Milli.gold sells gold by the milligram (1 gram = 1000 mg); the quote is the platform's own price
with no tax or making charge. as_of is Tehran time. For the trend over a day, week or month use
mg_price_history.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered; the description adds real domain context that the annotations can't — the quote excludes tax and making charge, and `as_of` is in Tehran time. It stops short of saying how fresh or cached the quote is beyond the as_of field, which is the only remaining gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences: what it returns first, then the unit/tax caveats, then the sibling redirect. Nothing is padded and the most important fact is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, so the description carries the burden of explaining the return value — and it does, specifying both units (per mg and per gram), the currency (Rial), the tax/making-charge exclusion, and the timezone of the timestamp. An agent can call this and interpret the result with no further information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes no parameters, so baseline is 4. The mention of `as_of` being Tehran time describes a response field rather than an input, but it is still useful orientation for interpreting the call result.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Get the current Milli.gold price of 18k melted gold') and immediately pins down the unit domain (Rial per milligram and per gram). This is clearly separable from mg_price_history and mg_platform_stats, which deal with trends and platform metrics rather than a spot quote.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly routes the agent: 'For the trend over a day, week or month use mg_price_history.' The alternative and the condition that selects it are both named, so an agent won't call this for time-series data.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mg_platform_statsMilli.gold platform statisticsARead-onlyIdempotent
Get Milli.gold's headline numbers: users, trades, gold traded, gold held and branches.
Figures are rounded totals the company publishes; weights are in kilograms. For prices use mg_get_price.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds genuinely useful semantics beyond that: figures are rounded company-published totals and weights are in kilograms, which prevents misreading the numbers as exact or unit-ambiguous.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences: the first front-loads what is returned, the second carries the rounding/unit caveat and the sibling redirect. No filler and nothing buried.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description does the work of enumerating the returned metrics, their units and their rounding. Minor gap: it doesn't say whether figures are all-time cumulative or point-in-time, which an agent might want when reporting them.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the baseline is 4; there is nothing for the description to disambiguate. It uses the space instead to explain the units of the returned values, which is the closest analogue to parameter meaning here.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('Get') and a specific resource ('Milli.gold's headline numbers') and enumerates exactly what comes back: users, trades, gold traded, gold held, branches. This is clearly distinguishable from the sibling price tools, which the description also acknowledges.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly routes the agent away for price data ('For prices use mg_get_price'), which is the main ambiguity risk given the sibling tools. It doesn't mention mg_price_history, so routing is not fully exhaustive, but the primary when-to-use is stated clearly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mg_price_historyMilli.gold price historyARead-onlyIdempotent
Get the Milli.gold 18k gold price series for a day, week or month, with high, low and change.
Prices are Rial per milligram; time is Tehran time. Points are thinned evenly to points.
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | Window: DAILY = last ~24 h (15-min points), WEEKLY = last week, MONTHLY = last ~month. | DAILY |
| points | No | Max points to return, evenly spaced (2-50). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover read-only, idempotent, open-world, non-destructive behavior, so the bar is lower. The description adds meaningful context beyond them: units are Rial per milligram, timestamps are Tehran time, and points are thinned evenly to the requested count.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight sentences. The core capability and window options are front-loaded, with units, timezone, and thinning behavior following without filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, so the description must indicate return content – it does so by naming high, low, change and the point count, plus units and timezone. It stops short of describing response envelope, errors, or ordering details, but nothing critical for calling the tool is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%; both `period` (with enum windows) and `points` (2-50) are fully documented in the schema. The description adds only the units/timezone framing and restates even spacing, so baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource: 'Get the Milli.gold 18k gold price series' with selectable windows and high/low/change fields. It is distinguishable from mg_get_price in practice (series vs. snapshot) but never names or contrasts with that sibling explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by 'series for a day, week or month' – an agent can infer this is the historical/timeseries tool rather than the current-price tool. There is no explicit when-to-use, when-not-to-use, or named alternative (e.g., 'for the current price use mg_get_price'), so guidance remains inferred rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.1- First observed
mg_get_price - First observed
mg_platform_stats - First observed
mg_price_history
TDQS
Scored across 3 tools
Each tool targets a distinct data type: a current quote, a historical series, and aggregate platform metrics. Descriptions explicitly cross-reference each other (e.g. 'For the trend use mg_price_history', 'For prices use mg_get_price'), leaving no realistic room for misselection.
All three share the `mg_` prefix and snake_case, which makes the family obvious. However, `mg_get_price` uses a verb-first form while `mg_price_history` and `mg_platform_stats` are noun-grouped, a minor inconsistency in an otherwise predictable scheme.
Three tools is on the thin side, but the domain is a narrow read-only price/metrics feed, and each tool covers a genuinely different need without padding. A slightly larger surface (e.g. unit conversion or karat variants) could justify more, but nothing here is redundant.
The surface covers spot price, time-series history with high/low/change, and platform statistics — essentially full coverage for a gold price feed. Minor gaps remain, such as unit conversion or other karats/candle granularity, but agents can work around them.
Maintenance
Related MCP Connectors
Live crypto + IDX stock market intelligence for AI agents — 19 tools, no API key.
Live & historical FX rates and currency conversion for AI agents. No API keys.
Live & historical FX rates and currency conversion for AI agents. No API keys.
17 pay-per-call web, finance, legal and onchain tools for AI agents. USDC on Base via x402/MPP.
Related MCP Servers
- AlicenseAqualityDmaintenanceLive market data for AI agents. 8 tools: real-time crypto prices, OHLCV candles, order books, market cap rankings, trending coins, technical analysis (RSI/SMA/z-score), asset comparison, and Fear & Greed index. Zero API keys, zero dependencies.81MIT
- AlicenseBqualityCmaintenanceAn MCP server that brings public gold (XAUUSD) market data into Claude, ChatGPT, and other MCP clients. Free tier includes 13 tools for price, OHLCV, macro context, correlations, and more.41333 PyPI8MIT
- FlicenseNot gradedqualityBmaintenanceMCP server and ChatGPT/Codex plugin for Persian-language gold market decision support, connecting to WallGold accounts via OAuth to provide live prices, portfolio valuation, multi-dimensional analysis, risk policy, and trade previews.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query Bank Negara Malaysia's keyless public API for foreign exchange rates against MYR, Kijang Emas gold bullion prices, the Overnight Policy Rate, and Malaysian banks' base lending rates, plus arbitrary confirmed BNM endpoints. Runs standalone over stdio or through the Pipeworx gateway.229 npmMIT