# SDK MCP Server

> An MCP server that runs in your own app. Its tools are plain functions in your code.

**Field:** Artificial Intelligence  
**Category:** Claude Agent SDK  
**Also known as:** in-process MCP server, Agent SDK in-process server, Claude Agent SDK SDK MCP Server

## Think of it like

It is like a helper at your own desk.

## Definition

An SDK MCP server is an MCP server that runs inside your own app, made with createSdkMcpServer(). Its tools are plain functions in your code. So they can reach your database and your data with no extra process and no network hop. If a handler throws an error, the server turns it into an error result. Claude reads it, and the loop goes on.

## Example

Leo's tools need his app's database pool. An SDK MCP server lets them use it, with no second process to start.

## Why it matters

It is the quickest way to give an agent your own tools. There is nothing more to deploy.

## Common mistake

Starting a second server process for tools that only call your own code.

## Three principles

- **Runs in your process.** No extra server.
- **Tools are functions.** In your code.
- **Errors become results.** The loop goes on.

## Related terms

- [MCP Server](https://learn.benibix.com/term/ai/mcp-server)
- [createSdkMcpServer() Function](https://learn.benibix.com/term/ai/create-sdk-mcp-server)
- [tool() Helper](https://learn.benibix.com/term/ai/sdk-tool-helper)
- [MCP Transport](https://learn.benibix.com/term/ai/mcp-transport)
- [MCP SDK](https://learn.benibix.com/term/ai/mcp-sdk)

## Told apart from

- [SDK MCP Server vs MCP Server](https://learn.benibix.com/compare/sdk-mcp-server-vs-mcp-server): People think every MCP server is a separate program you start and connect to. An SDK MCP server is not, because it runs inside your own app. Its tools are plain functions in your code. A normal MCP server runs on its own, as a local process or a remote service. Use the SDK kind for tools that call your own code, and a normal one to share tools across apps.

---

Source: https://learn.benibix.com/term/ai/sdk-mcp-server
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.
