npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

lobechat-mcp-plugin

v1.0.4

Published

Lobe Chat plugin compatible with Model Context Protocol servers

Readme

Lobe Chat MCP and OpenAPI Plugin Server

A server that allows you to connect to MCP (Model Context Protocol) servers and OpenAPI servers and use them as plugins in LobeChat.

Quick Start

  1. Create a config.json file (or copy from config.example.json):
{
  "publicUrl": "http://localhost:3000",
  "upstream": [],
  "servers": {
    "example": {
      "type": "mcp:sse",
      "url": "http://localhost:8080/v1",
      "options": {
        "eventSourceInit": {}
      },
      "author": "Your Name",
      "createdAt": "2023-01-01",
      "homepage": "https://github.com/username/your-project",
      "meta": {
        "avatar": "https://example.com/avatar.png",
        "title": "Example MCP Plugin",
        "description": "An example MCP plugin for LobeChat",
        "tags": ["example", "mcp"]
      }
    }
  }
}
  1. Start the server:
# Start with default config.json in current directory
npx -y lobechat-mcp-plugin

# Or specify a config file path
CONFIG_PATH=./my-config.json npx -y lobechat-mcp-plugin

# Specify a custom port (default is 3000)
PORT=8080 npx -y lobechat-mcp-plugin
  1. Add the plugin to LobeChat by following the steps in the LobeChat documentation:
  • In the chat window, open the plugin list in the toolbar
  • Open the plugin store
  • Add a new custom plugin
  • Provide the Manifest URL: http://localhost:3000/<plugin-name>/manifest.json
  • Install the plugin

By making this way, the plugin does not get automatically updated when you restart the server or the API changes. In order to always fetch the latest version, you can make the server your default marketplace by configuring the PLUGINS_INDEX_URL enviroment variable with the url of your lobechat-mcp-plugin server (e.g. http://localhost:3000). In that case you will be able to see all the plugins in the /discover/plugins page from your lobechat instance.[^1]

[^1]: The plugins view in the marketplace is cached, so it can take up to 12 hours for any new plugin or modification to appear. The store inside the chat always shows the latest plugins.

Defining the configuration options

MCP SSE Server

For connecting to an MCP server over SSE:

{
  "type": "mcp:sse",
  "url": "http://localhost:8080/v1",
  "options": {
    "eventSourceInit": {}, // for customizing the first request, you can provide auth headers for example
    "sourceInit": {}, // for customizing subsequent requests
  },
  // ... other metadata
}

MCP Command Server

For spawning a local command that implements MCP:

{
  "type": "mcp:command",
  "command": "python",
  "args": ["mcp_server.py"],
  "env": {}, // for customizing the environment variables
  // ... other metadata
}

The commands are executed in the same host as the lobechat-mcp-plugin server, so provide a valid path to the command.

Localization

The server supports localization of the plugin metadata. The metadata can be provided for a specific language by adding a meta:<language> property to the plugin configuration. The language should be a valid IETF language tag.

{
  ...
  "servers": {
    "example": {
      ...
      "meta:es-ES": {
        "title": "Ejemplo de plugin MCP",
        "description": "Un ejemplo de plugin MCP para LobeChat"
      }
    }
  }
}

Development

API Endpoints

The server provides the following endpoints:

  • GET / or GET /index*.json - Returns a list of available plugins, combining local plugins with upstream plugins. Used for listing the plugins in the marketplace.
  • GET /:identifier/manifest.json - Returns the manifest for a specific plugin, including its tools and metadata. Used for installing the plugin.
  • POST /gateway - Serves as a gateway for Lobe Chat plugin interactions. This is the main entrypoint for every request from Lobe Chat to the any plugin.
  • POST /:identifier/:name - Handles tool calls for a specific plugin tool, passing the request body as arguments. This is redirected internally by the gateway to run the tool.

Development

# Clone the repository
git clone <repository-url>
cd lobechat-mcp-plugin

# Install dependencies
npm install

# Start development server
npm run dev

# Build the package
npm run build