Package Exports
- @sprigr/mcp-server
Readme
@sprigr/mcp-server
MCP server for AI agents with WASM-powered local full-text search.
Searches run locally via WebAssembly (~5ms). Writes go to the Sprigr API. The binary index auto-refreshes when your data changes.
Quick Start
Add to your AI client config (Claude Desktop, Cursor, Windsurf, etc.):
{
"mcpServers": {
"sprigr": {
"command": "npx",
"args": ["-y", "@sprigr/mcp-server"],
"env": {
"SPRIGR_API_KEY": "your-api-key"
}
}
}
}Don't have an API key? Ask your AI agent to use the signup tool, or visit sprigr.com.
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
SPRIGR_API_KEY |
Yes | — | Your Sprigr API key |
SPRIGR_API_BASE |
No | https://app.sprigr.com |
API base URL |
How It Works
AI Agent ──stdio──> @sprigr/mcp-server (local Node.js)
│
├── search → Local WASM engine (~5ms)
├── import/delete → Sprigr API → invalidate local cache
└── On change → re-download binary index → reload WASM- Searches run entirely in-process via a compiled WASM search engine
- Writes (import, delete, create index, update settings) go to the Sprigr API
- After any write, the local binary index is automatically refreshed on the next search
- Cache version checks are throttled (5s TTL) to avoid unnecessary API calls
Available Tools
| Tool | Description |
|---|---|
signup |
Create a Sprigr account and get an API key |
list_indexes |
List all indexes in your account |
create_index |
Create a search index with searchable attributes and facets |
update_settings |
Update index settings (searchable attributes, facets, synonyms) |
import_objects |
Upsert JSON objects into an index (max 1000/call, same objectID = replace) |
search |
Full-text search with filters, facets, pagination, and field selection |
multi_search |
Search across multiple indexes in one call |
get_object |
Fetch a single object by ID |
export_objects |
Export all objects from an index as JSON (paginated) |
get_stats |
Get account statistics |
delete_objects |
Delete objects by ID (max 1000/call) |
delete_index |
Permanently delete an entire index |
clear_index |
Remove all objects but keep index settings |
set_alias |
Point an alias name at an index (for zero-downtime reindexing) |
delete_alias |
Remove an alias |
list_aliases |
List all index aliases |
Requirements
- Node.js 18+
License
MIT