LessTokens Logo
Mcp Server
Continue Dev

Documentation

Getting Started

  • Overview
  • Account Setup
  • First API Key
  • First Request
  • Understanding Metrics

API Reference

  • Overview
  • Authentication
  • Compressionnew
  • MCP Servernew
  • Errors

Integrations

  • Node.js / TypeScript
  • Python
  • cURL

Resources

  • Best Practices

Need help?

Join our community or contact support for assistance.

Contact Support →

Continue.dev Integration

Integrate LessToken's compression capabilities into your Continue.dev workflow. Use compression tools in your AI-assisted coding sessions to optimize prompts.

Overview

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.

Prerequisites

  • Continue.dev extension installed in your code editor (VS Code, JetBrains, etc.)
  • A LessToken API key (get one here)
  • Access to Continue.dev configuration files

Configuration Steps

1

Locate Continue.dev Config

Continue.dev stores its configuration in a JSON file. The location depends on your editor:

VS Code
~/.continue/config.json
JetBrains IDEs
~/.continue/config.json
2

Edit Configuration File

Open the configuration file and add the MCP server configuration. If the file doesn't exist, create it with the following structure:

config.json
{
  "mcpServers": {
    "less-token-compression": {
      "url": "https://lesstokens.hive-hub.ai/api/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY_HERE"
      }
    }
  }
}
Important: Replace YOUR_API_KEY_HERE with your actual LessToken API key. Keep this file secure.
3

Reload Continue.dev

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.

4

Verify Integration

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.

Usage Examples

Example 1: Compress Code Context

Compress large code contexts before sending to AI:

Continue.dev Chat
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)

Example 2: Optimize Prompts

Compress prompts before including them in AI requests:

Continue.dev Chat
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...

Troubleshooting

MCP Server Not Connecting

  • Verify your API key is correct in the configuration file
  • Ensure Continue.dev has been reloaded after configuration changes
  • Check Continue.dev logs for connection errors
  • Verify the MCP server URL is accessible

Tool Not Available

  • Confirm the configuration file syntax is correct (valid JSON)
  • Check that the MCP server name matches: less-token-compression
  • Try removing and re-adding the MCP server configuration
  • Check Continue.dev's MCP server status

Additional Resources

MCP Server Docs

Return to the main MCP server documentation.

Continue.dev Docs

Official Continue.dev documentation.