Ganjoor MCP Server logo

Ganjoor MCP Server

An MCP server for Ganjoor the largest public archive of Persian classical poetry — exposing the read-only public API to AI agents.

Install Ganjoor MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 44 tools correctly (7d ago).

Overview

Tools44

What Ganjoor MCP Server lets your agent do. Expand a tool for its parameters.

Verified live~16.8k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

What it can do

From the 44 tools this server returned when we ran it; 44 declare their own safety hints.

Makes network requests · 44Read-only tools · 44
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age6 days
Maintainers1

Observed 2026-10-21 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 8d ago via OSV.dev · ganjoor-mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars7Stargazers on the source repository.
npm downloads299Package downloads in the last 30 days.
Last commit5d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed44Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

From the project README

GANJOOR MCP SERVER: MCP server for the Ganjoor (گنجور) Persian classical poetry API

VERSION: 0.1.0 PLATFORM: Node >=18.17 LICENSE: MIT Ganjoor on mcprush

English | فارسی

Ganjoor MCP Server — the Model Context Protocol server for the Ganjoor Persian poetry API.

It lets an agent browse poets and collections, read poems with their verses, run prosody and rhyme analysis, trace reply-poems across poets, look up recitations and commentary, and explore the related-people and family-tree graphs.

44 tools, read-only access. No API key required.


Contents


Install

Requires Node.js 18.17 or newer.

Terminal
npm install ganjoor-mcp-server # for locally installed stdio transport. no need if using VS Code or Claude Desktop / Cursor.

VS Code

No need install npm package — the MCP server runs in-process and is launched by VS Code when needed.

Just click the badge below to install the Ganjoor MCP server in your VS Code workspace. It will automatically add the server to your .vscode/mcp.json config.

Install in VS Code

Or add to .vscode/mcp.json:

config.json
{
  "servers": {
    "io.github.ehsanghaffar/ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ],
      "env": {}
    }
  }
}

VS Code CLI:

bash
code --add-mcp '{\"name\":\"io.github.ehsanghaffar/ganjoor-mcp-server\",\"command\":\"npx\",\"args\":[\"-y\",\"ganjoor-mcp-server\"],\"env\":{}}'

Claude Desktop / Cursor

Just click the badge below to install the Ganjoor MCP server in your Claude Desktop or Cursor app. It will automatically add the server to your MCP config.

Install in Cursor

Or add to your MCP config file:

config.json
{
  "mcpServers": {
    "io.github.ehsanghaffar/ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ],
      "env": {},
      "type": "local",
      "tools": [
        "*"
      ]
    }
  }
}

Other clients

Claude Code

Use the Claude Code CLI to add the io.github.ehsanghaffar/ganjoor-mcp-server MCP server:

Terminal
claude mcp add io.github.ehsanghaffar/ganjoor-mcp-server npx -y ganjoor-mcp-server
Claude Desktop

Follow the MCP install guide, use the standard config above.

Codex

Create or edit the configuration file ~/.codex/config.toml and add:

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

For more information, see the Codex MCP documentation.

Gemini CLI

Follow the MCP install guide, use the standard config above.

OpenCode

Follow the MCP Servers documentation. For example in ~/.config/opencode/opencode.json:

config.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "io.github.ehsanghaffar/ganjoor-mcp-server": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "ganjoor-mcp-server"
      ],
      "enabled": true
    }
  }
}
GitHub Copilot CLI

GitHub Copilot CLI supports adding MCP servers interactively and through a config file.

Option 1: Interactive setup with /mcp add

  1. Open GitHub Copilot CLI in interactive mode.
  2. Run /mcp add.
  3. Enter Server Name: io.github.ehsanghaffar/ganjoor-mcp-server.
  4. Choose Server Type:
    • STDIO for command-based servers
    • HTTP for remote servers
  5. Fill in command/url settings from the standard config above and set Tools to *.
  6. Press Ctrl+S to save.

Option 2: Edit ~/.copilot/mcp-config.json

config.json
{
  "mcpServers": {
    "io.github.ehsanghaffar/ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ],
      "env": {},
      "type": "local",
      "tools": [
        "*"
      ]
    }
  }
}

For more information, see the GitHub Copilot CLI MCP documentation.

GitHub Copilot Coding Agent

GitHub Copilot Coding Agent can use MCP servers to extend its capabilities. Use the configuration below specifically formatted for the Coding Agent:

