How emircanok/resmi-gazete-mcp works
This MCP server exposes four Official Gazette tools to LLM clients over stdio: retrieve an issue index, read an article, search index titles across dates, and extract PDF text. Each request is validated and dispatched by the server; tool modules fetch and parse Gazette content, with HTTP caching backed by local disk. Source excerpts show the tool dispatch and fetch/parsing paths. The README documents all four capabilities; no separate external-service implementation is included.
Main entry points: http.ts HTTP fetch · server.ts MCP server · getFihrist.ts Get fihrist · readArticle.ts Read article
Components 13
MCP entry
- Stdio transport
src/index.ts - MCP server
src/server.ts
Gazette tools
- Get fihrist
src/tools/getFihrist.ts - Read article
src/tools/readArticle.ts - Search Gazette
src/tools/searchGazette.ts - Extract PDF
src/tools/extractPdf.ts
Content processing
- Fihrist parser
src/parse/fihrist.ts - Article parser
src/parse/article.ts - Result models
src/types.ts
Fetch and cache
- HTTP fetch
src/http.ts - Disk cache
src/cache.ts
Other components
- LLM client
- Official Gazette
Connections 17
- LLM client → Stdio transport: uses tools
README.md - Stdio transport → MCP server: connects
src/index.ts - MCP server → Get fihrist: dispatches
src/server.ts - MCP server → Read article: dispatches
src/server.ts - MCP server → Search Gazette: dispatches
src/server.ts - MCP server → Extract PDF: dispatches
src/server.ts - Search Gazette → Get fihrist: gets indexes
src/tools/searchGazette.ts - Get fihrist → HTTP fetch: fetches index
src/tools/getFihrist.ts - Get fihrist → Fihrist parser: parses HTML
src/tools/getFihrist.ts - Read article → HTTP fetch: fetches article
src/tools/readArticle.ts - Read article → Article parser: parses HTML
src/tools/readArticle.ts - Extract PDF → HTTP fetch: downloads PDF
src/tools/extractPdf.ts - Fihrist parser → Result models: returns index model
src/parse/fihrist.ts - Article parser → Result models: returns article model
src/parse/article.ts - HTTP fetch → Disk cache: reads and writes
src/http.ts - HTTP fetch → Official Gazette: requests content
src/http.ts - Official Gazette → HTTP fetch: returns responses
src/http.ts