Skip to content

Register Lua functions as MCP tools #203

Open

Description

@guill

Hello!

First of all, just want to say thanks for your work on this plugin -- it has fundamentally changed how I work.

The one thing I missed from this plugin that I used to use in CodeCompanion was the ability to easily register Lua functions in NeoVim as tools for the LLM to use. This is particularly useful to give the LLM access to driving the debugger in NeoVim.

In order to enable this functionality, I made https://github.com/guill/mcp-tools.nvim . While it technically isn't dependent on this plugin, it has integration in a way that allows every instance of OpenCode to connect to the NeoVim instance that created it (assuming it was started by opencode.nvim).

Feel free to close this issue if this isn't the right place to share, but I figure some other people might find it useful 😅

Activity

  1. sudo-tee commented on Jan 25, 2026

    @sudo-tee
    Owner

    This is a really interesting idea.

    I will have a look at the repo you posted and see if this is something that could fit into this plug-in.

  2. jensenojs commented on Mar 17, 2026

    @jensenojs
    Collaborator

    Sorry to bother you, but if you are still using this plugin, would you be interested in telling me more about its potential use cases here? @guill

    We are currently working on code cleanup and refactoring. The discussion under this issue could serve as a benchmark for validating whether the new architecture is sound during the refactoring of api.lua. Ideally, we can organize subsequent related functionalities as recipes or plugins in the future.

  3. phanen commented on Jul 3, 2026

    @phanen
    Contributor

    Made another mcp server here for anyone interested https://github.com/phanen/mcp.nvim

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions