{"id":50379198,"url":"https://github.com/cyanheads/reference-data-mcp-server","last_synced_at":"2026-05-30T11:01:12.151Z","repository":{"id":360104717,"uuid":"1248231014","full_name":"cyanheads/reference-data-mcp-server","owner":"cyanheads","description":"Look up countries, timezones, periodic table elements, physical constants, units, HTTP status codes, and MIME types via MCP. STDIO or Streamable HTTP.","archived":false,"fork":false,"pushed_at":"2026-05-25T02:04:21.000Z","size":584,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-25T03:25:05.479Z","etag":null,"topics":["bun","countries","elements","http-status","mcp","mcp-server","mime-types","model-context-protocol","periodic-table","physical-constants","reference-data","stdio","streamable-http","timezones","typescript","unit-conversion"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@cyanheads/reference-data-mcp-server","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyanheads.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-24T11:15:35.000Z","updated_at":"2026-05-25T02:17:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cyanheads/reference-data-mcp-server","commit_stats":null,"previous_names":["cyanheads/reference-data-mcp-server"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/cyanheads/reference-data-mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanheads%2Freference-data-mcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanheads%2Freference-data-mcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanheads%2Freference-data-mcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanheads%2Freference-data-mcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyanheads","download_url":"https://codeload.github.com/cyanheads/reference-data-mcp-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanheads%2Freference-data-mcp-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33689564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bun","countries","elements","http-status","mcp","mcp-server","mime-types","model-context-protocol","periodic-table","physical-constants","reference-data","stdio","streamable-http","timezones","typescript","unit-conversion"],"created_at":"2026-05-30T11:00:41.418Z","updated_at":"2026-05-30T11:01:12.142Z","avatar_url":"https://github.com/cyanheads.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e@cyanheads/reference-data-mcp-server\u003c/h1\u003e\n  \u003cp\u003e\u003cb\u003eLook up countries, timezones, periodic table elements, physical constants, units, HTTP status codes, and MIME types via MCP. STDIO or Streamable HTTP.\u003c/b\u003e\n  \u003cdiv\u003e10 Tools • 3 Resources\u003c/div\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Version](https://img.shields.io/badge/Version-0.1.7-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square\u0026logo=docker\u0026logoColor=white)](https://github.com/users/cyanheads/packages/container/package/reference-data-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/reference-data-mcp-server?style=flat-square\u0026logo=npm\u0026logoColor=white)](https://www.npmjs.com/package/@cyanheads/reference-data-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.11-blueviolet.svg?style=flat-square)](https://bun.sh/)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge\u0026logo=anthropic\u0026logoColor=white)](https://github.com/cyanheads/reference-data-mcp-server/releases/latest/download/reference-data-mcp-server.mcpb) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=reference-data-mcp-server\u0026config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvcmVmZXJlbmNlLWRhdGEtbWNwLXNlcnZlciJdfQ==) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge\u0026logo=visualstudiocode\u0026logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22reference-data-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Freference-data-mcp-server%22%5D%7D)\n\n[![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n**Public Hosted Server:** [https://reference-data.caseyjhand.com/mcp](https://reference-data.caseyjhand.com/mcp)\n\n\u003c/div\u003e\n\n---\n\n## Tools\n\nTen tools grouped by domain — geo, timezone, periodic table, physical constants, unit conversion, HTTP, and web:\n\n| Tool | Description |\n|:---|:---|\n| `ref_geo_lookup` | Look up a country by name, ISO alpha-2, or alpha-3 code. Returns capital, region, languages, currencies, calling codes, TLD, flag, and IANA timezone IDs. |\n| `ref_geo_search` | Search and filter countries by region, subregion, language, currency, or free-text keyword. |\n| `ref_timezone_lookup` | Get timezone info by IANA ID, country code, or partial city/region name. Returns current and standard UTC offsets, DST status, and major cities. |\n| `ref_timezone_convert` | Convert a local datetime from one timezone to another, with visible UTC offsets for both sides. |\n| `ref_element_lookup` | Look up a periodic table element by name, symbol, or atomic number. Full property set including atomic mass, electron configuration, electronegativity, density, melting/boiling points, and discovery data. |\n| `ref_element_search` | Filter elements by category, group, period, atomic number range, or atomic mass range. |\n| `ref_constant_lookup` | Look up a CODATA 2022 physical constant by name, symbol, or alias. Returns value, SI unit, uncertainty, and related constants. |\n| `ref_unit_convert` | Convert a numeric value between compatible units of measure (length, mass, volume, temperature, speed, pressure, energy, power, frequency, digital storage, angle). |\n| `ref_http_status` | Look up an HTTP status code by number or keyword. Returns reason phrase, description, category, cacheability, and RFC reference. |\n| `ref_mime_type` | Look up a MIME type by type string or file extension. Returns canonical type, extensions, compressibility, and data source. |\n\n### `ref_geo_lookup`\n\nLook up a country by name, ISO alpha-2 or alpha-3 code.\n\n- Accepts fuzzy name matching — \"Brasil\" and \"Brazil\" both resolve\n- Returns full record: capital, region, subregion, official languages, currencies, calling codes, TLD, flag emoji, and IANA timezone IDs\n- Lookup modes: `auto` (tries alpha-2, alpha-3, then name), `name`, `alpha2`, `alpha3`\n\n---\n\n### `ref_geo_search`\n\nSearch and filter countries with at least one filter required.\n\n- Filters: keyword (name, native name, capital, subregion), region, subregion, language (ISO 639-1 code or name), currency (ISO 4217 code or name)\n- Returns ranked summaries (alpha-2/3, name, capital, region, primary currency, flag)\n- Paginated with configurable limit (1–100); `truncated` flag when results are cut off\n\n---\n\n### `ref_timezone_lookup`\n\nGet timezone info for an IANA ID, country code, or city name.\n\n- Partial city matching: \"Tokyo\" resolves to \"Asia/Tokyo\", \"NY\" to \"America/New_York\"\n- Country code queries return all timezones observed in that country\n- Optional `at` parameter evaluates DST state at a specific ISO 8601 moment\n- Returns current offset, standard offset, DST status, abbreviations, major cities, and country codes\n\n---\n\n### `ref_timezone_convert`\n\nConvert a local datetime between timezones.\n\n- Input is a local ISO 8601 datetime without offset (e.g., `\"2026-05-24T15:30:00\"`)\n- Accepts full IANA IDs or unambiguous city names\n- Handles DST transitions with a two-pass offset refinement\n- Returns source and target local datetimes with their respective UTC offsets, plus the UTC equivalent\n\n---\n\n### `ref_element_lookup`\n\nLook up any of the 118 periodic table elements.\n\n- Accepts name, symbol, or atomic number\n- Full property set: atomic mass (with estimated flag), electron configuration, group, period, block, category, Pauling electronegativity, density, melting and boiling points in kelvin, phase at STP, radioactivity, natural occurrence, and discovery data\n- Data sourced from PubChem/IUPAC 2024; synthetic/unstable elements return `null` for experimentally inaccessible properties\n\n---\n\n### `ref_element_search`\n\nFilter elements across the full periodic table.\n\n- Filters: category (partial match), group (1–18), period (1–7), atomic number range, atomic mass range\n- At least one filter required; returns summaries with atomic number, symbol, name, mass, and category\n\n---\n\n### `ref_constant_lookup`\n\nLook up CODATA 2022 physical constants (~360 entries).\n\n- Fuzzy alias matching: \"speed of light\", \"c\", \"Avogadro's number\", \"N_A\", \"Planck\", \"h\", \"Boltzmann\", \"k_B\" all resolve\n- Returns value, SI unit expression, absolute and relative uncertainty, exact-definition flag, CODATA identifier, and up to 3 related constants\n\n---\n\n### `ref_unit_convert`\n\nConvert between units in 11 measurement domains.\n\n- **Supported:** length (mm–mi), mass (mcg–t), volume (ml–m³), temperature (C/F/K/R, non-linear), speed (m/s, km/h, knot, ft/s), pressure (Pa–psi), energy (J–MWh), power (W–GW), frequency (Hz–GHz), digital storage (b–TB), angle (deg/rad/grad)\n- Incompatible unit pairs return a structured error identifying the quantity mismatch\n- Temperatures below absolute zero return a specific error with the Kelvin equivalent\n\n---\n\n### `ref_http_status`\n\nLook up HTTP status codes by number or keyword.\n\n- Numeric queries (e.g., `\"404\"`) return an exact match\n- Keyword queries (e.g., `\"not found\"`, `\"too many requests\"`) return the closest match plus alternatives\n- Returns: reason phrase, description, category (1xx–5xx), cacheability per RFC 9110, defining RFC with section reference\n\n---\n\n### `ref_mime_type`\n\nLook up MIME types by type string or file extension.\n\n- Accepts `\"image/webp\"`, `\".webp\"`, or `\"webp\"` interchangeably\n- Extension lookups return the canonical MIME type first; additional types sharing the extension are listed as alternatives\n- Returns: extensions, compressibility flag (relevant for Content-Encoding decisions), and data source (iana/apache/nginx)\n\n---\n\n## Resources\n\n| Type | Name | Description |\n|:---|:---|:---|\n| Resource | `ref://countries/{alpha2}` | Full country record by ISO alpha-2 code (e.g., `ref://countries/DE`). |\n| Resource | `ref://elements/{number}` | Full element record by atomic number (e.g., `ref://elements/6` for Carbon). |\n| Resource | `ref://timezones/{iana_id}` | Timezone info by IANA ID with slashes URL-encoded as `%2F` (e.g., `ref://timezones/America%2FNew_York`). |\n\nAll resource data is also reachable via tools. Use `ref_geo_lookup`, `ref_element_lookup`, and `ref_timezone_lookup` when you need flexible query modes or country search.\n\n---\n\n## Features\n\nBuilt on [`@cyanheads/mcp-ts-core`](https://www.npmjs.com/package/@cyanheads/mcp-ts-core):\n\n- Declarative tool, resource, and prompt definitions — single file per primitive, framework handles registration and validation\n- Unified error handling — handlers throw, framework catches, classifies, and formats\n- Pluggable auth: `none`, `jwt`, `oauth`\n- Swappable storage backends: `in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2/D1`\n- Structured logging with optional OpenTelemetry tracing\n- STDIO and Streamable HTTP transports\n\nReference-data-specific:\n\n- Entirely in-memory — all datasets load at startup; no runtime network calls, no API keys, no rate limits\n- Works offline and in air-gapped environments\n- Seven specialized services: geo (countries-list), timezone (Node.js Intl + @vvo/tzdb), elements (PubChem/IUPAC 2024, 118 elements), constants (CODATA 2022, ~360 entries), units (convert-units), HTTP status (IANA registry), MIME types (mime-db, ~1,000 types)\n\nAgent-friendly output:\n\n- Structured error contracts on every tool — typed `reason` codes (`no_match`, `no_filters`, `unknown_unit`, `incompatible_units`, `below_absolute_zero`, `invalid_timezone`, `invalid_datetime`) with actionable recovery hints\n- Discriminated outputs where relevant — `truncated` flag on search results, `alternatives` arrays on MIME/HTTP keyword matches, `atomic_mass_estimated` flag on element data\n- Consistent `null` for genuinely unknown or inapplicable values rather than absent fields\n\n---\n\n## Getting started\n\nAdd the following to your MCP client configuration file:\n\n```json\n{\n  \"mcpServers\": {\n    \"reference-data\": {\n      \"type\": \"stdio\",\n      \"command\": \"bunx\",\n      \"args\": [\"reference-data-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\"\n      }\n    }\n  }\n}\n```\n\nOr with npx (no Bun required):\n\n```json\n{\n  \"mcpServers\": {\n    \"reference-data\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"reference-data-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\"\n      }\n    }\n  }\n}\n```\n\nOr with Docker:\n\n```json\n{\n  \"mcpServers\": {\n    \"reference-data\": {\n      \"type\": \"stdio\",\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\", \"-i\", \"--rm\",\n        \"-e\", \"MCP_TRANSPORT_TYPE=stdio\",\n        \"ghcr.io/cyanheads/reference-data-mcp-server:latest\"\n      ]\n    }\n  }\n}\n```\n\nFor Streamable HTTP, set the transport and start the server:\n\n```sh\nMCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http\n# Server listens at http://localhost:3010/mcp\n```\n\n### Prerequisites\n\n- [Bun v1.3.0](https://bun.sh/) or higher (or Node.js v24+).\n- No API keys required — this server is entirely self-contained.\n\n### Installation\n\n1. **Clone the repository:**\n\n```sh\ngit clone https://github.com/cyanheads/reference-data-mcp-server.git\n```\n\n2. **Navigate into the directory:**\n\n```sh\ncd reference-data-mcp-server\n```\n\n3. **Install dependencies:**\n\n```sh\nbun install\n```\n\n4. **Configure environment (optional):**\n\n```sh\ncp .env.example .env\n# edit .env if you want to override transport or logging defaults\n```\n\n---\n\n## Configuration\n\nNo API keys are required. All configuration is optional overrides of framework defaults.\n\n| Variable | Description | Default |\n|:---------|:------------|:--------|\n| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |\n| `MCP_HTTP_PORT` | Port for HTTP server. | `3010` |\n| `MCP_HTTP_HOST` | Host for HTTP server. | `127.0.0.1` |\n| `MCP_AUTH_MODE` | Auth mode: `none`, `jwt`, or `oauth`. | `none` |\n| `MCP_LOG_LEVEL` | Log level (RFC 5424): `debug`, `info`, `notice`, `warning`, `error`. | `info` |\n| `LOGS_DIR` | Directory for log files (Node.js only). | `\u003cproject-root\u003e/logs` |\n| `OTEL_ENABLED` | Enable OpenTelemetry instrumentation (spans, metrics, completion logs). | `false` |\n\nSee [`.env.example`](./.env.example) for the full list of optional overrides.\n\n---\n\n## Running the server\n\n### Local development\n\n```sh\n# One-time build\nbun run rebuild\n\n# Run the built server\nbun run start:stdio\n# or\nbun run start:http\n```\n\n```sh\nbun run devcheck   # Lint, format, typecheck, security\nbun run test       # Vitest test suite\nbun run lint:mcp   # Validate MCP definitions against spec\n```\n\n### Docker\n\n```sh\ndocker build -t reference-data-mcp-server .\ndocker run --rm -p 3010:3010 reference-data-mcp-server\n```\n\nThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to `/var/log/reference-data-mcp-server`. OpenTelemetry peer dependencies are installed by default — build with `--build-arg OTEL_ENABLED=false` to omit them.\n\n---\n\n## Project structure\n\n| Directory | Purpose |\n|:----------|:--------|\n| `src/index.ts` | `createApp()` entry point — registers tools/resources and inits services. |\n| `src/data/` | Static datasets (periodic table, physical constants, HTTP status codes). |\n| `src/mcp-server/tools/` | Tool definitions (`*.tool.ts`). |\n| `src/mcp-server/resources/` | Resource definitions (`*.resource.ts`). |\n| `src/services/` | Domain service integrations (geo, timezone, elements, constants, units, http-status, mime). |\n| `tests/` | Unit tests mirroring `src/`. |\n| `docs/` | Generated docs (tree.md, design.md). |\n| `changelog/` | Per-version changelog files. |\n\n---\n\n## Development guide\n\nSee [`CLAUDE.md`](./CLAUDE.md) for development guidelines and architectural rules. The short version:\n\n- Handlers throw, framework catches — no `try/catch` in tool logic\n- Use `ctx.log` for request-scoped logging, `ctx.state` for tenant-scoped storage\n- Register new tools and resources directly in `src/index.ts`\n- Data integrity: validate raw → normalize to domain type → return output schema; never fabricate missing fields\n\n---\n\n## Contributing\n\nIssues and pull requests are welcome. Run checks and tests before submitting:\n\n```sh\nbun run devcheck\nbun run test\n```\n\n---\n\n## License\n\nApache-2.0 — see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyanheads%2Freference-data-mcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyanheads%2Freference-data-mcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyanheads%2Freference-data-mcp-server/lists"}