config.json
{
  "mcpServers": {
    "ganjoor-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ganjoor-mcp-server"
      ],
      "env": {},
      "type": "local",
      "tools": [
        "*"
      ]
    }
  }
}

Add this configuration to your repository settings under Copilot > Coding agent. The "tools": ["*"] setting enables all available tools from the MCP server.

For more information, see the GitHub Copilot Coding Agent MCP documentation.

Install from this source

Terminal
npm install
npm run build
npm start            # stdio transport (default)

VS Code

Add to .vscode/mcp.json:

config.json
{
  "servers": {
    "ganjoor": {
      "type": "stdio",
      "command": "node",
      "args": ["${workspaceFolder}/dist/index.js"]
    }
  }
}

Claude Desktop / Cursor

Add to your MCP config file:

config.json
{
  "mcpServers": {
    "ganjoor": {
      "command": "node",
      "args": ["/absolute/path/to/ganjoor-mcp/dist/index.js"]
    }
  }
}

Streamable HTTP (remote / shared deployment)

bash
HTTP=true PORT=3000 npm start

The MCP endpoint is POST /mcp, and GET /health reports server and upstream status. The HTTP transport runs statelessly (a fresh server instance per request), so it scales horizontally. It binds 127.0.0.1 by default and validates the Origin header to block DNS-rebinding attacks; set ALLOWED_ORIGINS (comma-separated) if you need non-loopback origins.

MCP Inspector

Terminal
npm run inspector

Docker

A multi-stage Dockerfile and a docker-compose.yml are included. The image is built on node:22-alpine and contains only the compiled output and production dependencies.

Terminal
docker compose up --build

The compose file starts the server in streamable HTTP mode on http://localhost:3000/mcp, with GET /health reporting server and upstream status. HOST is set to 0.0.0.0 so the published port is reachable from the host; every configuration variable from the table below works as an ordinary environment variable. To run a single container without compose:

Terminal
docker build -t ganjoor-mcp .
docker run --rm -p 3000:3000 -e HTTP=true -e HOST=0.0.0.0 ganjoor-mcp

stdio transport over Docker

Clients that launch the server themselves (rather than connecting over HTTP) can use the stdio profile, which opens stdin for the protocol stream and starts no HTTP listener:

Terminal
docker compose --profile stdio run --rm ganjoor-mcp-stdio

With Claude Desktop

To run the server through Docker instead of a local Node install:

config.json
{
  "mcpServers": {
    "ganjoor": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "ganjoor-mcp"]
    }
  }
}

Configuration

All settings are environment variables; none are required.

VariableDefaultPurpose
HTTP(unset)Set to true to serve streamable HTTP instead of stdio.
PORT3000HTTP port.
HOST127.0.0.1HTTP bind address.
ALLOWED_ORIGINS(empty)Extra allowed Origin values, comma-separated.
GANJOOR_API_BASE_URLhttps://api.ganjoor.netUpstream API base URL — point at a local RMuseum instance for development.
GANJOOR_SITE_BASE_URLhttps://ganjoor.netFront-end base used to build clickable links.

Concepts

Ganjoor's data model has three nested levels. Getting these straight is the difference between a productive and a fruitless agent session.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Ganjoor MCP Server

ganjoor-mcp-server is an MCP server that exposes Ganjoor’s read-only public API to AI agents. It provides 44 tools for browsing Persian classical poets and collections, reading poems and verses, analyzing prosody and rhyme, tracing reply-poems, finding recitations and commentary, and exploring related-people and family-tree graphs. No API key is required.

Install ganjoor-mcp-server with Node.js 18.17 or newer by running `npm install ganjoor-mcp-server` for a local stdio setup, or configure an MCP client to run `npx -y ganjoor-mcp-server`.

No, ganjoor-mcp-server does not require an API key. It provides read-only access to Ganjoor’s public API.

ganjoor-mcp-server lets AI agents browse poets and collections, read poems and verses, run prosody and rhyme analysis, trace reply-poems across poets, look up recitations and commentary, and explore related-people and family-tree graphs.

ganjoor-mcp-server can be configured for VS Code, Claude Desktop, Cursor, Claude Code, and Codex using the documented `npx -y ganjoor-mcp-server` command.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGanjoor MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/ganjoor-mcp-server?style=directory)](https://allmcps.com/mcp/ganjoor-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/ganjoor-mcp-server"><img src="https://allmcps.com/api/badge/ganjoor-mcp-server?style=directory" alt="Ganjoor MCP Server on AllMCPs" /></a>