LessTokens Logo
Mcp Server
Vscode

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 →

VS Code Integration

Integrate LessToken's compression capabilities into VS Code using MCP-compatible extensions. Use compression tools directly in your VS Code workflow.

Overview

Visual Studio Code supports MCP servers through various extensions and configurations. By configuring VS Code to use our MCP server, you can access compression tools directly in your development environment.

This integration allows you to compress code, documentation, and prompts before sending them to AI models, reducing token usage and improving efficiency.

Prerequisites

  • VS Code installed on your system
  • A LessToken API key (get one here)
  • An MCP-compatible extension installed (e.g., Continue.dev, Cursor, or similar)

Configuration Steps

1

Install MCP-Compatible Extension

Install an MCP-compatible extension in VS Code. Popular options include:

  • Continue.dev - AI coding assistant with MCP support
  • Cursor - AI-powered code editor (if using Cursor, see Cursor IDE guide)
  • Other MCP-compatible VS Code extensions
2

Configure MCP Server

Configure the MCP server in your extension's settings. The configuration format depends on your extension, but typically involves adding the server URL and API key:

VS Code Settings (example)
{
  "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. The exact configuration location depends on your extension.
3

Restart VS Code

After saving the configuration, restart VS Code completely. The MCP server will be connected when VS Code starts.

4

Verify Integration

In VS Code, you should now see the compress_text tool available in your AI assistant. You can verify this by checking available tools or using compression in your conversations.

Using with Continue.dev Extension

If you're using the Continue.dev extension in VS Code, you can configure the MCP server in the Continue.dev configuration file:

~/.continue/config.json
{
  "mcpServers": {
    "less-token-compression": {
      "url": "https://lesstokens.hive-hub.ai/api/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY_HERE"
      }
    }
  }
}

For more detailed instructions, see our Continue.dev integration guide.

Troubleshooting

MCP Server Not Connecting

  • Verify your API key is correct in the configuration
  • Ensure VS Code has been restarted after configuration changes
  • Check the extension's output/logs for connection errors
  • Verify the MCP server URL is accessible from your network
  • Ensure your extension supports MCP servers

Extension-Specific Issues

  • Check your extension's documentation for MCP server configuration
  • Verify the configuration format matches your extension's requirements
  • Try updating your extension to the latest version

Additional Resources

MCP Server Docs

Return to the main MCP server documentation.

VS Code Docs

Official VS Code documentation.