Prepare the server locally
Run this once before adding it to Claude Code.
npm install -g abstract-mcpRegister it in Claude Code
claude mcp add -e "APP_CONFIG_PATH=${APP_CONFIG_PATH}" -e "ABSTRACT_PROXY_SERVERS=${ABSTRACT_PROXY_SERVERS}" abstract-mcp -- abstract-mcp /path/to/allowed/storage/dir1Replace any placeholder paths in the command with the real path on your machine.
APP_CONFIG_PATHABSTRACT_PROXY_SERVERSMake your agent remember this setup
abstract-mcp's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.
npx conare@latestFree · one command · indexes the sessions already on disk. Set up in the browser instead →
What it does
- Caches large tool responses to local files to save context window tokens
- Supports automatic format conversion to CSV, YAML, JSON, Markdown, and more
- Enables direct file uploads for bulk data processing
- Works as a transparent proxy for existing MCP servers without requiring changes
- Provides security validation for storage directories
Tools 6
call_tool_and_storeCache large responses to files.call_toolDirect tool calls in context.call_tool_with_file_contentUpload file data to tools.list_available_toolsDiscover upstream tools.list_tool_detailsGet tool parameter schemas.list_allowed_directoriesView storage locations.Environment Variables
APP_CONFIG_PATHrequiredPath to the MCP client's configuration file.ABSTRACT_PROXY_SERVERSrequiredComma-separated list of MCP servers to proxy.Try it
Original README from cslou/abstract-mcp
Abstract MCP Server
Prevents large MCP tool responses from consuming your LLM's context window. Abstract acts as a smart proxy that caches responses to files and returns compact resource links, and supports direct tool calls and file uploads to avoid context bloat.
Why Abstract?
- 🚀 Preserves Context Window: Large responses (search results, file contents, API data) don't bloat your conversation
- 💾 Smart Storage: Responses saved to directories you control with security validation
- 🔄 Format Conversion: Automatic conversion to CSV, YAML, JSON, Markdown, and more
- 📂 File Uploads: Inject CSV, JSON, YAML, and other file data into upstream tools without exposing raw content
- ⚡ Direct Calls: Skip caching when responses are small with plain
call_toolfor instant results - 🔗 Zero Config: Works with your existing MCP servers without changes
Quick Start
Install:
npm install -g abstract-mcp(or build from source)Add to your MCP client config (Claude Desktop, Cursor, Cline, etc):
{
"mcpServers": {
"abstract": {
"command": "abstract-mcp",
"args": [
"/path/to/allowed/storage/dir1",
"/path/to/allowed/storage/dir2"
],
"env": {
"APP_CONFIG_PATH": "/path/to/claude/desktop/config.json",
"ABSTRACT_PROXY_SERVERS": "server1,server2"
}
}
}
}
Example with Existing MCP Servers
Your existing MCP servers work unchanged alongside Abstract. Here's an example configuration:
{
"mcpServers": {
"abstract": {
"command": "abstract-mcp",
"args": [
"/path/to/allowed/storage/dir1",
"/path/to/allowed/storage/dir2"
],
"env": {
"APP_CONFIG_PATH": "/path/to/claude/desktop/config.json",
"ABSTRACT_PROXY_SERVERS": "tavily-mcp"
}
},
"tavily-mcp": {
"command": "npx",
"args": ["-y", "tavily-mcp@latest"],
"env": {
"TAVILY_API_KEY": "your-tavily-api-key"
}
}
}
}
Config Path Examples
Set APP_CONFIG_PATH to your MCP client's config file:
- Claude Desktop (macOS):
/Users/username/Library/Application Support/Claude/claude_desktop_config.json - Claude Desktop (Windows):
%APPDATA%\Claude\claude_desktop_config.json - Claude Desktop (Linux):
~/.config/Claude/claude_desktop_config.json - Cursor:
~/.cursor/config.json - Other clients: Check your client's documentation for config location
Abstract reads this config file to find the settings for servers listed in ABSTRACT_PROXY_SERVERS.
Best Practice: Disable Upstream Tools
For more reliable tool calling, consider disabling the direct tools from upstream servers that you've added to Abstract's ABSTRACT_PROXY_SERVERS. This prevents confusion and ensures all calls go through Abstract's enhanced functionality (caching, file handling, format conversion).
Why? When both Abstract and upstream servers expose the same tools, AI assistants may randomly choose between them. By disabling upstream tools, you guarantee consistent behavior through Abstract's proxy.
Core Tools
| Tool | Purpose | When to Use |
|---|---|---|
call_tool_and_store |
Cache large responses to files | Web searches, database queries, file operations |
call_tool |
Direct tool calls in context | Small responses, status checks, quick calculations |
call_tool_with_file_content |
Upload file data to tools | Bulk imports, config deployments, data processing |
list_available_tools |
Discover upstream tools | Before calling any upstream tools |
list_tool_details |
Get tool parameter schemas | When you need exact parameter requirements |
list_allowed_directories |
View storage locations | Before using custom storage paths |
Usage Examples
Basic Response Caching
{
"server": "tavily-mcp",
"tool_name": "search",
"tool_args": {"query": "bitcoin ETF flows", "max_results": 10}
}
Advanced: Custom Storage & Format
{
"server": "tavily-mcp",
"tool_name": "search",
"tool_args": {"query": "bitcoin ETF flows", "max_results": 10},
"storage_path": "/Users/you/Documents/research",
"filename": "bitcoin-etf-analysis",
"file_format": "csv"
}
File Upload to Tools
{
"server": "database-mcp",
"tool_name": "bulk_insert",
"file_path": "/Users/you/Documents/users.csv",
"data_key": "records",
"tool_args": {"table": "users"}
}
File Format Support
| Format | Use Case | Example Output |
|---|---|---|
json |
Structured data (default) | Clean JSON without MCP metadata |
csv |
Spreadsheet analysis | Headers + data rows |
md |
Documentation | Formatted markdown |
yaml |
Configuration files | Key-value structured data |
txt |
Plain text | Universal format |
html |
Web content | Formatted HTML |
xml |
API responses | Structured markup |