An MCP server for Ganjoor the largest public archive of Persian classical poetry — exposing the read-only public API to AI agents.
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
claude mcp add ganjoor -- npx -y ganjoor-mcp-server{
"mcpServers": {
"ganjoor": {
"command": "npx",
"args": ["-y", "ganjoor-mcp-server"]
}
}
}Resumen de MCP Servers
# [](https://github.com/ganjoor)
<div align="center">
[]([CHANGELOG.md](https://www.npmjs.com/package/ganjoor-mcp-server))
[](package.json)
[](LICENSE)
</div>
<div align="center">
**English** | [فارسی](README.fa.md)
</div>
**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](#install)
- [Docker](#docker)
- [Configuration](#configuration)
- [Concepts](#concepts)
- [Tool reference](#tool-reference)
- [Response formats](#response-formats)
- [Usage](#usage)
- [Architecture](#architecture)
- [Development](#development)
- [Known limitations](#known-limitations)
- [Evaluation](#evaluation)
- [Contributing](#contributing)
---
## Install
Requires Node.js 18.17 or newer.
```bash
npm install ganjoor-mcp-server
```
### VS Code
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.
[](https://vscode.dev/redirect/mcp/install?name=io.github.ehsanghaffar%2Fganjoor-mcp-server&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22ganjoor-mcp-server%22%5D%2C%22env%22%3A%7B%7D%7D)
Or add to `.vscode/mcp.json`:
```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.
[](https://cursor.com/en/install-mcp?name=io.github.ehsanghaffar%2Fganjoor-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImdhbmpvb3ItbWNwLXNlcnZlciJdLCJlbnYiOnt9fQ==)
Or add to your MCP config file:
```json
{
"mcpServers": {
"io.github.ehsanghaffar/ganjoor-mcp-server": {
"command": "npx",
"args": [
"-y",
"ganjoor-mcp-server"
],
"env": {},
"type": "local",
"tools": [
"*"
]
}
}
}
```
### Other clients
<details>
<summary>Claude Code</summary>
Use the Claude Code CLI to add the io.github.ehsanghaffar/ganjoor-mcp-server MCP server:
```bash
claude mcp add io.github.ehsanghaffar/ganjoor-mcp-server npx -y ganjoor-mcp-server
```
</details>
<details>
<summary>Claude Desktop</summary>
Follow the MCP install [guide](https://modelcontextprotocol.io/quickstart/user), use the standard config above.
</details>
<details>
<summary>Codex</summary>
Create or edit the configuration file `~/.codex/config.toml` and add:
```toml
[mcp_servers.io.github.ehsanghaffar/ganjoor-mcp-server]
command = "npx"
args = ["-y", "ganjoor-mcp-server"]
```
For more information, see the [Codex MCP documentation](https://github.com/openai/codex/blob/main/codex-rs/config.md#mcp_servers).
</details>
<details>
<summary>Gemini CLI</summary>
Follow the MCP install [guide](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md#configure-the-mcp-server-in-settingsjson), use the standard config above.
</details>
<details>
<summary>OpenCode</summary>
Follow the MCP Servers [documentation](https://opencode.ai/docs/mcp-servers/). For example in `~/.config/opencode/opencode.json`:
```json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"io.github.ehsanghaffar/ganjoor-mcp-server": {
"type": "local",
"command": [
"npx",
"-y",
"ganjoor-mcp-server"
],
"enabled": true
}
}
}
```
</details>
<details>
<summary>GitHub Copilot CLI</summary>
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`
```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](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers).
</details>
<details>
<summary>GitHub Copilot Coding Agent</summary>
GitHub Copilot Coding Agent can use MCP servers to extend its capabilities. Use the configuration below specifically formatted for the Coding Agent:
```json
{
"mcpServers": {
"io.github.ehsanghaffar/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](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/extend-coding-agent-with-mcp).
</details>
### Install from this source
```bash
npm install
npm run build
npm start # stdio transport (default)
```
#### VS Code
Add to `.vscode/mcp.json`:
```json
{
"servers": {
"ganjoor": {
"type": "stdio",
"command": "node",
"args": ["${workspaceFolder}/dist/index.js"]
}
}
}
```
#### Claude Desktop / Cursor
Add to your MCP config file:
```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
```bash
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.
```bash
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:
```bash
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:
```bash
docker compose --profile stdio run --rm ganjoor-mcp-stdio
```
### With Claude Desktop
To run the server through Docker instead of a local Node install:
```json
{
"mcpServers": {
"ganjoor": {
"command": "docker",
"args": ["run", "--rm", "-i", "ganjoor-mcp"]
}
}
}
```
---
## Configuration
All settings are environment variables; none are required.
| Variable | Default | Purpose |
| --- | --- | --- |
| `HTTP` | *(unset)* | Set to `true` to serve streamable HTTP instead of stdio. |
| `PORT` | `3000` | HTTP port. |
| `HOST` | `127.0.0.1` | HTTP bind address. |
| `ALLOWED_ORIGINS` | *(empty)* | Extra allowed `Origin` values, comma-separated. |
| `GANJOOR_API_BASE_URL` | `https://api.ganjoor.net` | Upstream API base URL — point at a local RMuseum instance for development. |
| `GANJOOR_SITE_BASE_URL` | `https://ganjoor.net` | Front-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.
```mermaid
graph TD
P["Poet — e.g. Hafez, id 2, slug /hafez"] --> C1["Category — e.g. Ghazals, id 24"]
P --> C2["Category — e.g. Qeta, id 25"]
C1 --> M1["Poem — e.g. Ghazal 494, id 2623, /hafez/ghazal/sh494"]
C2 --> M2["Poem"]
M1 --> V["Verses (hemistichs, paired into couplets)"]
M1 --> S["Sections (nested stanzas with metre + rhyme)"]
M1 --> R["Recitations (audio)"]
M1 --> CM["Comments (reader commentary)"]
M1 --> Q["Quoted / related poems"]
```
- **Poet** — an author. Hafez is poet id `2`, Saadi `7`, Rumi `5`, Khayyam `3`, FerLo que la gente pregunta sobre ganjoor-mcp-server
¿Qué es ganjoor/ganjoor-mcp-server?
+
ganjoor/ganjoor-mcp-server es mcp servers para el ecosistema de Claude AI. An MCP server for Ganjoor the largest public archive of Persian classical poetry — exposing the read-only public API to AI agents. Tiene 7 estrellas en GitHub y su última actualización registrada es del 2026-10-15.
¿Cómo se instala ganjoor-mcp-server?
+
Puedes instalar ganjoor-mcp-server clonando el repositorio (https://github.com/ganjoor/ganjoor-mcp-server) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar ganjoor/ganjoor-mcp-server?
+
Nuestro agente de seguridad ha analizado ganjoor/ganjoor-mcp-server y le ha asignado un Trust Score de 95/100 (tier: Verified). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene ganjoor/ganjoor-mcp-server?
+
ganjoor/ganjoor-mcp-server es mantenido por ganjoor. La última actividad registrada en GitHub es del 2026-10-15, con 0 issues abiertos.
¿Hay alternativas a ganjoor-mcp-server?
+
Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.
Despliega ganjoor-mcp-server en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
[](https://claudewave.com/repo/ganjoor-ganjoor-mcp-server)<a href="https://claudewave.com/repo/ganjoor-ganjoor-mcp-server"><img src="https://claudewave.com/api/badge/ganjoor-ganjoor-mcp-server" alt="Featured on ClaudeWave: ganjoor/ganjoor-mcp-server" width="320" height="64" /></a>Más MCP Servers
Reverse engineer anything with agents, from app behavior down to native binaries.
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev