catalog-mcp
It exposes read-only MCP tools for exploring and querying a JSON catalog in memory.
Query records with filters (
eq,min/max,has,contains), sorting, pagination, and field projection.Fetch a single record by its key field.
Group records by a field and count each value, including array elements.
Rank top N records by a numeric field, with optional filtering.
List distinct values of a field with occurrence counts.
Infer catalog schema: field types, coverage, numeric ranges, and sample values.
Get catalog stats: record count, source, cache age, and optional numeric summaries; force a fresh fetch.
Load catalogs from URL or file with TTL caching and last-good fallback on refresh failure.
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., "@catalog-mcp Find all reflector telescopes under $1000, sorted by price"
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.
catalog-mcp
An MCP server that turns any JSON catalog into query tools for AI agents.
Point it at a catalog URL or file — an inventory feed, a product list, the
catalog.json that feedmerge
publishes — and any MCP client (Claude Desktop, Claude Code, anything speaking
the protocol) gets structured filtering, grouping, ranking, and schema
discovery over your records.
Node 18+. Two runtime dependencies: the MCP SDK and zod.
Why
Agents are bad at big JSON files and good at tools. Hand an agent a 2 MB
catalog and it will truncate, skim, or hallucinate records; hand it
catalog_query with a filter grammar and it answers "cheapest record under
$30k with these two features" correctly every time, reading only the records
that match.
This repo is the generalized version of an MCP server I run in production: a sales-floor AI assistant queries a live inventory catalog through exactly these tools (same filter semantics, same null-price rule, same TTL cache) hundreds of times a day. The pipeline it belongs to:
vendor feed -> feedmerge -> catalog.json -> catalog-mcp -> any agent
(guarded sync) (versioned) (query tools)I run this against my own public inventory feed; the example below uses a neutral catalog so the repo stands alone.
Related MCP server: mcp-db-server
Quickstart
No install needed — wire it into Claude Desktop (claude_desktop_config.json)
and npx fetches it on first launch:
{
"mcpServers": {
"my-catalog": {
"command": "npx",
"args": ["-y", "catalog-mcp"],
"env": {
"CATALOG_URL": "https://example.com/catalog.json",
"CATALOG_KEY": "sku"
}
}
}
}Then ask the agent things like "what types are in the catalog and what does
each cost at the low end?" and watch it compose catalog_schema,
catalog_count_by, and catalog_top on its own.
To run it by hand against a local file:
npx -y catalog-mcp --file ./catalog.json --key skuFrom source
git clone https://github.com/stevyf93II/catalog-mcp.git
cd catalog-mcp
npm install
npm test # engine, loader, and stdio end-to-end tests
# serve the example catalog
node src/server.js --file examples/telescopes.json --key skuTools
Tool | What it does |
| Filter, sort, paginate, and project records |
| Fetch one record by its key field |
| Group by a field and count (array fields count each element) |
| Top-N records by a numeric field, with optional filter |
| Distinct values of a field with counts — learn a field's vocabulary before filtering on it |
| Schema inferred from the records: types, coverage, numeric ranges, sample values |
| Record count, source, cache age, optional numeric summaries |
All tools are read-only and idempotent, and say so in their MCP annotations.
The filter grammar
One small spec, used by query, count_by, and top:
{
"eq": { "type": "reflector", "goto": true },
"min": { "aperture_mm": 150 },
"max": { "price": 1000 },
"has": { "features": ["Parabolic Mirror", "Cooling Fan"] },
"contains": { "name": "dobsonian" }
}eq— strict equality on any value, including booleans andnull.min/max— numeric bounds. A record without a real number in a bounded field is excluded. This rule is load-bearing: in the production catalog a missing price means "call for price", and "show me units under $30k" must never surface a unit whose price is unknown.has— array membership; every listed value must be present.contains— case-insensitive substring on a string field; field"*"searches every string field in the record.
Conditions AND together. An unknown top-level key is an error that names the valid keys, because a silently ignored filter is how an agent confidently reports wrong answers.
Sorting pushes records that lack the sort field to the end, in both directions — "sort by price" shows priced records first, not a wall of nulls.
Configuration
Env var | Flag | Meaning |
|
| catalog over HTTP(S) (exactly one of url/file) |
|
| catalog on disk |
|
| dot-path to the record array, e.g. |
|
| record key field for |
|
| fetch cache TTL in seconds (default |
When CATALOG_RECORDS_PATH is not set, the loader uses the document root if
it is an array, or the single top-level array of objects if there is exactly
one ({ "meta": ..., "items": [...] } just works). If the document is
ambiguous it refuses and names the candidate keys.
On a failed refresh the server serves the last good data instead of erroring
— an agent mid-task is better off with five-minute-old records than an
exception — and catalog_stats reports the cache age so staleness is never
hidden.
Non-goals
Not a database. The catalog is read-only and lives in memory; if your data does not fit comfortably in a JSON file, you want a real store.
No writes. Nothing here mutates the catalog — that is the sync pipeline's job (see feedmerge).
No query language. Five filter keys cover what agents actually ask; anything fancier belongs in code, not in a tool schema.
More from the same author
Vista: iOS LiDAR room scanner · swift-tsdf: TSDF fusion and marching cubes in Swift · feedmerge: vendor feed to versioned JSON catalog · docdrop: append-only Google Docs for AI memory · fal-image-relay: your own fal.ai image endpoint
License
MIT
Available Tools
7 toolscatalog_count_byCount records by fieldARead-onlyIdempotent
Group records by a field and count each value, most common first. Array fields count each element. Optional filter applies first.
Inputs: field (required), filter.
catalog_getGet one record by keyARead-onlyIdempotent
Fetch a single record by its key field ("id"). Returns { found, record }.
Inputs: key (required), fields.
catalog_queryQuery the catalogARead-onlyIdempotent
Filter, sort, and page through catalog records. Returns { count, total_matching, total_records, records }. Use catalog_schema first if you are unsure which fields exist. Example: filter {"eq":{"condition":"used"},"max":{"price":30000},"has":{"features":["Solar"]}}, sort_by "price".
Inputs: limit, fields, filter, offset, +2 more.
catalog_schemaInferred catalog schemaARead-onlyIdempotent
Field inventory inferred from the records themselves: type, coverage, numeric min/max, and sample values for categorical fields. Call this first when exploring an unfamiliar catalog.
Inputs: no named parameters.
catalog_statsCatalog totals and freshnessARead-onlyIdempotent
Record count, source, cache age, and optional numeric summaries (count/min/max/mean/median) for the fields you name.
Inputs: refresh, numeric_fields.
catalog_topTop N records by a numeric fieldARead-onlyIdempotent
Rank records by a numeric field with an optional filter. Example: sort_by "price", sort_dir "asc", filter {"has":{"features":["Bunkhouse"]}} = cheapest records with that feature.
Inputs: sort_by (required), limit, fields, filter, +1 more.
catalog_valuesDistinct values of a fieldARead-onlyIdempotent
All distinct values of a field with occurrence counts, most common first. The reliable way to learn a categorical field's vocabulary before filtering on it.
Inputs: field (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
catalog_values and catalog_count_by both return per-value occurrence counts, catalog_top is essentially a sorted special case of catalog_query, and catalog_stats overlaps with catalog_schema's min/max summaries. Each tool has a slightly different focus, but the boundaries are fuzzy enough that an agent could easily misselect.
All tool names share the catalog_ prefix and snake_case, so the namespace is predictable. The suffixes are not uniformly verb_noun—schema/stats/values are nouns while get/query/count_by/top are verb-like—so it is mostly consistent rather than perfectly patterned.
Seven tools is a well-scoped size for a catalog exploration server: enough for schema discovery, statistics, filtering, record retrieval, grouping, and value enumeration without bloat.
For a read-only catalog/exploration domain, the set covers the full workflow: understand the schema, inspect summary statistics, learn field vocabulary, filter/sort/page records, fetch by id, and aggregate/rank. No obvious dead-end operation is missing.
Maintenance
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
AgentReady Tools is a searchable catalog of more than 250 APIs, MCP servers and developer tools that AI agents can use, each with agent-readiness checks (docs, auth, OpenAPI, MCP support). Search by task, get tool details and related tools, and read or share field notes from other agents in the Agent Community. Remote MCP endpoint: https://agentready-tools.com/mcp
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceAn integration layer for AI agents that provides a catalog of tools from various sources (OpenAPI, GraphQL, MCP, etc.) and can be used as an MCP server for compatible agents.4,573MIT
- FlicenseNot gradedqualityBmaintenanceAn MCP server that exposes relational databases (PostgreSQL/MySQL) to AI agents with natural language to SQL query support.19-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to explore, search, and query API definitions from OpenAPI/Swagger JSON files.MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables AI agents to generate, search, and reason over knowledge graphs from code, databases, docs, and open-data portals without requiring an LLM or API key.2Apache 2.0