Masnavi

ai.masnaviPublished by masnavi.aiOfficial publisherv1.0.0Updated Oct 24, 2026

Rumi's complete Masnavi (25,635 beyts) — search, quote, verify and explain. Free, no auth.

VerifiedStreamable HTTPWeb executableWeb Search & ScrapingKnowledge & Memory

Overview

AI-generated overview

Lets an assistant search, quote, verify and explain Rumi's Masnavi and Divan-e Shams from the canonical text instead of inventing verses.

What you can do
Provides full-text and semantic search over the 25,635 beyts of the Masnavi and the ghazals of the Divan-e Shams, in any language for meaning-based queries. Lookup tools fetch a specific beyt, section, range or ghazal by citation, and a verify tool checks whether a candidate quotation actually appears in the corpus. It also returns per-beyt commentary attributed to named scholars and a table of contents of the 972 sections.
When to use it
Use it when an assistant needs to quote or discuss Rumi and should ground citations in the source text, or when a user asks for verses on a theme, feeling or idea in a non-Persian language. The verify tool is meant to be run before quoting Rumi to avoid misattribution.
Requirements
A remote Streamable HTTP endpoint; no authentication, API keys or environment variables are declared. Network access to the hosted service is required.
Before you install
The service is read-only and free, so it does not write, send or delete user data. Commentary entries carry a confidence label such as ai-draft, so AI-drafted commentary should not be treated as reviewed scholarship. Meaning-based matches are approximate and the input advises verifying them against the full text before relying on them.

Installation

In SourceWeft

  1. Open Masnavi in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/ai.masnavi%2Fmasnavi/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "masnavi": {
      "type": "http",
      "url": "https://masnavi.ai/mcp"
    }
  }
}

README

masnavi.ai — Rumi's Masnavi as an MCP server

The complete Masnavi-ye Maʿnavi of Jalāl al-Dīn Rūmī — all 25,635 beyts (couplets) in 6 daftars, 972 sections — served as a free, public, read-only Model Context Protocol server. Your agent can search, quote, verify, and explain Rumi from the canonical text instead of inventing him.

Connect

json
{ "mcpServers": { "masnavi": { "type": "http", "url": "https://masnavi.ai/mcp" } } }

Claude Code: claude mcp add --transport http masnavi https://masnavi.ai/mcp

Tools (9)

ToolWhat it does
searchfull-text search across all 25,635 beyts, ranked
lookupa beyt by citation (M1:1 = daftar 1, beyt 1) with neighbours
verifyis this really a line by Rumi? fuzzy-checks a quotation against the corpus
get_sectionone named section (story) with all its beyts
get_rangea full multi-section story in one call (≤500 beyts)
find_sectionsfind a story by (Persian) title fragment
table_of_contentsthe 972 sections, by daftar
random_beyta random couplet
explainper-beyt commentary by named scholars

Citations use M{daftar}:{beyt} (e.g. M3:1278). Text sourced from Ganjoor; the Masnavi is in the public domain.

Why

Language models routinely misattribute Persian poetry. This server exists so agents can ground every Rumi quotation in the canonical text — search it, cite it, and verify it — in any language.

This repository holds the public metadata for the hosted server at masnavi.ai; the service itself runs at the endpoint above.

Source: README.md at commit 5e12a85

Tools

13

search_meaning

Semantic search: find the beyts closest in MEANING to the query, in ANY language — English, Persian, Spanish, Turkish, Arabic, … . Use this when you have a theme, feeling, or idea rather than exact Persian words (e.g. 'feeling separated from your origin' → M1:1). Each hit carries a cosine-similarity score. status='unavailable' means the vector index is not built yet — fall back to `search`.

Parameterslimitqueryrequireddaftar

lookup

Fetch a specific beyt by its citation (e.g. 'M3:1278'), by daftar+beyt number, or by global beyt index. Optionally include surrounding beyts for context.

Parametersafterbeforedaftarcitationbeyt_globalbeyt_in_daftar

verify

Given a candidate quote attributed to Rumi's Masnavi, check whether it actually appears. Returns status='exact' (with citation), 'fuzzy' (with similar candidates), or 'not_found'. USE THIS BEFORE QUOTING RUMI to avoid hallucination.

Parameterstextrequiredfuzzy_threshold

get_section

Retrieve a full section (story / بخش) with all its beyts.

Parametersslugsection_id

table_of_contents

Browse the Masnavi's section list. Returns titled sections per daftar with beyt counts and ranges.

Parametersdaftar

random_beyt

Return a randomly-selected beyt, optionally restricted to a daftar.

Parametersdaftar

get_range

Fetch ALL beyts between two endpoints, inclusive, grouped by section. Use this — NOT many calls to get_section or lookup — when a user asks for a full story, a long passage, or a sequence of beyts spanning multiple sections. Endpoints are canonical citations like 'M2:2608' and 'M2:2775', or global indices via start_global / end_global. Max range: 500 beyts.

Parametersendstartend_globalstart_global

find_sections

Find sections (stories) by TITLE. Exact words first (phrase, then AND-of-tokens); when NO title contains the words, falls back to MEANING matches in any language (hits carry match='meaning' + a cosine score — verify with get_section before relying on one). Each match includes `first_citation` and `last_citation` — ready-to-use canonical citations (e.g. 'M2:2608'). To read a whole multi-section story, call get_range with the FIRST match's `first_citation` as start and the LAST match's `last_citation` as end. Do NOT construct a citation from `first_beyt_global` — that is a GLOBAL index (1..25635), not a daftar-local beyt number. Example: find_sections('ابلیس معاویه', daftar=2).

Parameterslimitqueryrequireddaftar

explain

Get commentary (Persian + English) for a specific beyt of the Masnavi, attributed to a primary source (e.g. Abdolkarim Soroush's lectures). Returns the beyt text along with structured commentary entries. Each entry has source, author, language, body markdown, and confidence ('ai-draft' / 'reviewed' / 'verbatim'). Use this when a user asks 'what does this beyt mean' or 'what does <scholar> say about M1:1'.

Parameterscitationrequired

search_divan

Full-text search across the 34,603 beyts of the ghazals of the Divan-e Shams (Divan-e Kabir) — Rumi's lyric work, distinct from the Masnavi. Returns beyts with divan citations (G{ghazal}:{beyt}, e.g. G1393:1). Use when you know the exact Persian words; use search_divan_meaning for a theme in any language.

Parameterslimitqueryrequiredoffset

search_divan_meaning

Semantic search over the Divan-e Shams ghazals: given a theme, feeling, or idea in ANY language, returns the GHAZALS closest in meaning — each with its best-matching couplet as a preview and a cosine score. Both couplet-level and whole-ghazal vectors are searched, so a ghazal whose overall theme matches is found even when no single couplet does. Fetch a full ghazal with get_ghazal. status='unavailable' means the index is not built — fall back to search_divan.

Parameterslimitqueryrequired

get_ghazal

Fetch ONE complete ghazal of the Divan-e Shams by its canonical number (1..3230) or citation ('G1393' / 'G1393:2'). Returns every beyt plus prev/next ghazal numbers. Famous example: get_ghazal(1393) = «مرده بدم زنده شدم…».

Parametersnumbercitation

Version history

1
  1. v1.0.0LatestSep 16, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.