{"id":48355145,"url":"https://github.com/deepsweet/mdn","last_synced_at":"2026-04-09T15:04:43.756Z","repository":{"id":348475775,"uuid":"1197573800","full_name":"deepsweet/mdn","owner":"deepsweet","description":"Offline-first MDN Web Docs RAG-MCP server ready for semantic search with hybrid vector and full‑text retrieval.","archived":false,"fork":false,"pushed_at":"2026-04-01T09:03:28.000Z","size":194,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-01T11:12:53.027Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepsweet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-31T17:34:40.000Z","updated_at":"2026-04-01T09:03:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/deepsweet/mdn","commit_stats":null,"previous_names":["deepsweet/mdn"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/deepsweet/mdn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepsweet%2Fmdn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepsweet%2Fmdn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepsweet%2Fmdn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepsweet%2Fmdn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepsweet","download_url":"https://codeload.github.com/deepsweet/mdn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepsweet%2Fmdn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31433044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T08:13:15.228Z","status":"ssl_error","status_checked_at":"2026-04-05T08:13:11.839Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-05T11:01:31.598Z","updated_at":"2026-04-09T15:04:43.750Z","avatar_url":"https://github.com/deepsweet.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Offline-first [MDN Web Docs](https://developer.mozilla.org/) RAG-MCP server ready for semantic search with hybrid vector (1024-d) and full‑text (BM25) retrieval.\n\n## Example\n\n![example screenshot](example.webp)\n\n## Content\n\nThe dataset covers the core MDN documentation sections, including:\n\n- Web API\n- JavaScript\n- HTML\n- CSS\n- SVG\n- HTTP\n\nSee [dataset repo](https://huggingface.co/datasets/deepsweet/mdn) on HuggigFace for more details.\n\n## Usage\n\n### 1. Download dataset and embedding model\n\n```sh\nnpx -y @deepsweet/mdn@latest download\n```\n\nBoth [dataset](https://huggingface.co/datasets/deepsweet/mdn) (\\~260 MB) and the [embedding model GGUF file](https://huggingface.co/deepsweet/bge-m3-GGUF-Q4_K_M) (\\~438 MB) will be downloaded directly from HugginFace and stored in its default cache location (typically `~/.cache/huggingface/`), just like the `hf download` command does.\n\n### 2. Setup RAG-MCP server\n\n```json\n{\n  \"mcpServers\": {\n    \"mdn\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@deepsweet/mdn@latest\",\n        \"server\"\n      ],\n      \"env\": {}\n    }\n  }\n}\n```\n\n\u003e [!TIP]\n\u003e Remove `@latest` for a full offline experience, but keep in mind that this will cache a fixed version without auto-updating.\n\nThe `stdio` server will spawn [llama.cpp](https://github.com/ggml-org/llama.cpp) under the hood, load the embedding model (~655 MB RAM/VRAM), and query the dataset – all on demand.\n\n## Settings\n\n| Env variable               | Default value                                                   | Description                                                                                                       |\n|----------------------------|-----------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| `MDN_DATASET_PATH`         | HuggingFace cache                                               | Custom dataset directory path                                                                                     |\n| `MDN_MODEL_PATH`           | HuggingFace cache                                               | Custom model file path                                                                                            |\n| `MDN_MODEL_TTL`            | `1800`                                                          | For how long llama.cpp with embedding model should be kept loaded in memory, in seconds; `0` to prevent unloading |\n| `MDN_QUERY_DESCRIPTION`    | `Natural language query for hybrid vector and full-text search` | Custom search query description in case your LLM does a poor job asking the MCP tool                              |\n| `MDN_SEARCH_RESULTS_LIMIT` | `3`                                                             | Total search results limit                                                                                        |\n| `HF_TOKEN`                 |                                                                 | Optional HuggingFace access token, helps with occasional \"HTTP 429 Too Many Requests\"                             |\n\n## To do\n\n- [x] automatically update and upload the dataset artifacts monthly with GitHub Actions\n- [ ] figure out a better query description so that LLM doesn't over-generate keywords\n- [ ] automatically prune old dataset revisions like `hf cache prune`\n\n## License\n\nThe RAG-MCP server itself and the processing scripts are available under MIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepsweet%2Fmdn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepsweet%2Fmdn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepsweet%2Fmdn/lists"}