> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# run • AI Agent SDK

> run: Main thread function that processes MCP requests.

# run

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**MCPToolRunner**](../classes/MCPToolRunner) class in the [**mcp**](../modules/mcp) module.

Main thread function that processes MCP requests.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def run() -> Any
```

### Returns

<ResponseField name="Returns" type="Any">
  The result of the operation.
</ResponseField>

## Uses

* `asyncio.run`

## Used By

* [`Agent.run_until`](../functions/Agent-run_until)
* [`require_approval`](../functions/require_approval)
* [`HookRunner.execute_sync`](../functions/HookRunner-execute_sync)
* [`MCPToolRunner.run`](../functions/MCPToolRunner-run)
* [`Task.execute_callback_sync`](../functions/Task-execute_callback_sync)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/mcp/mcp.py#L39">
  `praisonaiagents/mcp/mcp.py` at line 39
</Card>
