@thesapientcompany/mcp
v0.4.0
Published
Model Context Protocol (MCP) server for the Sapient brain-response API — run scans, read your scan history, query cross-scan intelligence, and read the Sapient knowledge base from any MCP client.
Maintainers
Readme
@thesapientcompany/mcp
MCP (Model Context Protocol) server for the Sapient brain-response API. It lets any MCP client — Claude Code, Claude Desktop, Cursor, etc. — submit content to Sapient, read scan results, query your cross-scan intelligence, and read the Sapient knowledge base.
Sapient predicts how a real human brain would respond to a piece of content (video, audio, image, or text) — second by second — and distills that into a score, a grade, and seven lenses.
Try it with no key
You can install with no API key and immediately see a real Sapient readout — call the demo_scan tool for a precomputed sample scan (score, per-second lens timeline, key moments, summary). To scan your own content, add your SAPIENT_API_KEY (mint one at thesapientcompany.com → Settings → API; new accounts include free starter credit) and use run_scan.
Install
Add it to Claude Code with one command:
claude mcp add sapient --env SAPIENT_API_KEY=sk_live_… -- npx -y @thesapientcompany/mcpOr install with no key to try the demo first:
claude mcp add sapient -- npx -y @thesapientcompany/mcpOr run the binary directly:
SAPIENT_API_KEY=sk_live_… npx -y @thesapientcompany/mcpClaude Desktop / generic MCP config
{
"mcpServers": {
"sapient": {
"command": "npx",
"args": ["-y", "@thesapientcompany/mcp"],
"env": { "SAPIENT_API_KEY": "sk_live_…" }
}
}
}Remote / HTTP note
This package is a stdio server (it runs locally and talks to the hosted Sapient API at https://www.thesapientcompany.com). Run this stdio server locally with your sk_live_ key. You can point it at a different API host with SAPIENT_BASE_URL.
Configuration
| Env var | Required | Description |
| --- | --- | --- |
| SAPIENT_API_KEY | yes | Your sk_live_… key (Settings → API at thesapientcompany.com). |
| SAPIENT_BASE_URL | no | Override the API base URL (default https://www.thesapientcompany.com). |
Tools
| Tool | What it does |
| --- | --- |
| demo_scan | No API key needed. Returns a real, precomputed sample scan so you can see a Sapient readout instantly. |
| run_scan | Submit content (url or text); optional lenses / options (model defaults to Qualia); set wait: true to poll to completion and return the full result. |
| get_scan | Fetch one scan by scan_id — { status } while running, the rich result (timeline, moments, summary) when complete. |
| list_lenses | The 4 selectable lenses with one-line descriptions. |
| my_history | Your scan history (GET /v1/scans). |
| my_intelligence | Your cross-scan patterns + semantic recall (GET /v1/intelligence?q=). |
| my_wallet | Your API wallet: balance, free credit, scans remaining (read-only). |
Model — Qualia
Scans run on Qualia, the active model — the visual specialist that reads video (visual + audio). Just omit model (it defaults to Qualia). The mary model is temporarily unavailable.
| Model | Price | Reads |
| --- | --- | --- |
| qualia (default) | $2.50 / scan pay-as-you-go — volume discounts down to $1.00 / scan at scale | Video (visual + audio) |
| mary | — | Temporarily unavailable |
The lenses
The 4 selectable lenses: attention, purchase_intent, manipulation, memory. The default top-3 (when you don't choose) are attention, purchase_intent, manipulation.
Resources
| URI | What it is |
| --- | --- |
| sapient://knowledge-base | Full-text explanation of how the Sapient model works — the pipeline, the 7 networks, the lenses, and how to read a scan. |
Errors
- 401 →
SAPIENT_API_KEYis missing/invalid — set a validsk_live_key. - 402 → out of credits — add API credits in Settings → API.
- 403 → a paid plan is required to use the API.
- 404 → no such scan, or it isn't yours.
- 429 → rate limited; retry with backoff.
Build from source
npm install
npm run build # tsc → dist/License
MIT
