Model Context Protocol (MCP) in open-source AI tools: LibreChat, LobeChat, CopilotKit and Open WebUI in 2026
How MCP works
MCP has three roles. A host is the AI application the user works in, such as Claude Desktop, Cursor or LibreChat. Inside the host, an MCP client connects to each server. A server offers three kinds of things:
| Primitive | Controlled by | Example |
|---|---|---|
| Tools | The model decides when to call | create_issue, run_query, send_message |
| Resources | The app or user chooses to attach | A file, a database schema, a document |
| Prompts | The user picks from a menu | "Summarize this pull request" template |
Messages use JSON-RPC. Servers run either locally, connected over standard input and output, or remotely over streamable HTTP, which replaced the earlier HTTP with server-sent events transport in 2025. Clients can also offer features back to servers, such as sampling, which lets a server ask the client's model to generate text, and elicitation, which lets a server ask the user for input mid-task.
Which directory projects support it
| Project | MCP support |
|---|---|
| LibreChat | Connects to local and remote MCP servers; tools available to agents and chats; per-user OAuth for remote servers |
| LobeChat | MCP plugin system with a marketplace and one-click install of servers |
| CopilotKit | Connects in-app copilots and agents to MCP servers |
| Open WebUI | Native MCP support for streamable HTTP servers, and the mcpo proxy that turns MCP servers into OpenAPI tools |
Most commercial assistants also act as MCP clients, including Claude, ChatGPT, Gemini, Microsoft Copilot, Cursor, Windsurf, VS Code, Zed, JetBrains IDEs and coding agents such as Claude Code, Codex CLI and Gemini CLI.
The 2026-07-28 revision
| Change | Why it matters |
|---|---|
| Stateless requests with per-request metadata | Any server instance can answer any request, so MCP servers scale behind ordinary load balancers and on serverless platforms |
| Initialize handshake retired | Fewer round trips and no session to lose when a connection drops |
server/discover | Clients learn a server's capabilities without opening a session |
| Multi-round-trip requests | A tool call can pause for user input or a model call and resume cleanly |
| Header-based routing | Gateways can route MCP traffic by HTTP header without parsing the JSON body |
| Cacheable lists | Clients can cache tool and resource lists, cutting repeated requests |
| Extensions | Optional features can evolve outside the core spec |
| Authorization hardening | Tighter OAuth rules for remote servers |
Earlier revisions built the base: 2025-03-26 added streamable HTTP and OAuth, 2025-06-18 added structured tool output and elicitation, and 2025-11-25 added tasks for long-running operations and other features. Check which revision a client and server support; SDKs negotiate versions, but older servers may lack newer features.
Governance
Anthropic released MCP as an open specification in November 2024. OpenAI adopted it in March 2025, Google and Microsoft soon after. In December 2025, Anthropic donated MCP to the Agentic AI Foundation, a new fund under the Linux Foundation co-founded with OpenAI and Block, which also holds OpenAI's AGENTS.md and Block's goose agent. Specification changes go through a public proposal process.
Popular MCP servers
| Server | What it gives the model |
|---|---|
| GitHub | Issues, pull requests, code search, Actions |
| Filesystem | Read and write files in allowed folders |
| Playwright | Control a browser to test and automate web pages |
| PostgreSQL and other databases | Inspect schemas and run queries |
| Slack, Linear, Notion, Atlassian | Read and act in work tools |
| Context7 and documentation servers | Current library docs for coding agents |
| Sentry, Datadog | Errors and monitoring data |
Registries list thousands more. The official MCP Registry, launched in 2025, provides a central index of public servers that clients and private registries can build on.
Building an MCP server
With an official SDK, a server takes a few dozen lines: declare tools with names, descriptions and input schemas, and write the functions that run them. Good tools have clear descriptions written for the model, narrow inputs, and outputs that are compact and structured, since everything a tool returns uses up the model's context. Prefer a few well-designed tools over wrapping every API endpoint one to one. Test servers with the MCP Inspector, a debugging tool from the MCP project.
Hosting remote MCP servers
Remote servers run as web services. After the 2026-07-28 revision removed sessions, they suit serverless platforms such as Cloudflare Workers, Vercel functions and AWS Lambda. Protect them with OAuth, as the spec describes, and never pass a user's token through to downstream APIs without checking it was issued for your server. Gateways can sit in front of many MCP servers to centralize authentication, logging and access policy.
Security risks
MCP connects models to real systems, so mistakes have real effects:
- Prompt injection. Content returned by a tool, such as an email or web page, can contain instructions the model follows. Limit which tools can act after reading untrusted content.
- Tool poisoning. A server's tool descriptions can hide instructions. Review servers before installing them.
- Supply chain. Local servers often run through
npxoruvx, fetching the latest package each time. Pin versions; malicious MCP packages have appeared on npm. - Over-broad permissions. Give database servers read-only credentials and filesystem servers only the folders they need.
- Confused deputy. A server acting with its own broad credentials on behalf of many users can leak data between them. Use per-user authorization.
Running local servers in containers, for example through Docker's MCP Toolkit, limits what a compromised server can reach; see the Docker stack page.
Using MCP in a self-hosted chat app
In LibreChat, MCP servers are declared in the librechat.yaml configuration file, with a command for local servers or a URL for remote ones, and the tools then appear for agents and chats. Open WebUI lets administrators add MCP servers by URL in its settings. LobeChat offers a plugin marketplace that installs MCP servers with a click. In a shared deployment, decide which servers every user may use, keep credentials in environment variables rather than configuration committed to Git, and prefer remote servers with per-user OAuth when tools act on personal accounts such as email or calendars.
MCP compared with other approaches
| Approach | When it fits |
|---|---|
| MCP server | Tools that many clients should share |
| Direct function calling in your app | Tools specific to one app, with no need for reuse |
| OpenAPI tools | Existing REST APIs; Open WebUI's mcpo bridges the two |
| Agent-to-agent protocols such as A2A | Agents delegating tasks to other agents rather than calling tools |
| Agent skills | Packaged instructions and scripts the model loads when relevant |
Related: TypeScript stack, Python stack, Anthropic API stack, Playwright stack, Docker stack, Stack index.
Frequently asked questions
What problem does MCP solve?
Before MCP, every AI app needed its own integration for every tool: a GitHub plugin for one chat app, a different one for another. MCP defines one protocol, so a tool built once as an MCP server works in every client that speaks MCP, and a client that supports MCP can use thousands of existing servers.
What changed in the 2026-07-28 MCP specification?
Requests became stateless, carrying the metadata they need with each call, and the initialize handshake was retired, which makes MCP servers easier to run behind load balancers and on serverless platforms. The revision also added server/discover for finding a server's capabilities, multi-round-trip requests, routing by HTTP headers, cacheable tool and resource lists, an extensions mechanism and hardened authorization.
Are MCP servers safe to install?
Treat them like any software with access to your data. A malicious or compromised server can steal credentials or files, and tool descriptions or tool output can contain prompt injection that steers the model. Install servers from trusted sources, pin versions, run local servers in containers where possible, and review what each tool can do before approving it.
What is the difference between local and remote MCP servers?
Local servers run on your machine and talk to the client over standard input and output. Remote servers run on the web and use the streamable HTTP transport with OAuth for authorization. Remote servers are easier to share across a team; local ones can reach local files and apps.
Which languages have official MCP SDKs?
Official SDKs exist for TypeScript, Python, Go, C#, Java, Kotlin, Ruby, Rust, Swift and PHP, maintained with partners such as Google, Microsoft, Shopify and JetBrains. The MCP project rates SDKs by tier; four are Tier 1, meaning full and prompt support for the specification.