Configure MCP Servers in Vibe
On this page
Lesson updated November 2, 2026 based on the Vibe Code MCP servers page: authentication now uses the
[mcp_servers.auth]table (api_key_envor OAuth); the${VARIABLE}syntax in headers, previously shown, is not documented for MCP servers. Addedvibe mcp addand/mcpsubcommands. Source: MCP servers.
What Is MCP?
The Model Context Protocol (MCP) is an open standard that lets AI agents communicate with external tool servers. Instead of hard-coding every integration, MCP provides a unified protocol: the server exposes tools, and the agent discovers and uses them automatically. You don’t write any glue code. You just declare an address or a command, and the tools appear in your next session.
Vibe has native MCP support, which means you can extend its capabilities far beyond the built-in tools—reading a web page, querying a database, or calling an internal company API.
The Two Transport Types
Before you configure anything, you need to decide on the transport—the channel Vibe uses to talk to the server.
With HTTP transport, the MCP server runs as a standard web service, and Vibe sends requests to discover and call tools:
[[mcp_servers]]
name = "my_http_server"
transport = "http"
url = "http://localhost:8000"
headers = { "Authorization" = "Bearer my_token_here" }
Use this mode when the MCP server runs continuously—a database service, an internal API, or a web tool shared by your whole team.
With STDIO transport, the server is a local program that Vibe launches itself, communicating via stdin/stdout:
[[mcp_servers]]
name = "fetch_server"
transport = "stdio"
command = "uvx"
args = ["mcp-server-fetch"]
This is the simplest mode to set up because Vibe manages the server lifecycle: it starts the server at the beginning of the session and stops it at the end. No manual startup, no monitoring required.
There’s also an HTTP variant called streamable-http, designed for long-lived connections with streaming:
[[mcp_servers]]
name = "my_stream_server"
transport = "streamable-http"
url = "http://localhost:9000/mcp"
Worked Example: Adding Web Fetching
One of the most useful MCP servers is mcp-server-fetch, which lets Vibe read the content of web pages. It takes just three lines of configuration:
# ~/.vibe/config.toml
[[mcp_servers]]
name = "fetch"
transport = "stdio"
command = "uvx"
args = ["mcp-server-fetch"]
The impact on your daily workflow is immediate. You can now make requests that assume external reading:
Read the FastAPI documentation at fastapi.tiangolo.com and summarize the security endpoints for me
The agent automatically calls the fetch tool from the MCP server to get the page, then analyzes its content. You don’t have to open a browser or paste documentation snippets into the terminal.
Filtering MCP Tools
This convenience comes with a trade-off. Each server you add brings its own set of tools, and with three or four active servers, the catalog gets cluttered. Filtering lets you keep only what’s relevant:
# Enable only tools from a specific server
enabled_tools = ["fetch_*"]
# Disable all MCP tools except those explicitly enabled
disabled_tools = ["mcp_*"]
Wildcard filtering serves two purposes at once. It strengthens security by limiting what the agent is allowed to do, and it prevents overloading the model’s context: a tool list that’s too long eats up valuable context and degrades the quality of the agent’s decisions.
Advanced Configuration with Authentication
Enterprise MCP servers almost always require authentication. For a token, the [mcp_servers.auth] table in static mode reads the key from an environment variable whose name you provide, then inserts it into the header of your choice:
[[mcp_servers]]
name = "internal_api"
transport = "http"
url = "https://mcp.your-company.com"
[mcp_servers.auth]
type = "static"
api_key_env = "MCP_API_TOKEN" # variable name, not the token itself
api_key_header = "Authorization" # default value
api_key_format = "Bearer {token}" # default value
For a server that offers OAuth login, like Linear’s, set type = "oauth" and log in during your session with /mcp login <name>: Vibe opens your browser and stores the tokens in the system keychain, never in config.toml. The vibe mcp add command handles all of this from the terminal: vibe mcp add linear --url https://mcp.linear.app/mcp adds the server and starts the login flow.
The benefit is straightforward: you can version and share your config.toml file with your team without hard-coding any secrets, since each developer provides their own token through their environment.
Popular MCP Servers
Several ready-to-use servers cover the most common needs, and they all get declared the same way in config.toml. mcp-server-fetch handles web page and API retrieval; mcp-server-filesystem expands file operations beyond the built-in tools; mcp-server-git brings advanced Git integration with diff, blame, and log; mcp-server-sqlite and mcp-server-postgres enable querying of SQLite and PostgreSQL databases. An agent that can read both a database schema and the code that uses it spots inconsistencies that file reading alone would never reveal.
During a session, /mcp lists the servers and /mcp <name> lists their tools; /mcp status shows the state of each one. The agent also tells you which tools it’s using in its responses, which remains the best way to verify that a server is actually working.
MCP Server Security
An MCP server runs with your permissions and sees what you give it: add only trusted servers, because a malicious server could expose data from your codebase. Then limit permissions with enabled_tools instead of granting full access by default.
Two habits complete this hygiene routine. Check your headers: no token should appear in plain text in config.toml; that’s exactly what api_key_env is for. And for local tools, prefer STDIO transport, which is safer than an HTTP server exposed on the network, if only because it doesn’t open any ports.
Key Takeaways
- MCP lets you add external tools to Vibe through a standardized protocol
- Two main transports: HTTP (persistent server) and STDIO (local process)
- Tool filtering (
enabled_tools,disabled_tools) controls what the agent can use - Environment variables in headers protect secrets
- Add only trusted MCP servers and limit their permissions