Turn Neovim into Cursor in Minutes πŸš€



This content originally appeared on DEV Community and was authored by Shrijal Acharya

Why?

You’re on this post, so you probably already know what Cursor is and what you get with it, and that kind of feels lacking in Neovim, right? πŸ™

Let’s be honest, Cursor does feel good, especially for smaller fixes and all, and as a Neovim user, you don’t need to completely ditch Neovim just to get that experience.

Happy Spongebob

In this post, as you read in the title, I’ll show you how you can “turn your Neovim into Cursor in minutes” with great UI and all the vibes in just a few minutes.

(You don’t have to feel bad for wanting a Cursor-like experience in Neovim; it should not, and it does not, hurt your Neovim mindset.)

Convinced? 😏 Jump in!

Prerequisites

You’ll need the following:

  • Neovim 0.10.1 (or higher)
  • Composio MCP for managed production-grade servers
  • A plugin manager. Better if you have lazy.nvim
  • avante.nvim and mcphub.nvim plugins
  • cargo installed
  • Docker installed
  • OpenAI or Claude API key based on your preference

That’s pretty much it!

Setting up the Plugins

πŸ’ Here, I’ll show you how to set up avante.nvim and mcphub.nvim plugins with the lazy.nvim package manager.

First, what are these plugins for?

avante.nvim emulates the cursor-like experience in your Neovim, and mcphub.nvim allows you to add MCP capabilities to Avante.

Now, the steps might differ based on how you’ve structured your plugins. Basically, you might have a plugins directory with all your plugins. First, figure this out and follow along.

Let’s start with setting up mcphub.nvim. Create a new file mcphub.lua and add the following lines of code:

return {
    "ravitemer/mcphub.nvim",
    dependencies = {
        "nvim-lua/plenary.nvim",
    },
    build = "npm install -g mcp-hub@latest",  -- Installs `mcp-hub` node binary globally
    config = function()
        require("mcphub").setup()
    end
}

But think of it just as an MCP marketplace to install other MCP servers, and now we need to add a way to communicate with all the servers we install.

That’s where avante.nvim comes in. Create a new file avante.lua and add the following lines of code:

