# Ganjoor MCP Server

> Ganjoor MCP Server is an open-source MCP server for books and literature. Persian classical poetry for assistants: poets, poems, prosody, recitations and relations. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/ganjoor/ganjoor-mcp-server
- **MCP Registry name:** io.github.ehsanghaffar/ganjoor-mcp-server
- **Categories:** [books and literature](https://ai-powered.com/categories/books-and-literature)
- **Listing updated:** 2026-11-23

## About

This server wraps the public Ganjoor API at ganjoor.net, the Persian classical poetry library. Its README lists 44 read-only tools, and no API key is needed. An agent can browse poets and collections, read poems verse by verse, run prosody and rhyme analysis, follow reply-poems across poets, find recitations and commentary, and explore related-people and family-tree graphs.

It runs as an npm package over stdio and works with VS Code, Claude Desktop, Cursor, Claude Code, Codex, Gemini CLI, OpenCode and GitHub Copilot. There is also a stateless streamable HTTP mode with POST /mcp and GET /health, which binds to localhost by default and validates the Origin header against DNS rebinding. A Dockerfile and compose file are included, and the project has a Persian README.

It needs Node.js 18.17 or newer. The README sets out a concepts section, tool reference, response formats, known limitations and an evaluation.

## Features

- **44 read-only tools:** Covers poets, collections, poems, verses, recitations and commentary.
- **Prosody and rhyme:** Can analyse the metre and rhyme of poems.
- **Reply-poems:** Traces poems written in answer to other poets' works.
- **Relationship graphs:** Explores related people and family trees.
- **Two transports:** stdio by default, or stateless streamable HTTP.
- **No API key:** Works against the public Ganjoor API without credentials.

## Good for

- Read a poem and its verses by a classical Persian poet
- Analyse the metre of a verse
- Find who answered a poem with a reply-poem
- Look up recitations or commentary for a poem
- Map relations between poets

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add ganjoor-mcp-server -- npx -y ganjoor-mcp-server
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "ganjoor-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add ganjoor-mcp-server -- npx -y ganjoor-mcp-server
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.ganjoor-mcp-server]
command = "npx"
args = ["-y", "ganjoor-mcp-server"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user ganjoor-mcp-server npx -- -y ganjoor-mcp-server

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ]
    }
  }
}
```

## FAQ

### Do I need an API key?

No. The README says access is read-only and no key is required.

### Which Node version is needed?

Node.js 18.17 or newer.

### Can I run Ganjoor MCP Server as a remote HTTP service?

Yes. Set HTTP=true and the endpoint is POST /mcp, with GET /health for status; Docker support is included.

### Which clients are documented?

VS Code, Claude Desktop, Cursor, Claude Code, Codex, Gemini CLI, OpenCode and GitHub Copilot.

### Is Ganjoor MCP Server free?

Yes. Ganjoor MCP Server is open source, so you can use and self-host it for free.

### How do I add Ganjoor MCP Server to Claude Code?

Run this command in your terminal: claude mcp add ganjoor-mcp-server -- npx -y ganjoor-mcp-server

### What are the best alternatives to Ganjoor MCP Server?

The closest alternatives to Ganjoor MCP Server are Ganjoor Poetry, Openlibrary MCP, Bublate, Shprd Bible and Threefold · Precepts Study Bible.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Ganjoor Poetry](https://ai-powered.com/mcp/ganjoor-poetry): Ganjoor Poetry is a free MCP server for public data.
- [Openlibrary MCP](https://ai-powered.com/mcp/openlibrary-mcp): Openlibrary MCP is an open-source MCP server for books and literature.
- [Bublate](https://ai-powered.com/mcp/bublate): Bublate is a freemium MCP server for design and media.
- [Shprd Bible](https://ai-powered.com/mcp/shprd-bible): Shprd Bible is a free MCP server for books and literature.
- [Threefold · Precepts Study Bible](https://ai-powered.com/mcp/threefold-precepts-study-bible): Threefold · Precepts Study Bible is a free MCP server for religion.
- [Mozaika Books Catalog](https://ai-powered.com/mcp/mozaika-books-catalog): Mozaika Books Catalog is an MCP server for books and literature.
- [一孔录《论语》 Yikonglu Analects](https://ai-powered.com/mcp/yikonglu-analects): 一孔录《论语》 Yikonglu Analects is a free MCP server for books and literature.
- [List Of Books](https://ai-powered.com/mcp/list-of-books): List Of Books is a freemium MCP server for books and literature.

---
Source: https://ai-powered.com/mcp/ganjoor-mcp-server
