Self-Hosted AI Chat · Open Source

Add MCP Tool Calling to LibreChat

LibreChat is a popular open-source, self-hosted ChatGPT alternative that supports multiple AI providers. Its MCP server plugin lets you add tool calling capabilities. Connect Agent MCP Studio to give LibreChat access to browser-built Python, SQL, and API tools.

Share:

Prerequisites

Step-by-Step Setup

  1. Start bridge.js on the LibreChat server

    curl -O https://agentmcp.studio/bridge.js && npm install ws
    # Keep running (use pm2 or systemd for persistence):
    node bridge.js wss://agentmcp.studio/api/relay/YOUR-UUID

    Open the studio → SettingsMCP Relay Bridge → click Connect.

  2. Edit librechat.yaml

    In your LibreChat installation, edit librechat.yaml and add the MCP server configuration:

    mcpServers:
      agent-mcp-studio:
        command: node
        args:
          - /path/to/bridge.js
          - wss://agentmcp.studio/api/relay/YOUR-UUID
        type: stdio
  3. Restart LibreChat and enable tools

    Restart the LibreChat server. In the chat interface, select a model that supports tool use and enable Plugins or Tools mode. Your browser tools will appear in the available tools list.

Frequently Asked Questions

Yes — LibreChat supports MCP via its librechat.yaml configuration. Add your MCP server under the mcp section and LibreChat's AI agents can call your Agent MCP Studio tools during conversations.

LibreChat is an open-source, self-hosted ChatGPT alternative that supports multiple AI providers (OpenAI, Anthropic, Google, local Ollama models). It offers a feature-rich UI with plugins, RAG, agents, and MCP tool support.

MCP servers are configured in your librechat.yaml file in the LibreChat root directory. Add a mcp key with server entries specifying the command and arguments for bridge.js.

MCP tool calls depend on the AI model's function calling support. In LibreChat, MCP tools work with Claude (full support), GPT-4o, and Gemini. Models without function calling won't invoke MCP tools.

No — LibreChat reads librechat.yaml at startup. Just restart the LibreChat server process after editing the YAML and your MCP tools will be available without rebuilding.

Related Integrations