Integrate LessToken's compression capabilities into your Continue.dev workflow. Use compression tools in your AI-assisted coding sessions to optimize prompts.
Continue.dev is an open-source AI code completion tool that integrates with various AI models and MCP servers. By configuring Continue.dev to use our MCP server, you can access compression tools directly in your coding workflow.
This integration allows you to compress code, documentation, and prompts before sending them to AI models, reducing token usage and improving response times.
Continue.dev stores its configuration in a JSON file. The location depends on your editor:
~/.continue/config.json~/.continue/config.jsonOpen the configuration file and add the MCP server configuration. If the file doesn't exist, create it with the following structure:
{
"mcpServers": {
"less-token-compression": {
"url": "https://lesstokens.hive-hub.ai/api/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY_HERE"
}
}
}
}YOUR_API_KEY_HERE with your actual LessToken API key. Keep this file secure.After saving the configuration file, reload Continue.dev. In VS Code, you can reload the window (Cmd/Ctrl + Shift + P → "Developer: Reload Window"). The MCP server will be connected when Continue.dev restarts.
In Continue.dev, you should now see the compress_text tool available. You can verify this by checking available tools or using compression in your AI conversations.
Compress large code contexts before sending to AI:
You: I have a large codebase context I want to send to the AI.
Can you compress it first using compress_text?
AI: I'll compress the code context for you to reduce token usage.
[AI uses compress_text tool]
Compressed context ready. Original: 5000 tokens, Compressed: 3200 tokens (36% reduction)Compress prompts before including them in AI requests:
You: This prompt is too verbose. Can you compress it?
AI: I'll optimize the prompt using compress_text.
[AI uses compress_text tool]
Here's the compressed version optimized for efficiency...less-token-compression