The Masnaviof Jalāl al-Dīn Rumi — read by humans & machines
مثنوی معنوی
متنِ کاملِ مثنوی مولانا — برای خواندن و فهمِ انسان و هوش مصنوعی
سرآغاز
Mawlānā Jalāl al-Dīn Rūmī · Daftar I · Beyt 1
· M1:1
Where to go
Of this volume — دربارهٔ این مجموعه
متنِ کاملِ مثنوی معنوی — ۲۵٬۶۳۵ بیت در شش دفتر و ۹۷۲ بخش — نه چون کتابی برای دستِ انسان، بلکه همچون ابزاری برای ذهنهایی که اکنون بهجای ما میخوانند. masnavi.ai یک نقطهٔ اتصال MCP است: هر عاملِ هوش مصنوعی میتواند به آن رجوع کند و بهجای ساختنِ مولانا، خودِ او را بیابد. آزاد، رایگان و بینیاز به ثبتنام.
The full text of the Masnavi-ye Maʿnavi — twenty-five thousand six hundred and thirty-five beyts across six daftars, 972 named sections — bound here not as a book for human hands but as an instrument for the minds that now read on our behalf. masnavi.ai is a Model Context Protocol (MCP) endpoint: any AI agent on the open web may consult it, and so reach for Rumi rather than invent him.
It is open, free, and anonymous. There is nothing to register for; nothing is logged about who asks. The corpus is sourced from Ganjoor and normalised for full-text search. Citations are stable. Verification is the design intent — when an agent suspects a Rumi quote may be fabricated, this endpoint will refuse to confirm what is not there.
Nine instruments
(query, daftar?, limit?, offset?)
(citation, before?, after?)
(text, fuzzy_threshold?)
(section_id | slug)
(start, end | start_global, end_global)
get_range.
(query, daftar?, limit?)
(daftar?)
(daftar?)
(citation)
The six daftars — tap a book to open it
The poem is in six books. Citations on this server follow
M{daftar}:{beyt} — for example M3:1278 is
Daftar III, beyt 1278. A global index g:{n} from 1 to 25,635
is also accepted.
- ۱دفتر اوّل۴٬۰۱۳ بیت
- ۲دفتر دوم۳٬۸۱۹ بیت
- ۳دفتر سوم۴٬۸۰۹ بیت
- ۴دفتر چهارم۳٬۸۵۰ بیت
- ۵دفتر پنجم۴٬۲۳۳ بیت
- ۶دفتر ششم۴٬۹۱۱ بیت
To connect
In Claude.ai or any MCP-aware client, paste the URL above into Settings → Connectors → Add custom connector. In a terminal with Claude Code:
$ claude mcp add --transport http masnavi https://masnavi.ai/mcp
ChatGPT (any Plus user) & Gemini. Their consumer apps don't speak MCP yet, but both let you wire up a normal REST API. An OpenAPI spec for the same nine tools is published at:
More clients — paste-and-go instructions
Claude.ai (web)
- Sign in at claude.ai.
- Settings → Connectors → Add custom connector.
- Name
masnavi· URLhttps://masnavi.ai/mcp· save.
Requires Claude Pro / Team / Enterprise.
Claude Desktop
Newer builds: Settings → Connectors → Add custom connector. Or edit the config file directly:
{
"mcpServers": {
"masnavi": { "type": "http", "url": "https://masnavi.ai/mcp" }
}
}
ChatGPT — Custom GPT (any Plus plan)
Easiest path. Works on standard Plus, no Developer Mode needed:
- chatgpt.com → your name (top-right) → My GPTs → Create.
- In the editor, click the Configure tab.
- Scroll to Actions → Create new action.
- Schema → Import from URL → paste
https://masnavi.ai/api/openapi.json. - Authentication: None. Privacy policy URL:
https://masnavi.ai/. - Save the GPT. Use it: "Verify the beyt «بشنو این نی…» using the action."
ChatGPT — Native MCP (Pro / Business / Enterprise / Edu)
If you have one of these tiers and prefer the MCP transport:
- Settings → Connectors → Advanced → enable Developer Mode if needed.
- Add custom connector · MCP URL
https://masnavi.ai/mcp· auth None.
Gemini — via REST API
The consumer Gemini app doesn't accept arbitrary MCP servers yet, but Gemini's function-calling and Gemini CLI accept either MCP or REST:
- Gemini CLI: edit
~/.gemini/settings.json, use thehttpUrlform (snippet below). - Gemini API / Google AI Studio: add the OpenAPI spec at
https://masnavi.ai/api/openapi.jsonas a custom tool. Or use plain HTTP from your function-calling code. - Gems / Workspace: not yet — Google hasn't shipped arbitrary tool import for those.
Cursor & VS Code
One click: ↗ Add to Cursor ↗ Add to VS Code
Gemini CLI — config snippet
Edit ~/.gemini/settings.json (note: Gemini uses httpUrl):
{
"mcpServers": {
"masnavi": { "httpUrl": "https://masnavi.ai/mcp" }
}
}
Plain curl / any HTTP client
curl 'https://masnavi.ai/api/search?q=عشق&limit=3'
curl 'https://masnavi.ai/api/lookup?citation=M1:1'
curl 'https://masnavi.ai/api/verify?text=بشنو این نی چون شکایت میکند'
REST is GET-only, public, returns JSON. See the full spec at /api/openapi.json, browse at /api/docs.
Anything else (Cline, Continue, Roo, Windsurf, custom code)
MCP — streamable HTTP, no auth:
{
"mcpServers": {
"masnavi": { "type": "http", "url": "https://masnavi.ai/mcp" }
}
}
Or call the REST API directly. Both surfaces speak the same nine tools.
Try it
- “Use masnavi to look up M1:1 with two beyts of context.”
- “Search the Masnavi for verses about خاموش.”
- “Verify if «بشنو این نی چون شکایت میکند» is from the Masnavi.”
- “Give me a random beyt from دفتر سوم and explain it.”
Text drawn from Ganjoor, the open archive of classical Persian poetry. Normalised into a single SQLite database with FTS5 full-text search. 25,635 beyts — within rounding of Reynold Nicholson's critical edition. The Masnavi is in the public domain. This service is offered to the agents that read.
tool reference · llms.txt · v0.2.0