Prevents large MCP tool responses from consuming your LLM's context window.
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 |
Tools (6)
call_tool_and_storeCache large responses to files such as web searches, database queries, or file operations.call_toolDirect tool calls in context for small responses, status checks, or quick calculations.call_tool_with_file_contentUpload file data to tools for bulk imports, config deployments, or data processing.list_available_toolsDiscover upstream tools before calling any upstream tools.list_tool_detailsGet tool parameter schemas when you need exact parameter requirements.list_allowed_directoriesView storage locations before using custom storage paths.Environment Variables
APP_CONFIG_PATHrequiredPath to your MCP client's config file (e.g., claude_desktop_config.json).ABSTRACT_PROXY_SERVERSrequiredComma-separated list of existing MCP servers to proxy through Abstract.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": "server1,server2"
}
}
}
}