shayari-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@shayari-mcp दोस्ती पर शायरी खोजो"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Shayari: Devanagari-first shayari search MCP
A small, reproducible Python package for searching and reading Hindi/Devanagari shayari. The user-facing language is Hindi. Urdu is not required for search or reading, and this project does not transliterate or generate missing Hindi text.
Status
The first milestone uses the approved Kaggle source:
Kaggle version 1, downloaded without credentials
1,314 source stems, 30 poets
1,306 Hindi files, of which one is empty
1,305 source-valid Hindi-text records are active by explicit owner authorization. Nine source stems remain quarantined because they have no usable Hindi text.
The source metadata declares CC0, but the underlying Rekhta-derived rights are not independently verified. Read corpus/SOURCE.md before redistribution.
Related MCP server: video-evidence-mcp
Design decisions
text_devanagariis the canonical field and is required for active records.No Urdu-to-Devanagari transliteration, translation, repair, or generation occurs.
Invalid or incomplete records are written to quarantine, never silently indexed.
title_devanagariandpoet_devanagariremain optional because the inspected archive supplies only Roman source-path metadata.title_sourceandpoet_sourcepreserve that metadata explicitly; it is searchable but is not mislabeled as Hindi.Downloaded archives are ignored by Git. The generated active snapshot is versioned so a fresh checkout can search immediately; it contains no credentials.
Requirements
Python 3.9+
pytestfor testsOptional: the
mcpPython package for the standard MCP server adapter
The core importer, validator, search service, and CLI use only the Python standard library.
Reproduce the corpus
From the project root, place the downloaded archive at .cache/urdu-ghazals-rekhta.zip, then run:
PYTHONPATH=src python3 scripts/import_kaggle.py .cache/urdu-ghazals-rekhta.zipThe command writes these files under corpus/generated/:
records.jsonl: active, owner-authorized source-valid records. Every record retains explicit provenance and authorization-status fields.research.jsonl: empty under the default owner-authorized policy; available when using--activation-policy research_onlyfor comparison.quarantine.jsonl: rejected or incomplete source stems with reasonsaudit.json: counts, source version, checksum, script distribution, and activation policy
To audit an existing generated directory:
PYTHONPATH=src python3 scripts/audit_corpus.py corpus/generatedCLI
Search the active, owner-authorized Hindi Devanagari corpus:
PYTHONPATH=src python3 -m shayari search 'दोस्ती' --limit 5
PYTHONPATH=src python3 -m shayari search 'मोहब्बत' --limit 5The default importer policy is owner_authorized, which activates every source-valid Devanagari record while preserving the source's provenance and limitations. The activation is an owner decision, not a claim of independent legal or linguistic verification. To reproduce the earlier research-only layout explicitly:
PYTHONPATH=src python3 scripts/import_kaggle.py .cache/urdu-ghazals-rekhta.zip --activation-policy research_onlyThe current source has 1,305 active records after import. The remaining nine source stems stay quarantined because they have missing or empty Hindi text.
PYTHONPATH=src python3 -m shayari statusSet SHAYARI_CORPUS if the generated corpus lives outside corpus/generated:
SHAYARI_CORPUS=/path/to/generated shayari statusThe explicitly named research-only MCP tool is available for inspection.
Search title and poet fields too, and inspect a result by ID:
PYTHONPATH=src python3 -m shayari show <record-id>
PYTHONPATH=src python3 -m shayari auditAll normal search results include the full text_devanagari field.
MCP server
The package exposes a stdio server through either the shayari-mcp command or the module entry point. With the optional mcp dependency installed:
python3 -m pip install 'mcp>=1.0,<2.0'
PYTHONPATH=src python3 -m shayari.mcp_server
# or, after installing this project:
shayari-mcpThe server tools are:
search_shayarisearch_research_shayari(explicitly non-active research inspection)get_shayariaudit_corpus
The handlers call the same lexical service as the CLI and return Hindi-facing fields by default. An in-process JSON-RPC-compatible fallback is included for local clients that do not have the optional SDK installed.
Example Hermes MCP configuration:
mcp_servers:
shayari:
command: python3
args: ["-m", "shayari.mcp_server"]
env:
PYTHONPATH: "/absolute/path/to/Shayari/src"Development
PYTHONPATH=src python3 -m pytest -q
ruff check src scripts tests
ruff format --check src scripts tests
mypy --python-version 3.9 src scripts
python3 -m build --wheel --sdistThe downloaded .cache/ archive is ignored. The versioned corpus/generated/ snapshot can be regenerated from it. Do not add credentials, tokens, or environment files to the repository.
Available Tools
4 toolsaudit_corpusA
Return verified corpus counts and provenance metadata.
Inputs: no named parameters.
get_shayariA
Get one active Hindi-facing shayari record by stable ID.
Inputs: id (required).
search_research_shayariB
Search source-valid but non-active research records.
Inputs: query (required), limit.
search_shayariB
Search active, owner-authorized Hindi Devanagari shayari text.
Inputs: query (required), poet, limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a distinctly scoped purpose: search active shayari, search research records, retrieve an active shayari by ID, and audit corpus metadata. No overlapping or ambiguous boundaries between tools.
All tools follow a consistent verb_noun snake_case pattern: search_shayari, search_research_shayari, get_shayari, audit_corpus. The naming uniformly uses clear verbs and nouns with no mixed conventions.
Four tools is well-scoped for a shayari corpus server, covering search (active and research), retrieval by ID, and audit. Each tool earns its place without redundancy or bloat.
The surface covers core search and retrieval for active shayari, plus audit metadata. However, there is no get_research_shayari by ID, meaning research records cannot be individually retrieved, leaving a minor gap for that workflow.
Related MCP Connectors
Read-only semantic search over Vedic scripture verses, commentaries, and recorded lectures.
Source-cited SEC filing search and retrieval with provenance and verification states.
Public Indian legal search MCP for Roop judgments, statutes, and corpus grounding.
Resolve, search and verify legal citations against the official sources, with provenance.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables read-only search over a curated, provenance-preserving corpus of EVM smart-contract security knowledge, providing tools for retrieving audit findings, document context, and source information.5MIT
- AlicenseNot gradedqualityCmaintenanceA self-hosted, read-only MCP service that searches public YouTube and Bilibili videos and produces compact evidence packages with verified metadata, timestamped captions or ASR, frames, OCR, and contact sheets for ChatGPT/Codex analysis.1GPL 3.0
- AlicenseBqualityCmaintenanceEnables users to maintain append-only content history with verified publication and social follow-through outcomes, search for overlaps, and run read-only integrity verification of stored snapshots.16MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP-capable agents to query a read-only 18-SKU product registry and verified 24-track catalog, with evidence-tied lookups, momentum scoring, skin configurations, and a hash-chain-verified ledger over stdio.MIT