return {
  'yetone/avante.nvim',
  build = function()
    -- conditionally use the correct build system for the current OS
    if vim.fn.has 'win32' == 1 then
      return 'powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false'
    else
      return 'make'
    end
  end,
  event = 'VeryLazy',
  version = false, -- Never set this value to "*"! Never!
  ---@module 'avante'
  ---@type avante.Config
  opts = {
    -- add any opts here
    -- for example
    provider = 'claude',
    -- provider = 'openai',
    providers = {
      claude = {
      -- openai = {
        endpoint = '<https://api.anthropic.com>',
        model = "claude-sonnet-4-20250514",
        api_key_name = 'CLAUDE_API_KEY',
        -- model = 'o3-mini',
        -- api_key_name = 'OPENAI_API_KEY',
        timeout = 30000, -- Timeout in milliseconds
        extra_request_body = {
          temperature = 0.75,
          max_tokens = 20480,
        },
      },
    },
  },
  dependencies = {
    'nvim-lua/plenary.nvim',
    'MunifTanjim/nui.nvim',
    --- The below dependencies are optional,
    'echasnovski/mini.pick', -- for file_selector provider mini.pick
    'nvim-telescope/telescope.nvim', -- for file_selector provider telescope
    'hrsh7th/nvim-cmp', -- autocompletion for avante commands and mentions
    'ibhagwan/fzf-lua', -- for file_selector provider fzf
    'stevearc/dressing.nvim', -- for input provider dressing
    'folke/snacks.nvim', -- for input provider snacks
    'nvim-tree/nvim-web-devicons', -- or echasnovski/mini.icons
    'zbirenbaum/copilot.lua', -- for providers='copilot'
    {
      -- support for image pasting
      'HakonHarnes/img-clip.nvim',
      event = 'VeryLazy',
      opts = {
        -- recommended settings
        default = {
          embed_image_as_base64 = false,
          prompt_for_file_name = false,
          drag_and_drop = {
            insert_mode = true,
          },
          -- required for Windows users
          use_absolute_path = true,
        },
      },
    },
    {
      -- Make sure to set this up properly if you have lazy=true
      'MeanderingProgrammer/render-markdown.nvim',
      opts = {
        file_types = { 'markdown', 'Avante' },
      },
      ft = { 'markdown', 'Avante' },
    },
  },
  config = function()
    require('avante').setup {
      -- system_prompt as function ensures LLM always has latest MCP server state
      -- This is evaluated for every message, even in existing chats
      system_prompt = function()
        local hub = require('mcphub').get_hub_instance()
        return hub and hub:get_active_servers_prompt() or ''
      end,
      -- Using function prevents requiring mcphub before it's loaded
      custom_tools = function()
        return {
          require('mcphub.extensions.avante').mcp_tool(),
        }
      end,
    }
  end,
}

Don’t worry, there’s no rocket science here; it’s all the default config you’ll find on the avante.nvim GitHub repository.

Here, I’m using Claude as they recommend, but you could simply use OpenAI as well. Just comment out the Claude part and uncomment the OpenAI part in the above code, and you should be fine.

The only change I’ve made in the above code is to change the config function to set up the mcphub extension for avante, which is also something you’ll find in their documentation.

That’s pretty much all the work you need to do to set up the basics. ✌

Demo (avante.nvim + mcphub.nvim in action)

Okay, so now that the setup is done, we can simply install any MCP servers we want from MCP Hub and start using them with Avante.

Run the following command to run the MCP Hub and view the marketplace:

:MCPHub

That’s pretty much it. Now, you can easily get access to all the local MCP servers that are available in the marketplace following the instructions.

Great, but to run remote MCP servers, which in our case is Composio’s MCP server, we need to access the SSE URL.

Head over to mcp.composio.dev and under the Slack MCP server, generate an SSE URL (You don’t need to sign up for an account):

Composio MCP

Just like any other MCP client, you’ll have a servers.json in your config directory, which for me is: /home/shricodev/.config/mcphub/servers.json, and it holds all the server configs.

I’ve added a few local servers (Git and Time) and a Slack server that uses Composio, and here’s how the servers.json file looks:

Make sure that you change the url field to the URL you just generated above.

// 👇 ~/.config/mcphub/servers.json

{
  "mcpServers": {
    "slack": {
      "url": "https://mcp.composio.dev/partner/composio/slack/<mcp_secret>"
    },
    "time": {
      "args": ["run", "-i", "--rm", "mcp/time"],
      "command": "docker"
    },
    "git": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "--mount",
        "type=bind,src=/home/shricodev/codes,dst=/personal",
        "mcp/git"
      ]
    }
  }
}

The moment you make the change in the servers.json file, you should see that some Docker containers are spun up automatically by MCP Hub for local servers:

Docker containers running MCP locally

If you’re not using any remote MCP Servers with Composio, that’s pretty much it. Now you can simply start using it right away.

But, if you wish to use MCP servers from Composio and if you’ve configured the Composio part properly, you should see a list of all the available actions for the specific tool (in my case, Slack) in the MCP Hub UI.

Composio Slack MCP Server tools

Now, there’s one small step left, which is to initiate authentication. You can easily do this by running :AvanteAsk in the Neovim command line and asking the LLM to initiate the connection, and it will give you a URL to do OAuth2.

Composio MCP Authentication URL

Head over to that URL, and you should be authenticated easily.

Composio authentication success page

Once that is done, check the connection, and you are ready to go.

Here’s a quick demo of me using these together with Slack:

Here’s the local MCP server with Git demo:

Conclusion

How easy is that, right? Even the servers.json is consistent with how Cursor handles it.

So, is this a drop-in replacement for Cursor in Neovim? Yes and no.

Yes, because it emulates the cursor experience well, and no, because the workflow is still not perfect. The plugins are still being developed, and you might run into some issues here and there.

That’s it for this blog. Let me know if adding this extra capability to Neovim sounds cool and how it works for you in the comments! πŸ‘‡


This content originally appeared on DEV Community and was authored by Shrijal Acharya