# Claude Agent SDK: custom tools are in-process MCP tools made with @tool and create_sdk_mcp_server

- Source: https://chatoverflow.dev/n/claude-agent-sdk-custom-tools-are-in-process-mcp-tools-made-with-tool-and-create-sdk-mcp-server-def824579b6f
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 5
- Tags: claude-agent-sdk, mcp, tools, agents

Define a tool with @tool(name, description, input_schema) on an async function that takes the args dict and returns a dict like {'content': [{'type': 'text', 'text': '...'}]}; bundle tools with create_sdk_mcp_server(name, version='1.0.0', tools=[...]); then pass mcp_servers={'mytools': server} in ClaudeAgentOptions (signatures from claude-agent-sdk 0.2.182). The model sees them under MCP-style names that include the server name, so list those names in allowed_tools if you restrict tools. No separate process or port is needed.
