Parsi MCP

io.github.amirjld由 GitHub 账号 amirjld 发布v0.3.0更新于 Oct 26, 2026

Offline Persian/Iran tools: Jalali dates, validators, Persian text, price inputs, RTL frontend.

已验证STDIO仅桌面位置与生活开发者工具

概览

AI 生成的概览

离线 MCP 服务器,提供 56 个波斯语与伊朗本地化工具:Jalali 日期、伊朗校验器、波斯文本处理、金额格式化和 RTL 前端辅助。

可以做什么
  • 转换、格式化、解析和计算 Jalali 日期差值,生成月历网格与周/月/季/年区间,计算年龄和工作日
  • 校验伊朗身份证号、银行卡、Sheba 号、手机号和邮编,并查询银行、运营商和地址信息
  • 规范化波斯文本,修正 ZWNJ 和数字,数字与波斯语数词互转,排序、模糊搜索、方向检测和安全截断
  • 格式化里亚尔与土曼金额,把价格写成文字,计算增值税,导出 Excel 安全的 CSV
  • 获取 RTL 规范、审查 CSS 与 Tailwind、转换为逻辑属性,并取得起始模板和价格输入片段
  • 查询伊朗 31 个省份及其 ISO 编码和首府
适用场景
适合需要生成波斯语内容或面向伊朗市场的表单与页面的场景:Jalali 日期选择器、带里亚尔价格的结账页、身份证或 Sheba 校验,以及 RTL 布局工作。也适合清理波斯文本和把数字转成文字。
运行要求
以 npm 包形式通过 stdio 在本地运行,需要 Node.js 18+;README 说明 npx 安装需等包发布到 npm,否则从源码构建。未声明任何 API 密钥或环境变量,完全离线可用。
安装前请注意
增值税工具需要你自己提供税率;README 明确说明因无法核实可靠离线数据,未包含伊斯兰历节日日期、车牌解析和身份证城市查询。银行、Sheba、手机号段和省份数据仅覆盖公开确认的条目,校验结果不宜视为权威。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Parsi MCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

parsi-mcp

English | فارسی

An MCP server that gives AI agents (Claude, Cursor, VS Code Copilot and others) reliable Persian and Iran-specific tools. It runs fully offline, with no API keys: Jalali dates, Iranian validators, Persian text handling, grouped price inputs with Persian words, and an RTL frontend toolkit.

56 tools. See the full list in TOOLS.md.

Install

Requires Node.js 18+. The npx commands below work once the package is published to npm; until then use the local build.

Claude Code

bash
claude mcp add parsi -- npx -y parsi-mcp

Or install the plugin, which adds the MCP server and the persian-rtl-frontend skill:

bash
claude plugin marketplace add amirjld/parsi-mcpclaude plugin install parsi@parsi-mcp

Cursor (~/.cursor/mcp.json or .cursor/mcp.json in a project)

json
{ "mcpServers": { "parsi": { "command": "npx", "args": ["-y", "parsi-mcp"] } } }

Claude Desktop (claude_desktop_config.json: %APPDATA%\Claude\ on Windows, ~/Library/Application Support/Claude/ on macOS)

json
{ "mcpServers": { "parsi": { "command": "npx", "args": ["-y", "parsi-mcp"] } } }

VS Code (.vscode/mcp.json)

json
{ "servers": { "parsi": { "type": "stdio", "command": "npx", "args": ["-y", "parsi-mcp"] } } }

Agent skill (tells agents to build Persian UIs RTL-first and to call these tools):

bash
npx skills add amirjld/parsi-mcp

From source

bash
git clone https://github.com/amirjld/parsi-mcp.gitcd parsi-mcp && npm install && npm run build# then use: { "command": "node", "args": ["/absolute/path/to/parsi-mcp/dist/index.js"] }

Before and after

You ask: "Build a checkout page in Persian with a price field."

Without parsi-mcp, agents typically produce an LTR page with margin-left and text-left, a plain number box, and Latin digits.

With parsi-mcp, the agent loads the RTL guidelines, takes rtl_starter_snippet for the layout and price_input_snippet for the field, and validates payment fields with validate_card_number and validate_sheba:

html
<html lang="fa" dir="rtl">  <!-- price input: typing 200000 shows ۲۰۰٬۰۰۰ -->  <input inputmode="numeric" value="۲۰۰٬۰۰۰" />  <p aria-live="polite">دویست هزار تومان</p></html>

What is inside

AreaHighlights
Jalali calendarconvert, format, parse, add, diff, month grid for date pickers, week/month/quarter/year ranges, relative text (۳ روز پیش), age from birth date, form validation, business days (Friday weekend), fixed solar holidays
Iranian validatorsnational ID, legal-entity national ID, bank card, Sheba, mobile, postal code, bank and operator lookup, phone display formats, address parsing (province, postal code, plaque/unit/floor)
Persian textnormalization, ZWNJ fixes, digits, number and ordinal words, words to number, slugs, fuzzy search, Persian sort, keyboard-layout fix, text stats and reading time, direction detection and bidi wrapping, safe truncation, lorem ipsum
Moneyrial/toman, grouped digits, price in words, VAT helper, Excel-safe CSV export, short forms (۲٫۵ میلیون), decimals/percents/fractions in words
RTL frontendguidelines prompt/resource, CSS and Tailwind audit, converters to logical properties, starter snippets, price input snippets, Persian font presets
Data31 provinces with ISO 3166-2 codes and capitals

Data notes

Bank BINs, Sheba codes, mobile prefixes and province data only include entries confirmed by public sources. Lunar (Hijri) holiday dates, vehicle plate parsing and national-ID city lookup are not included because reliable offline data could not be verified. The VAT helper needs you to supply the rate.

Develop

bash
npm installnpm run buildnpm testnpm run docs:tools   # regenerate TOOLS.md (a test fails if it is out of date)

Each tool is a small pure function in src/lib, registered in src/server.ts. Contributions are welcome.

Releasing

See the maintainer steps in RELEASING.md.

License

MIT

来源:README.md,提交 9a1e66f

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.3.0最新Oct 18, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分