prism MCP Server
Enables exploring and querying structured data (JSON, JSONL, CSV, TSV) via shape, read, find, and diff operations, with bounded resource usage.
README
🔻 prism
The agent's data reader. Point it at a JSON, JSONL, CSV, or TSV blob — a file, a URL, or a string you already hold — and get back its shape and the slice you asked for, never the whole thing. What scout does for a web page and lens does for a source file, prism does for structured data.
Part of tools-for-agents. Zero dependencies — the Node standard library and nothing else. CLI + web view + MCP.
Why
An agent that gets handed a 200 KB API response has three bad options: paste it all into the context window, guess at its structure, or write a throwaway script to poke at it. prism is the fourth option.
# the SHAPE of a big response — a few hundred tokens instead of the whole payload
curl -s https://api.example.com/users | prism shape -
{
"type": "object",
"keys": 4,
"fields": {
"page": { "type": "int", "sample": 2 },
"total": { "type": "int", "sample": 1284 },
"users": { "type": "array", "len": 50, "sampled": 20,
"of": { "type": "object", "keys": 4, "fields": {
"id": { "type": "int" },
"name": { "type": "string" },
"email": { "type": "string" },
"roles": { "type": "array", "len": 2, "of": { "type": "string" } } } } }
}
}
Now you know where everything is. Read exactly what you need:
prism read users.json --path 'data.users[*].email' # every email, and nothing else
prism find config.json "timeout" # where does 'timeout' live? → the paths
The four verbs
| Command | Gives you | For |
|---|---|---|
prism shape <src> |
the skeleton: keys→types, array lengths, nesting | seeing the structure of a blob you've never met |
prism read <src> --path P |
the subtree at path P, token-budgeted |
pulling out just the part you need |
prism find <src> "<q>" |
the paths where a key/value lives | locating something in a big document |
prism diff <a> <b> |
the paths that changed — added / removed / changed | what differs between two responses, configs, or a before and after |
Sources (<src>): a file path, an http(s):// URL, or - for stdin. Paths: data.items[0].name,
users[*].id ([*] maps over an array), logs[0:20] (a half-open slice — [:20] / [100:] too, bounds
clamp), logs[-1] (a negative index counts from the end — [-20:] is the last twenty), $ for the root.
Formats: JSON and JSONL/NDJSON auto-detect;
CSV and TSV come from a .csv/.tsv source or --format csv (the header row names the columns, so a
spreadsheet becomes an array of row objects that shape/read/find/diff all work on).
It is built to read untrusted data
prism reads blobs an agent did not write, so every operation is bounded — the same discipline that keeps a sandbox safe:
- Byte-capped before parse. A file bigger than the cap (64 MB default) is refused up front, not read
into memory to find out.
JSON.parseis all-or-nothing; a 2 GB file handed to it is a frozen process. - Depth- and key-bounded.
shapestops descending at a depth and shows a fixed number of keys per level, so the shape of a pathologically deep or wide document is still small. - Token-budgeted. An over-budget
readhands back the value's shape and its honest size — never a silently truncated body that looks complete. - Node-bounded search.
findvisits at most a fixed number of nodes, and says so if it stopped early.
Every clipped or empty answer carries the size of the whole ("withheld": 9960, "len": 2000), because
"20 results" and "20 of 1284 results" are different facts.
Install
node --version # 22+; nothing to npm install
npm test # node --test
node src/cli.js shape package.json
node src/cli.js serve # the web view → http://localhost:7970 (paste a blob, explore its shape)
npm run mcp # the MCP server, stdio JSON-RPC
The web view
prism serve [--port 7970] opens a single-file explorer: paste a blob (or point at a file or URL), see its
shape as a collapsible tree, click any node to read the value at its path (token-budgeted) — or type a
path (users[0:10], logs[-1]) to reach a slice or an element the tree can't click to — find a key or
value across the whole document, and Compare ⟷ it against a second blob to diff them (added / removed
/ changed paths). A read as selector declares the format — auto sniffs JSON vs JSONL, and
because a spreadsheet can't be sniffed apart from prose you pick CSV / TSV to read a pasted sheet as
an array of row objects (the same knob rides the file/URL load and the compare blob). It holds one document
in RAM — no store, nothing written to disk.
MCP
Four tools — prism_shape, prism_read, prism_find, prism_diff — each read-only and open-world. Pass a blob inline
as data, or point at a file/URL with source:
{ "name": "prism_read",
"arguments": { "data": "{\"user\":{\"email\":\"a@x.com\"}}", "path": "user.email" } }
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。