# mcpServers Option

> The option that links MCP servers, and their tools, to a session.

**Field:** Artificial Intelligence  
**Category:** Claude Agent SDK  
**Also known as:** mcpServers, mcp_servers, Agent SDK MCP, Claude Agent SDK mcpServers

## Think of it like

It is like plugging new games into a game box.

## Definition

mcpServers is the Agent SDK option that connects MCP servers to a session. In Python it is mcp_servers. Each entry has a name and a config: a command to start a local server, a URL for a remote one, or an in-process server made in your own code. Their tools reach Claude with names like mcp__github__list_issues. You still need to allow them, like any tool.

## Example

Leo's agent needs to read GitHub issues. He adds the GitHub MCP server to mcpServers and allows its tools.

## Example code

```typescript
mcpServers: {
  github: { command: "npx", args: ["-y", "@modelcontextprotocol/server-github"] },
}
```

Start the GitHub server for this session.

## Why it matters

It is the main way to let an agent reach other systems. You write no new tools.

## Common mistake

Adding a server but not allowing its tools. They then wait for approval every time.

## Three principles

- **Name and config.** Per server.
- **Local, remote or in-process.** Three kinds.
- **Still needs allowing.** Like any tool.

## Related terms

- [MCP Server](https://learn.benibix.com/term/ai/mcp-server)
- [--mcp-config Flag](https://learn.benibix.com/term/ai/mcp-config-flag)
- [SDK MCP Server](https://learn.benibix.com/term/ai/sdk-mcp-server)

---

Source: https://learn.benibix.com/term/ai/mcp-servers-option
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
