Skip to content

MCP server for IDE integration (Model Context Protocol) #12

Description

@xodapi

Problem

Modern IDE agents (Cursor, Windsurf, Roo Code) use the Model Context Protocol (MCP) to discover tools and resources. Currently vimit has no MCP interface, so IDE integration requires manual plugin setup.

Solution

Expose vimit as an MCP server that provides:

  1. Resources - read-only access to:
    • Cache contents (stored responses per endpoint)
    • Trend data (historical usage from redb)
    • Current status snapshot (limits, latency, active endpoint)
  2. Tools - actions the IDE can invoke:
    • check_limits - run a status check and return results
    • invalidate_cache - force clear a specific endpoint cache
    • switch_account - rotate to the next configured account
  3. Prompts - reusable prompt templates:
    • Usage summary prompt for code review context

Architecture

  • Listen on stdio (standard MCP transport for IDE plugins)
  • Add --mcp flag to start in MCP server mode
  • Reuse existing HttpClient, CacheStore, Router, TrendStore
  • Use the mcp-rs or rmcp crate (check ecosystem)

Acceptance Criteria

  • vimit --mcp starts an MCP server on stdio
  • IDE can discover resources and tools via mcp list
  • check_limits tool returns valid JSON matching existing output
  • cache resource returns cached entries

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agentГотово к выполнению агентомenhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions