Automatically converts large tool responses into formatted Markdown files to preserve context window space while maintaining content readability.
Provides support for converting and caching upstream MCP tool responses in XML format for structured data handling.
Enables automatic conversion of tool responses to YAML and allows for the injection of YAML file content into upstream MCP tools.
Click on "Install 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., "@Abstract MCPSearch for AI news and save the results to a CSV file to keep my context window clean"
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.
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):
Example with Existing MCP Servers
Your existing MCP servers work unchanged alongside Abstract. Here's an example configuration:
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.jsonClaude Desktop (Windows):
%APPDATA%\Claude\claude_desktop_config.jsonClaude Desktop (Linux):
~/.config/Claude/claude_desktop_config.jsonCursor:
~/.cursor/config.jsonOther 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 |
| Cache large responses to files | Web searches, database queries, file operations |
| Direct tool calls in context | Small responses, status checks, quick calculations |
| Upload file data to tools | Bulk imports, config deployments, data processing |
| Discover upstream tools | Before calling any upstream tools |
| Get tool parameter schemas | When you need exact parameter requirements |
| View storage locations | Before using custom storage paths |
Usage Examples
Basic Response Caching
Advanced: Custom Storage & Format
File Upload to Tools
File Format Support
Format | Use Case | Example Output |
| Structured data (default) | Clean JSON without MCP metadata |
| Spreadsheet analysis | Headers + data rows |
| Documentation | Formatted markdown |
| Configuration files | Key-value structured data |
| Plain text | Universal format |
| Web content | Formatted HTML |
| API responses | Structured markup |
| Tab-separated data | Excel-compatible format |
Usage & Performance
Performance Characteristics
Response Time: ~100-200ms overhead per tool call
File I/O: Asynchronous writes, no blocking operations
Memory Usage: ~20-50MB base + upstream server requirements
Concurrency: Handles multiple simultaneous tool calls
File Size Limits: 10MB per file upload (configurable)
Monitoring & Observability
Error Handling
Error Type | Behavior | Recovery |
Upstream server unreachable | Returns error message, continues serving | Check server config and dependencies |
Storage directory not writable | Fails with clear error message | Verify directory permissions |
File size exceeded | Rejects upload with size limit error | Use smaller files or increase limit |
Invalid JSON in config | Logs error, continues with empty config | Fix JSON syntax in config file |
Security Considerations
Path Validation: All file operations restricted to allowed directories
No Code Execution: Only data processing, no arbitrary command execution
Environment Isolation: Upstream servers inherit environment safely
Permission Model: Requires explicit directory allowlisting
Scaling & Deployment
Horizontal Scaling: Run multiple instances with different storage directories
Load Balancing: Not required - each client connects to dedicated instance
Resource Requirements: 1 CPU core, 512MB RAM minimum per instance
Storage: Plan for 10GB+ per active user for response caching
Troubleshooting
Development
Command | Purpose |
| Compile TypeScript to dist/ |
| Build and start development server |
| Start compiled production server |
| Run test suite |
| Continuous testing during development |
Architecture
How it works:
Abstract parses allowed storage directories from command line arguments
Reads your MCP client's config file (specified via
APP_CONFIG_PATH)Extracts configurations for servers listed in
ABSTRACT_PROXY_SERVERSWhen tools are called, Abstract validates storage paths and spawns upstream servers
Tool responses are cached to user-specified directories with security validation
Resource links are returned to the client, keeping large datasets out of conversation context
Key features:
User-controlled storage: Store responses in directories you specify
Security-first: Path validation prevents directory traversal attacks
Client-agnostic: Works with Claude Desktop, Cursor, Cline, Windsurf, or any MCP client
Zero duplication: Reuses existing server configurations from your client's config
Transparent: API keys and environment variables are properly forwarded
Flexible: Supports any MCP server that can be spawned via stdio
Backward compatible: Existing setups continue to work without changes
Supported Upstream Servers
Any MCP server that can be spawned via stdio
Examples:
tavily-mcp,filesystem, custom MCP serversEnvironment variables and API keys are properly forwarded
Tool Details
call_tool_and_store
Purpose: Calls upstream MCP tools and caches responses to prevent context bloat. Returns compact resource links instead of large payloads.
Parameters:
server(required): Upstream MCP server nametool_name(required): Tool to call on the servertool_args(optional): Arguments object for the tooldescription(optional): Human-readable description for the responsestorage_path(optional): Custom directory within allowed pathsfilename(optional): Custom filename without extensionfile_format(optional): Output format (json|csv|md|txt|html|yaml|xml|tsv)
call_tool
Purpose: Calls upstream MCP tools directly and returns raw responses in conversation context. No caching or file operations.
Parameters:
server(required): Upstream MCP server nametool_name(required): Tool to call on the servertool_args(optional): Arguments object for the tool
call_tool_with_file_content
Purpose: Reads structured data from files and passes it to upstream MCP tools to help avoid context bloat. Supports JSON and string formats.
Parameters:
server(required): Upstream MCP server nametool_name(required): Tool to call on the serverfile_path(required): Path to input file within allowed directoriesdata_key(optional): Parameter name for injecting file contenttool_args(optional): Additional arguments to merge with file dataoutput_format(optional): Response format (json|string)
list_available_tools
Purpose: Discovers available tools from upstream MCP servers with structured output and filtering options.
Parameters:
detailed(optional): Include full input schemas when true (default: false)filter_by_server(optional): Restrict listing to specific upstream server
list_tool_details
Purpose: Gets complete definition for a specific upstream tool including input schema and parameter requirements.
Parameters:
server(required): Upstream server nametool_name(required): Name of the tool to inspect
list_allowed_directories
Purpose: Lists all directories that Abstract is allowed to store responses in. No parameters required.
Parameters: None