---
title: "MCP Servers"
id: "481"
type: "page"
slug: "mcp-servers"
published_at: "2026-05-30T11:07:11+00:00"
modified_at: "2026-06-10T15:56:44+00:00"
url: "https://xedant.com/code/docs/mcp-servers"
markdown_url: "https://xedant.com/code/docs/mcp-servers.md"
excerpt: "MCP (Model Context Protocol) servers extend Xedant Code’s capabilities by providing additional tools and data…"
---

# MCP Servers

[https://xedant.com/code/docs/mcp-servers.md](https://xedant.com/code/docs/mcp-servers.md)

MCP (Model Context Protocol) servers extend Xedant Code’s capabilities by providing additional tools and data sources that the AI can use during conversations. With MCP servers, Claude Code gains access to external services — file systems, databases, web APIs, search engines, and more — without any built-in integration code.

 ![MCP Servers Dialog](https://xedant.com/wp-content/uploads/2026/06/mcp-servers-dialog.png) **Consider skills first.** Unless there is a real need, prefer scripts inside skills for accessing external tools or data. MCP servers bloat context with all their function definitions and detailed descriptions — that overhead is paid on every turn. Skills are loaded only on demand, support progressive discovery (tool parameters are fetched only when you actually call them), and give you fine-grained control — you can update incorrect tool descriptions when you notice the model repeatedly makes mistakes calling them.

It is also much easier to ask the model to write a simple Python script for database or file access than to find an MCP server that does exactly what you need and then coax the model into using it the way you want. This entire website is edited this way — creating and debugging the WordPress scripts took less than 10 prompts, and the result is not only something that works but is easily debuggable and extendable.

## How It Works

MCP servers run as separate processes that communicate with Claude Code through a standardized protocol. Xedant Code manages their configuration in `.xedant/mcp.yml` and synchronizes it with the Claude Code CLI by updating the project-level MCP settings (not global settings). When a chat session starts, Claude Code connects to all enabled servers and their tools become available to the AI alongside the built-in tools.

MCP server configurations support three transport types:

- **STDIO** — runs the server as a local child process (most common for Node.js and Python-based servers)
- **HTTP** — connects to a remote server over HTTP (for cloud-hosted MCP services)
- **SSE** — connects using Server-Sent Events (legacy, being superseded by HTTP)

## MCP Servers Dialog

Open the MCP Servers dialog from the main menu. The dialog has two main areas:

- **Server list** (left panel) — shows all configured servers grouped by source: app-managed (configured through Xedant Code), external (configured directly in Claude CLI), and plugin servers. Each server shows its name and a status indicator (green dot for enabled).
- **Configuration panel** (right panel) — displays the selected server’s settings for viewing and editing.

The dialog header provides import/export actions: **Copy All Servers** (exports configuration as JSON to clipboard), **Paste** (imports configuration from clipboard JSON), and **Refresh** (reloads the server list from Claude Code CLI).

## Adding an MCP Server

### To add a new server:

1. Open the MCP Servers dialog from the main menu
2. Click “Add Server” in the server list panel
3. Enter a unique server name (names must be unique across all servers)
4. Configure the server settings in the configuration panel
5. Click “Save Changes” to persist the configuration

New servers are created with STDIO transport and an empty command by default. Select the appropriate transport type and fill in the required fields for your server.

## Server Configuration Fields

The configuration panel shows different fields depending on the transport type selected:

### STDIO Servers

- **Type** — set to `stdio` for local process servers
- **Command** — the full command to start the server (e.g., `npx -y @modelcontextprotocol/server-github`). The command is automatically split into the executable and arguments.
- **Environment Variables** — key-value pairs passed to the server process (e.g., `GITHUB_TOKEN` for GitHub MCP servers)

### HTTP / SSE Servers

- **Type** — set to `http` or `sse` for remote servers
- **URL** — the server endpoint URL (e.g., `https://mcp.context7.com/mcp`)
- **Headers** — HTTP headers sent with requests (e.g., `CONTEXT7_API_KEY` for authentication)

### Common Fields

- **Enabled** — toggle to enable or disable the server without deleting its configuration
- **Rename** — rename the server while preserving its configuration
- **Delete** — remove the server (requires confirmation)

## Configuration File

MCP server configuration is stored in `.xedant/mcp.yml` in your project directory. This file is safe to commit to version control — it does not contain secrets by default (API keys are typically set via environment variables).

```
version: 1.0
servers:
  context7:
    enabled: true
    type: http
    url: https://mcp.context7.com/mcp
    headers:
      CONTEXT7_API_KEY: $CONTEXT7_API_KEY

  github:
    enabled: true
    type: stdio
    command: npx -y @modelcontextprotocol/server-github
    env:
      GITHUB_TOKEN: $GITHUB_TOKEN
```

The `$VARIABLE_NAME` syntax references system environment variables, so sensitive values stay out of the repository. See the [Environments](/code/docs/environments)
 page for more about variable substitution.

**Synchronization:** When you save changes in the dialog, Xedant Code writes the updated configuration to `.xedant/mcp.yml` and automatically syncs it with the Claude Code CLI using `claude mcp add` and `claude mcp remove` commands. This ensures the AI can immediately use the updated server list without restarting.

## Importing and Exporting

The MCP dialog supports clipboard-based import/export for quick server sharing between projects:

- **Copy All Servers** — exports the entire server configuration as JSON to your clipboard
- **Copy single server** — right-click a server in the list and select copy to export just that server
- **Paste** — imports JSON from your clipboard. If server names conflict with existing ones, you’re prompted to choose: overwrite the existing server or skip the import.

## Troubleshooting

- **Server not appearing in available list** — click “Refresh” in the dialog header to reload from the Claude Code CLI. If the server is disabled, enable it and save.
- **STDIO server fails to start** — verify the command is correct and the required runtime (Node.js, Python, etc.) is installed on the server. Check the command field — it should be the full command including arguments (e.g., `npx -y @modelcontextprotocol/server-github`).
- **HTTP server connection errors** — verify the URL is correct and accessible from the server. Check that any required headers (API keys, authentication tokens) are properly set.
- **Sync failures** — if Xedant Code fails to sync with Claude Code CLI, check the Claude Code installation path. Use `XEDANT_CODE_CLAUDE_PATH` to set a custom path if needed (see [Environments](/code/docs/environments) ).
- **Environment variable not resolving** — ensure the referenced environment variable is set in your system environment or Docker configuration, not just in Xedant Code’s environment variables. The `$VARIABLE_NAME` syntax in `mcp.yml` resolves from the system environment.

**[← Settings](/code/docs/settings)**

**[Hooks →](/code/docs/hooks)**
