# LibreChat MCP for AI Agents AI Agent Connect

> LibreChat MCP connects your self-hosted AI environment to any MCP-compatible client. It lets your agent interact with private models, manage custom agents, and generate completions using your existing LibreChat setup. It's the bridge between your private infrastructure and your favorite AI tools. Whether you're running local models or a private cloud, this Connector brings your specialized agents into your favorite workspace.

## Overview
- **Category:** productivity
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_2Y5OcBZjfHKkJsGbCGI3uDOzGTusTgIZgBtbs3a3/ai-agent-connect
- **Tags:** llm-orchestration, chat-interface, self-hosted, model-management, ai-agents, unified-api

## Description

LibreChat connects your self-hosted AI environment to any MCP-compatible client. Instead of clicking through tabs in your self-hosted instance to see which models are active or which agents are ready, this Connector lets your AI client do the heavy lifting for you. You get to treat your private LibreChat setup like a plug-and-play resource. When you're building automated workflows or just want to switch between specialized agents without manual configuration, this connection handles the handshake. It turns your local LLM environment into a reachable toolset for your agent. By adding this to the Vinkius catalog, you're making your private infrastructure accessible to tools like Claude or Cursor without exposing your data to public APIs. You don't have to jump between interfaces anymore. Your agent just knows where the models are and how to talk to them. It bridges the gap between your private data and the high-level reasoning of your favorite agent. You can finally use your custom-tuned models exactly where you work, without the friction of copy-pasting prompts or manually switching context. It makes your self-hosted setup feel like a native part of your dev workflow. This is ideal for those who need to keep their data local but want the flexibility of a modern, multi-agent system. You get the best of both worlds: total privacy and a high-quality user experience.

## Tools

### login
Login to LibreChat to get access and refresh tokens. This handles authentication so you don't have to manage static keys manually.

### chat_completions
Create a chat completion using the Agents API by targeting a specific Agent ID. This lets your agent talk directly to your custom setup.

### list_models
List available LibreChat models and agents. Use this to see everything your current instance has to offer.

### open_responses
Create a response using the Open Responses API to get structured AI outputs. This is useful for getting predictable data formats from your local models.

## Prompt Examples

**Prompt:** 
```
List all available agents in my LibreChat instance.
```

**Response:** 
```
I've checked your LibreChat instance. Here are the agents you can use right now:

| Agent Name | ID |
| :--- | :--- |
| **Research Assistant** | `agent_123` |
| **Code Interpreter** | `agent_456` |
| **General Chat** | `agent_789` |

Which one would you like to use for your next task?
```

**Prompt:** 
```
Login to LibreChat using my credentials.
```

**Response:** 
```
### Authentication Successful

I've successfully logged into your LibreChat instance. 
- **Status:** Connected
- **Session:** Active
- **Tokens:** Retrieved

You can now ask me to run completions or list models without further authentication.
```

**Prompt:** 
```
Ask agent_123 to summarize the latest trends in AI.
```

**Response:** 
```
Sending your request to the **Research Assistant** (agent_123)...

**Agent Response:**

> "The current landscape is shifting toward **multi-modal capabilities** and **autonomous agentic workflows**. There is also a significant push toward **efficient small language models (SLMs)** that can run on consumer hardware without sacrificing much reasoning power."

Would you like me to dive deeper into any of those specific areas?
```

## Capabilities

### List active agents
See all models and agents available in your LibreChat instance at once.

### Generate chat completions
Send prompts to specific agents and get back full chat responses.

### Create structured outputs
Generate specific, structured data from your private models using the Open Responses API.

### Fetch session tokens
Authenticate with your credentials to keep your session active and secure.

## Use Cases

### Testing local models in your IDE
An AI engineer wants to see how a locally hosted model handles code refactoring. They ask their agent to run a completion via chat_completions.

### Automated structured data extraction
A researcher needs to pull data from a private agent. They use open_responses to get a clean, structured output for their report.

### Centralizing private agent access
A power user wants to use their 'Research' and 'Writing' agents in one place. They use list_models to see all available options.

### Secure session management
A user doesn't want to share a static API key. They use the login tool to securely grab tokens for their current session.

## Benefits

- Access your private models directly from your IDE using chat_completions.
- See every active agent in your setup instantly with list_models.
- Get structured data from your local LLMs using open_responses.
- Skip manual API key rotation by using the login tool for session management.
- Connect your self-hosted infrastructure to any MCP-compatible client without data leaks.
- Switch between different specialized agents without leaving your primary workspace.

## How It Works

The bottom line is you get a direct bridge from your local LLM setup to your favorite AI tools without manual switching.

1. Gather your LibreChat Base URL and your API Key from your instance settings.
2. Connect this Connector to your client and provide the credentials to establish a link.
3. Ask your agent to list models, run completions, or generate structured data.

## Frequently Asked Questions

**Does the LibreChat MCP work with my local LLM setup?**
Yes, it's specifically designed to bridge your self-hosted LibreChat instance with your AI client. It lets you use your private models directly in your workspace.

**Can I use the LibreChat MCP with Cursor or Windsurf?**
Absolutely. Since it follows the Connector standard, you can connect it to any compatible client like Cursor, Windsurf, or Claude.

**Do I need a static API key to use the LibreChat MCP?**
No, you don't have to. While you can use a key, the Connector includes a login tool that allows you to authenticate with your email and password to get session tokens.

**How does the LibreChat MCP handle different agents?**
It treats your agents as reachable tools. You can list them all at once and then tell your AI client which specific agent ID to use for a task.

**Is my data private when using the LibreChat MCP?**
Yes. Because it connects to your self-hosted instance, your data stays within your infrastructure. The Connector just acts as the bridge between your client and your host.

**Can the LibreChat MCP generate structured outputs?**
Yes, it supports the Open Responses API, which means you can ask your agent to return specific data formats like JSON instead of just plain text.

**How can I see which agents are currently available in my LibreChat instance?**
You can use the `list_models` tool. It will query your configured LibreChat instance and return a list of all accessible agents and models associated with your credentials.

**Can I use this server to chat with a specific agent by its ID?**
Yes! Use the `chat_completions` tool. Simply provide the `model` (which is the Agent ID) and an array of `messages` to generate a response from that specific agent.

**What should I do if I don't have a static API key for my instance?**
You can use the `login` tool. By providing your email and password, the server will authenticate with LibreChat and retrieve the necessary access tokens for subsequent requests.