Needle MCP Server
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., "@Needle MCP ServerExtract the key details from this email into JSON"
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.
Needle MCP Server
A production-ready Model Context Protocol server that runs the Cactus Compute Needle model locally for structured extraction, classification, summarization, and context pruning. Keeps your data on device.
About
Cactus Compute Needle is a tiny, edge-first foundation model built for tool calling and structured extraction, not chat or facts. Needle 2 is a 45M-parameter model shipped as a 14MB binary that runs in about 28MB of RAM. Its architecture favors cross-attention over memorization-heavy feed-forward layers, which is what makes it practical for on-device agents.
The model lives at github.com/cactus-compute/needle and the wheels are published on Hugging Face. This MCP server downloads the appropriate engine for your platform on first run and caches it under ~/.cache/needle, then exposes it through six read-only tools.
Related MCP server: ClawMem MCP Server
Features
Extract JSON-structured data from any text without writing a prompt.
Automatically drops unnecessary context to stay inside the model context window.
Chunk and search large documents locally before sending them to a large language model.
A JSON repair step guarantees parsable results.
SQLite cache returns identical requests instantly.
Needle MCP exposes a local Model Context Protocol server that runs the Cactus Needle model on-device. It turns structured-extraction work — JSON extraction, classification, summarization, context pruning — into callable tools, so agents and CLIs can offload that work without a remote API.
How it works
The server boots a single process over stdio. On startup it downloads the Needle engine wheel for the host platform (or reuses a cached copy under ~/.cache/needle), then initializes an MCP Server. Every tool call is a single pass through the local model. Identical requests — same tool name and arguments — are read back from a SQLite cache at ~/.cache/needle/mcp_cache.db, so repeats return instantly and never re-hit the model.
Inputs that exceed the context window are handled in-process: large texts are chunked and trimmed to the relevant slices before being handed to the model, which keeps latencies low and the model honest.
Installation
uv tool install git+https://github.com/yugaaank/needle-mcpUsage
Claude Code
claude mcp add needle -- needle-mcpCursor
cursor mcp add needle -- needle-mcpClaude Desktop
Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"needle": {
"command": "needle-mcp"
}
}
}Restart Claude Desktop for the change to take effect.
Antigravity CLI
agy mcp add needle -- needle-mcpOpenCode
Add the server to your opencode.json under the mcp key:
{
"mcp": {
"needle": {
"type": "local",
"command": ["needle-mcp"],
"enabled": true,
"timeout": 30000
}
}
}Oh My Pi (OMP)
Add the server to an OMP-native MCP config file:
Project-scoped:
.omp/mcp.jsonUser-wide:
~/.omp/agent/mcp.json
{
"$schema": "https://raw.githubusercontent.com/can1357/oh-my-pi/main/packages/coding-agent/src/config/mcp-schema.json",
"mcpServers": {
"needle": {
"command": "needle-mcp"
}
}
}Or use the interactive wizard in a running OMP session, then reload:
/mcp add
/mcp reloadCLI
needle-mcpTools
All tools stream structured output back as JSON. Results for identical text + arguments are cached locally, so the second call is a cache hit.
Tool | Purpose | Required inputs |
| Extract structured data into a JSON object matching a caller-supplied schema. |
|
| Pick one label from a fixed list of categories. |
|
| Produce a short summary in N sentences or fewer ( |
|
| Decide which tool to call and generate arguments from natural language. Accepts a JSON array of tool definitions in |
|
| Rank a list of tools by relevance to a query (prune the prompt you send elsewhere), returning the top |
|
| Chunk a large document and return the |
|
License
MIT – see the LICENSE file for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Your portable context layer — load it into any AI.
Extract structured data points from research papers and other documents with an LLM.
Sentiment, toxicity, entity extraction, PII, translation, summary, QA, fraud scoring, safety audit.
Intelligent context infrastructure for AI teams: knowledge graph, sessions, tasks, documents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceLocal document intelligence for AI agents — extract text, detect tables, read metadata, analyze structure, search keywords, and detect language from PDF and DOCX files. No cloud API required, no API key needed.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to maintain persistent, local memory with retrieval-augmented search, knowledge graphs, and context surfacing, without any cloud dependencies.180MIT
- AlicenseNot gradedqualityCmaintenanceEnables fully local, cross-lingual retrieval over documents and source code by indexing files and providing search and ingest tools, with all data staying on the machine.GPL 2.0
- AlicenseNot gradedqualityBmaintenanceEnables local AI inference for Claude and Cursor through 22 APIs, including summarization, translation, review, classification, RAG, and more, with all data processed on-device.22MIT