Full Code of lastmile-ai/mcp-agent for AI

main f62d84935081 cached
1132 files
8.0 MB
2.2M tokens
4889 symbols
1 requests
Download .txt
Showing preview only (8,581K chars total). Download the full file or copy to clipboard to get everything.
Repository: lastmile-ai/mcp-agent
Branch: main
Commit: f62d84935081
Files: 1132
Total size: 8.0 MB

Directory structure:
gitextract_j9tv7udb/

├── .github/
│   ├── release-drafter.yml
│   └── workflows/
│       ├── checks.yml
│       ├── create-tag.yml
│       ├── main-checks.yml
│       ├── pr-checks.yml
│       ├── publish-pypi.yml
│       └── release-drafter.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .prettierignore
├── .python-version
├── .vscode/
│   ├── extensions.json
│   ├── launch.json
│   └── settings.json
├── CONTRIBUTING.md
├── LICENSE
├── LLMS.txt
├── Makefile
├── README.md
├── SECURITY.md
├── docs/
│   ├── README.md
│   ├── advanced/
│   │   ├── composition.mdx
│   │   ├── monitoring.mdx
│   │   └── temporal.mdx
│   ├── cloud/
│   │   ├── authentication/
│   │   │   ├── deployment-auth.mdx
│   │   │   ├── external-mcp-auth.mdx
│   │   │   └── overview.mdx
│   │   ├── deployment-quickstart.mdx
│   │   ├── mcp-agent-cloud/
│   │   │   ├── deploy-mcp-server.mdx
│   │   │   ├── long-running-tools.mdx
│   │   │   ├── manage-secrets.mdx
│   │   │   ├── overview.mdx
│   │   │   └── use-deployed-server.mdx
│   │   ├── observability.mdx
│   │   ├── overview.mdx
│   │   └── use-cases/
│   │       ├── build-chatgpt-apps.mdx
│   │       ├── deploy-agents.mdx
│   │       ├── deploy-chatgpt-apps.mdx
│   │       └── deploy-mcp-servers.mdx
│   ├── concepts/
│   │   ├── agents.mdx
│   │   ├── augmented-llms.mdx
│   │   ├── elicitation.mdx
│   │   ├── execution-engines.mdx
│   │   ├── mcp-primitives.mdx
│   │   ├── mcp-servers.mdx
│   │   └── workflows.mdx
│   ├── configuration.mdx
│   ├── css/
│   │   ├── style.css
│   │   └── version-badge.css
│   ├── docs.json
│   ├── get-started/
│   │   ├── cloud.mdx
│   │   ├── install.mdx
│   │   ├── quickstart.mdx
│   │   └── welcome.mdx
│   ├── mcp/
│   │   └── overview.mdx
│   ├── mcp-agent-sdk/
│   │   ├── advanced/
│   │   │   ├── authentication.mdx
│   │   │   ├── composition.mdx
│   │   │   ├── durable-agents.mdx
│   │   │   ├── logging.mdx
│   │   │   ├── observability.mdx
│   │   │   └── pause-and-resume.mdx
│   │   ├── core-components/
│   │   │   ├── agents.mdx
│   │   │   ├── augmented-llm.mdx
│   │   │   ├── configuring-your-application.mdx
│   │   │   ├── connecting-to-mcp-servers.mdx
│   │   │   ├── execution-engine.mdx
│   │   │   ├── mcp-servers.mdx
│   │   │   ├── mcpapp.mdx
│   │   │   ├── specify-secrets.mdx
│   │   │   └── workflows.mdx
│   │   ├── effective-patterns/
│   │   │   ├── build-your-own.mdx
│   │   │   ├── deep-research.mdx
│   │   │   ├── evaluator-optimizer.mdx
│   │   │   ├── intent-classifier.mdx
│   │   │   ├── map-reduce.mdx
│   │   │   ├── overview.mdx
│   │   │   ├── planner.mdx
│   │   │   ├── router.mdx
│   │   │   └── swarm.mdx
│   │   ├── mcp/
│   │   │   ├── agent-as-mcp-server.mdx
│   │   │   ├── overview.mdx
│   │   │   └── server-authentication.mdx
│   │   └── overview.mdx
│   ├── oauth_support_design.md
│   ├── openai/
│   │   └── deploy.mdx
│   ├── reference/
│   │   ├── cli.mdx
│   │   ├── configuration.mdx
│   │   └── decorators.mdx
│   ├── roadmap.mdx
│   ├── snippets/
│   │   └── version-badge.mdx
│   ├── streaming_guide.md
│   ├── test-evaluate/
│   │   ├── agent-evaluation.mdx
│   │   ├── mcp-eval.mdx
│   │   └── server-evaluation.mdx
│   └── workflows/
│       ├── deep-orchestrator.mdx
│       ├── evaluator-optimizer.mdx
│       ├── intent-classifier.mdx
│       ├── orchestrator.mdx
│       ├── overview.mdx
│       ├── parallel.mdx
│       ├── router.mdx
│       └── swarm.mdx
├── examples/
│   ├── basic/
│   │   ├── agent_factory/
│   │   │   ├── README.md
│   │   │   ├── agents.yaml
│   │   │   ├── auto_loaded_subagents.py
│   │   │   ├── load_and_route.py
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── orchestrator_demo.py
│   │   │   ├── parallel_demo.py
│   │   │   ├── requirements.txt
│   │   │   └── run_worker.py
│   │   ├── functions/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_basic_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_hello_world/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_model_selector/
│   │   │   ├── README.md
│   │   │   ├── interactive.py
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   └── requirements.txt
│   │   ├── mcp_server_aggregator/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   └── requirements.txt
│   │   ├── mcp_tool_filter/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── quickstart.py
│   │   │   └── requirements.txt
│   │   ├── oauth_basic_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── streaming_demo/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   └── token_counter/
│   │       ├── README.md
│   │       ├── main.py
│   │       ├── mcp_agent.config.yaml
│   │       ├── mcp_agent.secrets.yaml.example
│   │       └── requirements.txt
│   ├── cloud/
│   │   ├── README.md
│   │   ├── agent_factory/
│   │   │   ├── README.md
│   │   │   ├── agents.yaml
│   │   │   ├── custom_tasks.py
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── requirements.txt
│   │   │   └── run_worker.py
│   │   ├── chatgpt_apps/
│   │   │   ├── basic_app/
│   │   │   │   ├── README.md
│   │   │   │   ├── main.py
│   │   │   │   ├── mcp_agent.config.yaml
│   │   │   │   ├── requirements.txt
│   │   │   │   └── web/
│   │   │   │       ├── .gitignore
│   │   │   │       ├── README.md
│   │   │   │       ├── package.json
│   │   │   │       ├── public/
│   │   │   │       │   └── index.html
│   │   │   │       ├── src/
│   │   │   │       │   ├── components/
│   │   │   │       │   │   ├── App.css
│   │   │   │       │   │   ├── App.tsx
│   │   │   │       │   │   ├── Coin.css
│   │   │   │       │   │   └── Coin.tsx
│   │   │   │       │   ├── index.css
│   │   │   │       │   ├── index.tsx
│   │   │   │       │   └── utils/
│   │   │   │       │       ├── dev-openai-global.ts
│   │   │   │       │       ├── hooks/
│   │   │   │       │       │   ├── use-openai-global.ts
│   │   │   │       │       │   ├── use-theme.ts
│   │   │   │       │       │   └── use-widget-state.ts
│   │   │   │       │       └── types.ts
│   │   │   │       └── tsconfig.json
│   │   │   └── timer/
│   │   │       ├── README.md
│   │   │       ├── main.py
│   │   │       ├── mcp_agent.config.yaml
│   │   │       ├── requirements.txt
│   │   │       └── web/
│   │   │           ├── .gitignore
│   │   │           ├── README.md
│   │   │           ├── package.json
│   │   │           ├── public/
│   │   │           │   └── index.html
│   │   │           ├── src/
│   │   │           │   ├── components/
│   │   │           │   │   ├── App.css
│   │   │           │   │   ├── App.tsx
│   │   │           │   │   ├── Timer.css
│   │   │           │   │   ├── Timer.tsx
│   │   │           │   │   └── ui/
│   │   │           │   │       ├── button.tsx
│   │   │           │   │       └── card.tsx
│   │   │           │   ├── index.css
│   │   │           │   ├── index.tsx
│   │   │           │   └── utils/
│   │   │           │       ├── dev-openai-global.ts
│   │   │           │       ├── hooks/
│   │   │           │       │   ├── use-openai-global.ts
│   │   │           │       │   ├── use-theme.ts
│   │   │           │       │   └── use-widget-state.ts
│   │   │           │       └── types.ts
│   │   │           └── tsconfig.json
│   │   ├── hello_world/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   └── requirements.txt
│   │   ├── mcp/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── requirements.txt
│   │   │   └── short_story.md
│   │   ├── observability/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   └── temporal/
│   │       ├── README.md
│   │       ├── main.py
│   │       ├── mcp_agent.config.yaml
│   │       ├── mcp_agent.secrets.yaml.example
│   │       ├── requirements.txt
│   │       └── temporal_worker.py
│   ├── crewai/
│   │   ├── README.md
│   │   ├── main.py
│   │   ├── mcp_agent.config.yaml
│   │   ├── mcp_agent.secrets.yaml.example
│   │   └── requirements.txt
│   ├── human_input/
│   │   └── temporal/
│   │       ├── README.md
│   │       ├── client.py
│   │       ├── main.py
│   │       ├── mcp_agent.config.yaml
│   │       ├── mcp_agent.secrets.yaml.example
│   │       ├── requirements.txt
│   │       └── worker.py
│   ├── langchain/
│   │   ├── README.md
│   │   ├── main.py
│   │   ├── mcp_agent.config.yaml
│   │   ├── mcp_agent.secrets.yaml.example
│   │   └── requirements.txt
│   ├── lm_studio/
│   │   ├── README.md
│   │   ├── main.py
│   │   ├── mcp_agent.config.yaml
│   │   └── requirements.txt
│   ├── mcp/
│   │   ├── mcp_elicitation/
│   │   │   ├── README.md
│   │   │   ├── cloud/
│   │   │   │   ├── README.md
│   │   │   │   ├── main.py
│   │   │   │   ├── mcp_agent.config.yaml
│   │   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   │   └── requirements.txt
│   │   │   ├── demo_server.py
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── requirements.txt
│   │   │   └── temporal/
│   │   │       ├── client.py
│   │   │       ├── main.py
│   │   │       ├── mcp_agent.config.yaml
│   │   │       ├── mcp_agent.secrets.yaml.example
│   │   │       ├── requirements.txt
│   │   │       └── worker.py
│   │   ├── mcp_prompts_and_resources/
│   │   │   ├── README.md
│   │   │   ├── demo_server.py
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_roots/
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── requirements.txt
│   │   │   ├── root_test_server.py
│   │   │   └── test_data/
│   │   │       ├── 01_Data_Processed.csv
│   │   │       └── visualizations/
│   │   │           └── key_insights.md
│   │   ├── mcp_sse/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── server.py
│   │   ├── mcp_sse_with_headers/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_streamable_http/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── requirements.txt
│   │   │   └── stateless_server.py
│   │   └── mcp_websockets/
│   │       ├── README.md
│   │       ├── main.py
│   │       ├── mcp_agent.config.yaml
│   │       ├── mcp_agent.secrets.yaml.example
│   │       └── requirements.txt
│   ├── mcp_agent_server/
│   │   ├── README.md
│   │   ├── asyncio/
│   │   │   ├── README.md
│   │   │   ├── client.py
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── nested_elicitation_server.py
│   │   │   ├── nested_sampling_server.py
│   │   │   ├── requirements.txt
│   │   │   └── short_story.md
│   │   ├── context_isolation/
│   │   │   ├── README.md
│   │   │   ├── clients.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── requirements.txt
│   │   │   └── server.py
│   │   └── temporal/
│   │       ├── README.md
│   │       ├── basic_agent_server_worker.py
│   │       ├── client.py
│   │       ├── main.py
│   │       ├── mcp_agent.config.yaml
│   │       ├── mcp_agent.secrets.yaml.example
│   │       ├── nested_elicitation_server.py
│   │       ├── nested_sampling_server.py
│   │       └── requirements.txt
│   ├── model_providers/
│   │   ├── mcp_basic_azure_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   └── mcp_agent.secrets.yaml.example
│   │   ├── mcp_basic_bedrock_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   └── mcp_agent.secrets.yaml.example
│   │   ├── mcp_basic_google_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   └── mcp_basic_ollama_agent/
│   │       ├── README.md
│   │       ├── main.py
│   │       ├── mcp_agent.config.yaml
│   │       ├── mcp_agent.secrets.yaml.example
│   │       └── requirements.txt
│   ├── multithread/
│   │   ├── main.py
│   │   ├── mcp_agent.config.yaml
│   │   ├── mcp_agent.secrets.yaml.example
│   │   ├── requirements.txt
│   │   └── word_count.py
│   ├── oauth/
│   │   ├── README.md
│   │   ├── interactive_tool/
│   │   │   ├── README.md
│   │   │   ├── client.py
│   │   │   └── server.py
│   │   ├── pre_authorize/
│   │   │   ├── README.md
│   │   │   ├── client.py
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── worker.py
│   │   └── protected_by_oauth/
│   │       ├── README.md
│   │       ├── main.py
│   │       └── registration.py
│   ├── temporal/
│   │   ├── README.md
│   │   ├── basic.py
│   │   ├── evaluator_optimizer.py
│   │   ├── graded_report.md
│   │   ├── interactive.py
│   │   ├── main.py
│   │   ├── mcp_agent.config.yaml
│   │   ├── mcp_agent.secrets.yaml.example
│   │   ├── orchestrator.py
│   │   ├── parallel.py
│   │   ├── requirements.txt
│   │   ├── router.py
│   │   ├── run_worker.py
│   │   ├── short_story.md
│   │   └── workflows.py
│   ├── tracing/
│   │   ├── agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── langfuse/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── llm/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── requirements.txt
│   │   │   └── server.py
│   │   └── temporal/
│   │       ├── README.md
│   │       ├── basic.py
│   │       ├── main.py
│   │       ├── mcp_agent.config.yaml
│   │       ├── mcp_agent.secrets.yaml.example
│   │       ├── requirements.txt
│   │       ├── run_worker.py
│   │       └── workflows.py
│   ├── usecases/
│   │   ├── fastapi_websocket/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── requirements.txt
│   │   │   ├── session_manager.py
│   │   │   └── websocket_client_async.py
│   │   ├── marimo_mcp_basic_agent/
│   │   │   ├── README.md
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── notebook.py
│   │   ├── mcp_basic_slack_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_browser_agent/
│   │   │   ├── README.md
│   │   │   ├── browser_agent.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── pyproject.toml
│   │   ├── mcp_financial_analyzer/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── requirements.txt
│   │   │   └── sample_report.md
│   │   ├── mcp_github_to_slack_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_instagram_gift_advisor/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_marketing_assistant_agent/
│   │   │   ├── README.md
│   │   │   ├── company_config.yaml
│   │   │   ├── company_docs/
│   │   │   │   ├── brand_guidelines.md
│   │   │   │   ├── company_overview.md
│   │   │   │   └── team_bio.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── posts/
│   │   │   │   └── linkedin_content_20250725_163333.md
│   │   │   └── pyproject.toml
│   │   ├── mcp_playwright_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── pyproject.toml
│   │   ├── mcp_realtor_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── property_reports/
│   │   │   │   ├── austin_tx_property_report_20250715_120601.md
│   │   │   │   └── san_fransisco_ca_property_report_20250715_175448.md
│   │   │   ├── pyproject.toml
│   │   │   └── rentspider_server.py
│   │   ├── mcp_researcher/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_supabase_migration_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── reliable_conversation/
│   │   │   ├── CLAUDE.md
│   │   │   ├── LOST_IN_CONVERSATION.md
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── requirements.txt
│   │   │   ├── src/
│   │   │   │   ├── models/
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   └── conversation_models.py
│   │   │   │   ├── tasks/
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   ├── llm_evaluators.py
│   │   │   │   │   ├── quality_control.py
│   │   │   │   │   ├── task_functions.py
│   │   │   │   │   └── task_registry.py
│   │   │   │   ├── utils/
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   ├── config.py
│   │   │   │   │   ├── log_formatter.py
│   │   │   │   │   ├── logging.py
│   │   │   │   │   ├── logging_config.py
│   │   │   │   │   ├── progress_reporter.py
│   │   │   │   │   ├── readable_output.py
│   │   │   │   │   └── test_runner.py
│   │   │   │   └── workflows/
│   │   │   │       ├── __init__.py
│   │   │   │       └── conversation_workflow.py
│   │   │   └── test_basic.py
│   │   ├── streamlit_mcp_basic_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   └── streamlit_mcp_rag_agent/
│   │       ├── README.md
│   │       ├── agent_state.py
│   │       ├── main.py
│   │       ├── mcp_agent.config.yaml
│   │       ├── mcp_agent.secrets.yaml.example
│   │       └── requirements.txt
│   └── workflows/
│       ├── workflow_deep_orchestrator/
│       │   ├── README.md
│       │   ├── graded_report.md
│       │   ├── main.py
│       │   ├── mcp_agent.config.yaml
│       │   ├── mcp_agent.secrets.yaml.example
│       │   ├── requirements.txt
│       │   └── short_story.md
│       ├── workflow_evaluator_optimizer/
│       │   ├── README.md
│       │   ├── main.py
│       │   ├── mcp_agent.config.yaml
│       │   ├── mcp_agent.secrets.yaml.example
│       │   └── requirements.txt
│       ├── workflow_intent_classifier/
│       │   ├── README.md
│       │   ├── main.py
│       │   ├── mcp_agent.config.yaml
│       │   ├── mcp_agent.secrets.yaml.example
│       │   └── requirements.txt
│       ├── workflow_orchestrator_worker/
│       │   ├── README.md
│       │   ├── graded_report.md
│       │   ├── main.py
│       │   ├── mcp_agent.config.yaml
│       │   ├── mcp_agent.secrets.yaml.example
│       │   ├── reports/
│       │   │   └── graded_report.md
│       │   ├── requirements.txt
│       │   └── short_story.md
│       ├── workflow_parallel/
│       │   ├── README.md
│       │   ├── main.py
│       │   ├── mcp_agent.config.yaml
│       │   ├── mcp_agent.secrets.yaml.example
│       │   └── requirements.txt
│       ├── workflow_router/
│       │   ├── README.md
│       │   ├── main.py
│       │   ├── mcp_agent.config.yaml
│       │   ├── mcp_agent.secrets.yaml.example
│       │   └── requirements.txt
│       └── workflow_swarm/
│           ├── README.md
│           ├── main.py
│           ├── mcp_agent.config.yaml
│           ├── mcp_agent.secrets.yaml.example
│           ├── policies/
│           │   ├── flight_cancellation_policy.md
│           │   ├── flight_change_policy.md
│           │   └── lost_baggage_policy.md
│           └── requirements.txt
├── gallery.md
├── logs/
│   └── marketing-20251022_200928.jsonl
├── pyproject.toml
├── schema/
│   └── mcp-agent.config.schema.json
├── scripts/
│   ├── event_replay.py
│   ├── event_summary.py
│   ├── event_viewer.py
│   ├── format.py
│   ├── gen_llm_benchmarks.py
│   ├── gen_schema.py
│   ├── lint.py
│   ├── log_trimmer.py
│   ├── promptify.py
│   └── rich_progress_test.py
├── src/
│   └── mcp_agent/
│       ├── __init__.py
│       ├── agents/
│       │   ├── __init__.py
│       │   ├── agent.py
│       │   └── agent_spec.py
│       ├── app.py
│       ├── cli/
│       │   ├── README.md
│       │   ├── __init__.py
│       │   ├── __main__.py
│       │   ├── auth/
│       │   │   ├── __init__.py
│       │   │   ├── constants.py
│       │   │   ├── main.py
│       │   │   └── models.py
│       │   ├── cloud/
│       │   │   ├── __init__.py
│       │   │   ├── commands/
│       │   │   │   ├── __init__.py
│       │   │   │   ├── app/
│       │   │   │   │   ├── __init__.py
│       │   │   │   │   ├── delete/
│       │   │   │   │   │   ├── __init__.py
│       │   │   │   │   │   └── main.py
│       │   │   │   │   ├── status/
│       │   │   │   │   │   ├── __init__.py
│       │   │   │   │   │   └── main.py
│       │   │   │   │   └── workflows/
│       │   │   │   │       ├── __init__.py
│       │   │   │   │       └── main.py
│       │   │   │   ├── apps/
│       │   │   │   │   ├── __init__.py
│       │   │   │   │   ├── list/
│       │   │   │   │   │   ├── __init__.py
│       │   │   │   │   │   └── main.py
│       │   │   │   │   └── update/
│       │   │   │   │       ├── __init__.py
│       │   │   │   │       └── main.py
│       │   │   │   ├── auth/
│       │   │   │   │   ├── __init__.py
│       │   │   │   │   ├── login/
│       │   │   │   │   │   ├── __init__.py
│       │   │   │   │   │   ├── constants.py
│       │   │   │   │   │   └── main.py
│       │   │   │   │   ├── logout/
│       │   │   │   │   │   ├── __init__.py
│       │   │   │   │   │   └── main.py
│       │   │   │   │   └── whoami/
│       │   │   │   │       ├── __init__.py
│       │   │   │   │       └── main.py
│       │   │   │   ├── configure/
│       │   │   │   │   ├── __init__.py
│       │   │   │   │   └── main.py
│       │   │   │   ├── deploy/
│       │   │   │   │   ├── __init__.py
│       │   │   │   │   ├── bundle_utils.py
│       │   │   │   │   ├── constants.py
│       │   │   │   │   ├── main.py
│       │   │   │   │   ├── materialize.py
│       │   │   │   │   ├── settings.py
│       │   │   │   │   ├── validation.py
│       │   │   │   │   └── wrangler_wrapper.py
│       │   │   │   ├── env/
│       │   │   │   │   ├── __init__.py
│       │   │   │   │   └── main.py
│       │   │   │   ├── logger/
│       │   │   │   │   ├── __init__.py
│       │   │   │   │   ├── configure/
│       │   │   │   │   │   ├── __init__.py
│       │   │   │   │   │   └── main.py
│       │   │   │   │   └── tail/
│       │   │   │   │       ├── __init__.py
│       │   │   │   │       └── main.py
│       │   │   │   ├── servers/
│       │   │   │   │   ├── __init__.py
│       │   │   │   │   ├── delete/
│       │   │   │   │   │   ├── __init__.py
│       │   │   │   │   │   └── main.py
│       │   │   │   │   ├── describe/
│       │   │   │   │   │   ├── __init__.py
│       │   │   │   │   │   └── main.py
│       │   │   │   │   └── list/
│       │   │   │   │       ├── __init__.py
│       │   │   │   │       └── main.py
│       │   │   │   ├── utils.py
│       │   │   │   └── workflows/
│       │   │   │       ├── __init__.py
│       │   │   │       ├── cancel/
│       │   │   │       │   ├── __init__.py
│       │   │   │       │   └── main.py
│       │   │   │       ├── describe/
│       │   │   │       │   ├── __init__.py
│       │   │   │       │   └── main.py
│       │   │   │       ├── list/
│       │   │   │       │   ├── __init__.py
│       │   │   │       │   └── main.py
│       │   │   │       ├── resume/
│       │   │   │       │   ├── __init__.py
│       │   │   │       │   └── main.py
│       │   │   │       ├── runs/
│       │   │   │       │   ├── __init__.py
│       │   │   │       │   └── main.py
│       │   │   │       └── utils.py
│       │   │   └── main.py
│       │   ├── commands/
│       │   │   ├── __init__.py
│       │   │   ├── build.py
│       │   │   ├── chat.py
│       │   │   ├── check.py
│       │   │   ├── config.py
│       │   │   ├── configure.py
│       │   │   ├── dev.py
│       │   │   ├── doctor.py
│       │   │   ├── go.py
│       │   │   ├── init.py
│       │   │   ├── install.py
│       │   │   ├── invoke.py
│       │   │   ├── keys.py
│       │   │   ├── logs.py
│       │   │   ├── models.py
│       │   │   ├── serve.py
│       │   │   └── server.py
│       │   ├── config/
│       │   │   ├── __init__.py
│       │   │   └── settings.py
│       │   ├── core/
│       │   │   ├── __init__.py
│       │   │   ├── api_client.py
│       │   │   ├── constants.py
│       │   │   └── utils.py
│       │   ├── exceptions.py
│       │   ├── main.py
│       │   ├── main_bootstrap.py
│       │   ├── mcp_app/
│       │   │   ├── __init__.py
│       │   │   ├── api_client.py
│       │   │   ├── mcp_client.py
│       │   │   └── mock_client.py
│       │   ├── secrets/
│       │   │   ├── __init__.py
│       │   │   ├── api_client.py
│       │   │   ├── mock_client.py
│       │   │   ├── processor.py
│       │   │   ├── resolver.py
│       │   │   └── yaml_tags.py
│       │   ├── utils/
│       │   │   ├── __init__.py
│       │   │   ├── display.py
│       │   │   ├── git_utils.py
│       │   │   ├── importers.py
│       │   │   ├── retry.py
│       │   │   ├── typer_utils.py
│       │   │   ├── url_parser.py
│       │   │   ├── ux.py
│       │   │   └── version_check.py
│       │   └── workflows/
│       │       ├── __init__.py
│       │       └── api_client.py
│       ├── config.py
│       ├── console.py
│       ├── core/
│       │   ├── context.py
│       │   ├── context_dependent.py
│       │   ├── exceptions.py
│       │   └── request_context.py
│       ├── data/
│       │   ├── artificial_analysis_llm_benchmarks.json
│       │   ├── examples/
│       │   │   ├── basic/
│       │   │   │   ├── agent_factory/
│       │   │   │   │   └── agents.yaml
│       │   │   │   ├── mcp_basic_agent/
│       │   │   │   │   ├── mcp_agent.config.yaml
│       │   │   │   │   └── mcp_agent.secrets.yaml.example
│       │   │   │   └── token_counter/
│       │   │   │       ├── mcp_agent.config.yaml
│       │   │   │       └── mcp_agent.secrets.yaml.example
│       │   │   ├── cloud/
│       │   │   │   ├── agent_factory/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── agents.yaml
│       │   │   │   │   ├── custom_tasks.py
│       │   │   │   │   ├── main.py
│       │   │   │   │   ├── mcp_agent.config.yaml
│       │   │   │   │   ├── mcp_agent.secrets.yaml.example
│       │   │   │   │   ├── requirements.txt
│       │   │   │   │   └── run_worker.py
│       │   │   │   ├── chatgpt_app/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── main.py
│       │   │   │   │   ├── mcp_agent.config.yaml
│       │   │   │   │   └── web/
│       │   │   │   │       ├── .gitignore
│       │   │   │   │       ├── README.md
│       │   │   │   │       ├── package.json
│       │   │   │   │       ├── public/
│       │   │   │   │       │   └── index.html
│       │   │   │   │       ├── src/
│       │   │   │   │       │   ├── components/
│       │   │   │   │       │   │   ├── App.css
│       │   │   │   │       │   │   ├── App.tsx
│       │   │   │   │       │   │   ├── Coin.css
│       │   │   │   │       │   │   └── Coin.tsx
│       │   │   │   │       │   ├── index.css
│       │   │   │   │       │   ├── index.tsx
│       │   │   │   │       │   └── utils/
│       │   │   │   │       │       ├── dev-openai-global.ts
│       │   │   │   │       │       ├── hooks/
│       │   │   │   │       │       │   ├── use-openai-global.ts
│       │   │   │   │       │       │   ├── use-theme.ts
│       │   │   │   │       │       │   └── use-widget-state.ts
│       │   │   │   │       │       └── types.ts
│       │   │   │   │       └── tsconfig.json
│       │   │   │   ├── hello_world/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── main.py
│       │   │   │   │   └── mcp_agent.config.yaml
│       │   │   │   ├── mcp/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── main.py
│       │   │   │   │   ├── mcp_agent.config.yaml
│       │   │   │   │   ├── mcp_agent.secrets.yaml.example
│       │   │   │   │   └── short_story.md
│       │   │   │   └── temporal/
│       │   │   │       ├── README.md
│       │   │   │       ├── main.py
│       │   │   │       ├── mcp_agent.config.yaml
│       │   │   │       ├── mcp_agent.secrets.yaml.example
│       │   │   │       └── temporal_worker.py
│       │   │   ├── mcp_agent_server/
│       │   │   │   ├── asyncio/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── client.py
│       │   │   │   │   ├── logs/
│       │   │   │   │   │   └── mcp-agent.jsonl
│       │   │   │   │   ├── main.py
│       │   │   │   │   ├── mcp_agent.config.yaml
│       │   │   │   │   ├── mcp_agent.secrets.yaml.example
│       │   │   │   │   ├── nested_elicitation_server.py
│       │   │   │   │   ├── nested_sampling_server.py
│       │   │   │   │   ├── requirements.txt
│       │   │   │   │   └── short_story.md
│       │   │   │   ├── elicitation/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── client.py
│       │   │   │   │   └── server.py
│       │   │   │   ├── notifications/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── client.py
│       │   │   │   │   └── server.py
│       │   │   │   ├── reference/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── client.py
│       │   │   │   │   └── server.py
│       │   │   │   └── sampling/
│       │   │   │       ├── README.md
│       │   │   │       ├── client.py
│       │   │   │       └── server.py
│       │   │   ├── usecases/
│       │   │   │   ├── mcp_financial_analyzer/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── main.py
│       │   │   │   │   ├── mcp_agent.config.yaml
│       │   │   │   │   ├── mcp_agent.secrets.yaml.example
│       │   │   │   │   └── sample_report.md
│       │   │   │   └── mcp_researcher/
│       │   │   │       ├── README.md
│       │   │   │       ├── main.py
│       │   │   │       ├── mcp_agent.config.yaml
│       │   │   │       └── mcp_agent.secrets.yaml.example
│       │   │   └── workflows/
│       │   │       ├── workflow_deep_orchestrator/
│       │   │       │   ├── README.md
│       │   │       │   ├── graded_report.md
│       │   │       │   ├── main.py
│       │   │       │   ├── mcp_agent.config.yaml
│       │   │       │   ├── mcp_agent.secrets.yaml.example
│       │   │       │   └── short_story.md
│       │   │       ├── workflow_evaluator_optimizer/
│       │   │       │   ├── README.md
│       │   │       │   ├── main.py
│       │   │       │   ├── mcp_agent.config.yaml
│       │   │       │   └── mcp_agent.secrets.yaml.example
│       │   │       ├── workflow_intent_classifier/
│       │   │       │   ├── README.md
│       │   │       │   ├── main.py
│       │   │       │   ├── mcp_agent.config.yaml
│       │   │       │   └── mcp_agent.secrets.yaml.example
│       │   │       ├── workflow_orchestrator_worker/
│       │   │       │   ├── README.md
│       │   │       │   ├── graded_report.md
│       │   │       │   ├── main.py
│       │   │       │   ├── mcp_agent.config.yaml
│       │   │       │   ├── mcp_agent.secrets.yaml.example
│       │   │       │   ├── reports/
│       │   │       │   │   └── graded_report.md
│       │   │       │   └── short_story.md
│       │   │       ├── workflow_parallel/
│       │   │       │   ├── README.md
│       │   │       │   ├── main.py
│       │   │       │   ├── mcp_agent.config.yaml
│       │   │       │   └── mcp_agent.secrets.yaml.example
│       │   │       ├── workflow_router/
│       │   │       │   ├── README.md
│       │   │       │   ├── main.py
│       │   │       │   ├── mcp_agent.config.yaml
│       │   │       │   └── mcp_agent.secrets.yaml.example
│       │   │       └── workflow_swarm/
│       │   │           ├── README.md
│       │   │           ├── main.py
│       │   │           ├── mcp_agent.config.yaml
│       │   │           ├── mcp_agent.secrets.yaml.example
│       │   │           └── policies/
│       │   │               ├── flight_cancellation_policy.md
│       │   │               ├── flight_change_policy.md
│       │   │               └── lost_baggage_policy.md
│       │   └── templates/
│       │       ├── README_basic.md
│       │       ├── README_factory.md
│       │       ├── README_server.md
│       │       ├── agent_basic.py
│       │       ├── agent_factory.py
│       │       ├── agent_factory_run_worker.py
│       │       ├── agent_notebook.py
│       │       ├── agent_streamlit.py
│       │       ├── agents.yaml
│       │       ├── basic_agent.py
│       │       ├── basic_agent_server.py
│       │       ├── config_basic.yaml
│       │       ├── config_claude.yaml
│       │       ├── config_server.yaml
│       │       ├── gitignore.template
│       │       ├── mcp_agent.config.yaml
│       │       ├── secrets.yaml
│       │       ├── secrets_basic.yaml
│       │       └── token_counter.py
│       ├── elicitation/
│       │   ├── __init__.py
│       │   ├── handler.py
│       │   └── types.py
│       ├── eval/
│       │   └── __init__.py
│       ├── executor/
│       │   ├── __init__.py
│       │   ├── decorator_registry.py
│       │   ├── errors.py
│       │   ├── executor.py
│       │   ├── signal_registry.py
│       │   ├── task_registry.py
│       │   ├── temporal/
│       │   │   ├── __init__.py
│       │   │   ├── interactive_workflow.py
│       │   │   ├── interceptor.py
│       │   │   ├── session_proxy.py
│       │   │   ├── system_activities.py
│       │   │   ├── temporal_context.py
│       │   │   ├── workflow_registry.py
│       │   │   └── workflow_signal.py
│       │   ├── workflow.py
│       │   ├── workflow_registry.py
│       │   ├── workflow_signal.py
│       │   └── workflow_task.py
│       ├── human_input/
│       │   ├── __init__.py
│       │   ├── console_handler.py
│       │   ├── elicitation_handler.py
│       │   └── types.py
│       ├── logging/
│       │   ├── __init__.py
│       │   ├── event_progress.py
│       │   ├── events.py
│       │   ├── json_serializer.py
│       │   ├── listeners.py
│       │   ├── logger.py
│       │   ├── progress_display.py
│       │   ├── rich_progress.py
│       │   ├── token_progress_display.py
│       │   └── transport.py
│       ├── mcp/
│       │   ├── __init__.py
│       │   ├── client_proxy.py
│       │   ├── gen_client.py
│       │   ├── mcp_agent_client_session.py
│       │   ├── mcp_aggregator.py
│       │   ├── mcp_connection_manager.py
│       │   ├── mcp_server_registry.py
│       │   ├── sampling_handler.py
│       │   └── stdio_transport.py
│       ├── oauth/
│       │   ├── __init__.py
│       │   ├── access_token.py
│       │   ├── callbacks.py
│       │   ├── errors.py
│       │   ├── flow.py
│       │   ├── http/
│       │   │   ├── __init__.py
│       │   │   └── auth.py
│       │   ├── identity.py
│       │   ├── manager.py
│       │   ├── metadata.py
│       │   ├── pkce.py
│       │   ├── records.py
│       │   └── store/
│       │       ├── __init__.py
│       │       ├── base.py
│       │       ├── in_memory.py
│       │       └── redis.py
│       ├── py.typed
│       ├── server/
│       │   ├── app_server.py
│       │   ├── app_server_types.py
│       │   ├── token_verifier.py
│       │   └── tool_adapter.py
│       ├── telemetry/
│       │   ├── __init__.py
│       │   └── usage_tracking.py
│       ├── tools/
│       │   ├── __init__.py
│       │   ├── crewai_tool.py
│       │   └── langchain_tool.py
│       ├── tracing/
│       │   ├── __init__
│       │   ├── file_span_exporter.py
│       │   ├── semconv.py
│       │   ├── telemetry.py
│       │   ├── token_counter.py
│       │   ├── token_tracking_decorator.py
│       │   └── tracer.py
│       ├── utils/
│       │   ├── common.py
│       │   ├── content_utils.py
│       │   ├── mime_utils.py
│       │   ├── prompt_message_multipart.py
│       │   ├── pydantic_type_serializer.py
│       │   ├── resource_utils.py
│       │   └── tool_filter.py
│       └── workflows/
│           ├── __init__.py
│           ├── deep_orchestrator/
│           │   ├── README.md
│           │   ├── __init__.py
│           │   ├── budget.py
│           │   ├── cache.py
│           │   ├── config.py
│           │   ├── context_builder.py
│           │   ├── knowledge.py
│           │   ├── memory.py
│           │   ├── models.py
│           │   ├── orchestrator.py
│           │   ├── plan_verifier.py
│           │   ├── policy.py
│           │   ├── prompts.py
│           │   ├── queue.py
│           │   ├── task_executor.py
│           │   └── utils.py
│           ├── embedding/
│           │   ├── __init__.py
│           │   ├── embedding_base.py
│           │   ├── embedding_cohere.py
│           │   └── embedding_openai.py
│           ├── evaluator_optimizer/
│           │   ├── __init__.py
│           │   └── evaluator_optimizer.py
│           ├── factory.py
│           ├── intent_classifier/
│           │   ├── __init__.py
│           │   ├── intent_classifier_base.py
│           │   ├── intent_classifier_embedding.py
│           │   ├── intent_classifier_embedding_cohere.py
│           │   ├── intent_classifier_embedding_openai.py
│           │   ├── intent_classifier_llm.py
│           │   ├── intent_classifier_llm_anthropic.py
│           │   └── intent_classifier_llm_openai.py
│           ├── llm/
│           │   ├── __init__.py
│           │   ├── augmented_llm.py
│           │   ├── augmented_llm_anthropic.py
│           │   ├── augmented_llm_azure.py
│           │   ├── augmented_llm_bedrock.py
│           │   ├── augmented_llm_google.py
│           │   ├── augmented_llm_lm_studio.py
│           │   ├── augmented_llm_ollama.py
│           │   ├── augmented_llm_openai.py
│           │   ├── llm_selector.py
│           │   ├── multipart_converter_anthropic.py
│           │   ├── multipart_converter_azure.py
│           │   ├── multipart_converter_bedrock.py
│           │   ├── multipart_converter_google.py
│           │   ├── multipart_converter_openai.py
│           │   └── streaming_events.py
│           ├── orchestrator/
│           │   ├── __init__.py
│           │   ├── orchestrator.py
│           │   ├── orchestrator_models.py
│           │   └── orchestrator_prompts.py
│           ├── parallel/
│           │   ├── __init__.py
│           │   ├── fan_in.py
│           │   ├── fan_out.py
│           │   └── parallel_llm.py
│           ├── router/
│           │   ├── __init__.py
│           │   ├── router_base.py
│           │   ├── router_embedding.py
│           │   ├── router_embedding_cohere.py
│           │   ├── router_embedding_openai.py
│           │   ├── router_llm.py
│           │   ├── router_llm_anthropic.py
│           │   └── router_llm_openai.py
│           └── swarm/
│               ├── __init__.py
│               ├── swarm.py
│               ├── swarm_anthropic.py
│               └── swarm_openai.py
└── tests/
    ├── agents/
    │   ├── conftest.py
    │   ├── test_agent.py
    │   ├── test_agent_tasks_concurrency.py
    │   └── test_agent_tasks_isolation.py
    ├── app/
    │   └── test_dotenv_loading.py
    ├── cli/
    │   ├── __init__.py
    │   ├── cloud/
    │   │   ├── test_env_pull_helpers.py
    │   │   └── test_materialize.py
    │   ├── commands/
    │   │   ├── __init__.py
    │   │   ├── test_app_delete.py
    │   │   ├── test_app_status.py
    │   │   ├── test_app_workflows.py
    │   │   ├── test_apps_update.py
    │   │   ├── test_configure.py
    │   │   ├── test_deploy_command.py
    │   │   ├── test_install.py
    │   │   └── test_wrangler_wrapper.py
    │   ├── conftest.py
    │   ├── fixtures/
    │   │   ├── __init__.py
    │   │   ├── api_test_utils.py
    │   │   ├── bedrock_config.yaml
    │   │   ├── docker-compose-test.yml
    │   │   ├── example_config.yaml
    │   │   ├── example_secrets.yaml
    │   │   ├── mock_secrets_client.py
    │   │   ├── multi_provider_config.yaml
    │   │   ├── realistic_mcp_agent.config.yaml
    │   │   ├── realistic_mcp_configs/
    │   │   │   ├── advanced_agent/
    │   │   │   │   └── mcp_agent.config.yaml
    │   │   │   ├── basic_agent/
    │   │   │   │   └── mcp_agent.config.yaml
    │   │   │   └── complex_integrations/
    │   │   │       └── mcp_agent.config.yaml
    │   │   ├── service_integration_config.yaml
    │   │   ├── test_constants.py
    │   │   ├── test_deploy.sh
    │   │   ├── test_secrets.yaml
    │   │   └── test_secrets_deploy.sh
    │   ├── secrets/
    │   │   ├── __init__.py
    │   │   ├── test_api_client.py
    │   │   ├── test_api_client_deploy.py
    │   │   ├── test_api_client_type.py
    │   │   ├── test_resolver.py
    │   │   ├── test_secrets_transform.py
    │   │   ├── test_yaml_tags.py
    │   │   └── test_yaml_tags_unified.py
    │   ├── test_api_key_rename.py
    │   ├── test_deploy_validation.py
    │   └── utils/
    │       ├── __init__.py
    │       └── jwt_generator.py
    ├── config/
    │   └── test_env_settings.py
    ├── core/
    │   ├── test_context.py
    │   └── test_context_isolation.py
    ├── executor/
    │   ├── temporal/
    │   │   ├── test_execution_id_and_interceptor.py
    │   │   ├── test_signal_handler.py
    │   │   ├── test_temporal_executor.py
    │   │   └── test_workflow_registry.py
    │   ├── test_errors.py
    │   ├── test_inmemory_workflow_registry.py
    │   ├── test_temporal_session_proxy.py
    │   ├── test_workflow.py
    │   └── test_workflow_signal.py
    ├── human_input/
    │   ├── test_elicitation_handler.py
    │   └── test_elicitation_session.py
    ├── integration/
    │   └── test_multithread_smoke.py
    ├── logging/
    │   ├── test_request_context_logging.py
    │   ├── test_request_scoping.py
    │   └── test_upstream_logging.py
    ├── mcp/
    │   ├── test_connection_manager_concurrency.py
    │   ├── test_connection_manager_lifecycle.py
    │   ├── test_mcp_aggregator.py
    │   └── test_mcp_connection_manager.py
    ├── server/
    │   ├── test_app_server.py
    │   ├── test_app_server_memo.py
    │   ├── test_app_server_workflow_schema.py
    │   └── test_tool_decorators.py
    ├── test_app.py
    ├── test_app_server_identity.py
    ├── test_app_session.py
    ├── test_audience_validation.py
    ├── test_config_exporters.py
    ├── test_oauth_utils.py
    ├── test_token_manager.py
    ├── test_token_verifier.py
    ├── test_tracing_configure.py
    ├── test_tracing_isolation.py
    ├── test_version_check.py
    ├── tools/
    │   ├── test_crewai_tool.py
    │   └── test_langchain_tool.py
    ├── tracing/
    │   ├── test_token_counter.py
    │   ├── test_token_counter_concurrency.py
    │   └── test_token_integration_convenience.py
    ├── utils/
    │   ├── test_config_env_aliases.py
    │   ├── test_config_preload.py
    │   ├── test_content_utils.py
    │   ├── test_mime_utils.py
    │   ├── test_multipart_converter_anthropic.py
    │   ├── test_multipart_converter_azure.py
    │   ├── test_multipart_converter_bedrock.py
    │   ├── test_multipart_converter_google.py
    │   ├── test_multipart_converter_openai.py
    │   ├── test_prompt_message_multipart.py
    │   ├── test_pydantic_type_serializer.py
    │   └── test_resource_utils.py
    └── workflows/
        ├── deep_orchestrator/
        │   ├── conftest.py
        │   ├── test_deep_orchestrator.py
        │   ├── test_deep_orchestrator_integration.py
        │   └── test_queue.py
        ├── evaluator_optimizer/
        │   └── test_evaluator_optimizer.py
        ├── intent_classifier/
        │   ├── README.md
        │   ├── conftest.py
        │   ├── test_intent_classifier_embedding_cohere.py
        │   ├── test_intent_classifier_embedding_openai.py
        │   ├── test_intent_classifier_llm_anthropic.py
        │   └── test_intent_classifier_llm_openai.py
        ├── llm/
        │   ├── README.md
        │   ├── conftest.py
        │   ├── test_anthropic_streaming.py
        │   ├── test_augmented_llm_anthropic.py
        │   ├── test_augmented_llm_azure.py
        │   ├── test_augmented_llm_bedrock.py
        │   ├── test_augmented_llm_google.py
        │   ├── test_augmented_llm_lm_studio.py
        │   ├── test_augmented_llm_ollama.py
        │   ├── test_augmented_llm_openai.py
        │   ├── test_bedrock_streaming.py
        │   ├── test_request_params_tool_filter.py
        │   └── test_streaming_events.py
        ├── orchestrator/
        │   ├── __init__.py
        │   ├── conftest.py
        │   ├── test_orchestrator.py
        │   ├── test_orchestrator_integration.py
        │   ├── test_orchestrator_models.py
        │   ├── test_orchestrator_overrides.py
        │   ├── test_orchestrator_prompts.py
        │   └── test_orchestrator_token_counting.py
        ├── parallel/
        │   ├── conftest.py
        │   ├── test_fan_in.py
        │   ├── test_fan_out.py
        │   ├── test_parallel_llm.py
        │   └── test_parallel_llm_token_counting.py
        ├── router/
        │   ├── __init__.py
        │   ├── conftest.py
        │   ├── test_router_base.py
        │   ├── test_router_embedding.py
        │   ├── test_router_embedding_cohere.py
        │   ├── test_router_embedding_openai.py
        │   ├── test_router_llm.py
        │   ├── test_router_llm_anthropic.py
        │   ├── test_router_llm_openai.py
        │   └── test_router_token_counting.py
        ├── swarm/
        │   ├── __init__.py
        │   ├── conftest.py
        │   ├── test_swarm.py
        │   ├── test_swarm_anthropic.py
        │   └── test_swarm_openai.py
        ├── test_agentspec_loader.py
        └── test_llm_provider_errors.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/release-drafter.yml
================================================
name-template: "v$NEXT_PATCH_VERSION"
tag-template: "v$NEXT_PATCH_VERSION"
categories:
  - title: "🚀 Features"
    labels:
      - "feature"
      - "enhancement"
  - title: "🐛 Bug Fixes"
    labels:
      - "fix"
      - "bugfix"
      - "bug"
  - title: "🧰 Maintenance"
    label: "chore"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
template: |
  ## Changes
  $CHANGES


================================================
FILE: .github/workflows/checks.yml
================================================
name: Linting, formatting and other checks on codebase

on:
  workflow_call:

jobs:
  format:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install uv
        uses: astral-sh/setup-uv@v3
        with:
          enable-cache: true

      - name: "Set up Python"
        uses: actions/setup-python@v5
        with:
          python-version-file: ".python-version"

      - name: Install the project
        run: uv sync --frozen --all-extras --dev

      - name: Run ruff format check
        run: uv run scripts/format.py

  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install uv
        uses: astral-sh/setup-uv@v3
        with:
          enable-cache: true

      - name: "Set up Python"
        uses: actions/setup-python@v5
        with:
          python-version-file: ".python-version"

      - name: Install the project
        run: uv sync --frozen --all-extras --dev

      - name: Run pyright
        run: uv run scripts/lint.py

  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install uv
        uses: astral-sh/setup-uv@v3
        with:
          enable-cache: true

      - name: "Set up Python"
        uses: actions/setup-python@v5
        with:
          python-version-file: ".python-version"

      - name: Install dependencies
        run: make sync
      - name: Run tests with coverage
        run: make coverage


================================================
FILE: .github/workflows/create-tag.yml
================================================
name: Create Version Tag from pyproject.toml

on:
  push:
    branches:
      - main
    paths:
      - "pyproject.toml"
  workflow_dispatch: # Enables manual runs

permissions:
  contents: write

jobs:
  create-tag:
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
        uses: actions/checkout@v4

      - name: Install uv
        uses: astral-sh/setup-uv@v3
        with:
          enable-cache: true

      - name: "Set up Python"
        uses: actions/setup-python@v5
        with:
          python-version-file: ".python-version"

      - name: Install dependencies
        run: pip install toml

      - name: Extract version from pyproject.toml
        id: get_version
        run: |
          version=$(python -c "import toml; print(toml.load('pyproject.toml')['project']['version'])")
          echo "version=$version" >> $GITHUB_OUTPUT

      - name: Create Git tag if not exists
        run: |
          git fetch --tags
          tag="v${{ steps.get_version.outputs.version }}"
          if ! git rev-parse "$tag" >/dev/null 2>&1; then
            git tag "$tag"
            git push origin "$tag"
          else
            echo "Tag $tag already exists."
          fi


================================================
FILE: .github/workflows/main-checks.yml
================================================
name: Main Checks

on:
  push:
    branches:
      - main
      - "v*.*.*"
    tags:
      - "v*.*.*"

jobs:
  checks:
    uses: ./.github/workflows/checks.yml


================================================
FILE: .github/workflows/pr-checks.yml
================================================
name: Pull Request Checks

on:
  pull_request:

jobs:
  checks:
    uses: ./.github/workflows/checks.yml


================================================
FILE: .github/workflows/publish-pypi.yml
================================================
name: Publish Package to PyPI

on:
  push:
    tags:
      - "v*" # Triggers on tags like v1.2.3

  workflow_dispatch: # Enables manual runs

jobs:
  checks:
    uses: ./.github/workflows/checks.yml

  publish:
    name: Build and publish package to PyPI
    runs-on: ubuntu-latest
    needs: [checks] # Run checks before publishing

    # This ties the job to a protected environment.
    environment:
      name: production # Ensure this environment is configured in your repo settings with required reviewers

    steps:
      - name: Check out code
        uses: actions/checkout@v4

      - name: Install uv
        uses: astral-sh/setup-uv@v3

      - name: "Set up Python"
        uses: actions/setup-python@v5
        with:
          python-version-file: ".python-version"

      - name: Install the project
        run: uv sync --frozen --all-extras --dev

      - name: Build
        run: uv build

      - name: Upload artifacts
        uses: actions/upload-artifact@v4
        with:
          name: release-dists
          path: dist/

      - name: Publish package to PyPI using uv
        env:
          UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
        run: uv publish


================================================
FILE: .github/workflows/release-drafter.yml
================================================
name: Update Release Draft

on:
  push:
    branches:
      - main

  # pull_request event is required only for autolabeler
  pull_request:
    # Only following types are handled by the action, but one can default to all as well
    types: [opened, reopened, synchronize]

  # pull_request_target event is required for autolabeler to support PRs from forks
  pull_request_target:
    types: [opened, reopened, synchronize]

  workflow_dispatch: # Enables manual runs

permissions:
  contents: read

jobs:
  update_release_draft:
    permissions:
      # write permission is required to create a github release
      contents: write
      # write permission is required for autolabeler
      pull-requests: write
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: release-drafter/release-drafter@v6
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


================================================
FILE: .gitignore
================================================
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
#   For a library or package, you might want to ignore these files since the code is
#   intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
#   However, in case of collaboration, if having platform-specific dependencies or dependencies
#   having no cross-platform support, pipenv may install dependencies that don't work, or not
#   install all needed dependencies.
#Pipfile.lock

# poetry
#   Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
#   This is especially recommended for binary packages to ensure reproducibility, and is more
#   commonly ignored for libraries.
#   https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
#   Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
#   pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
#   in version control.
#   https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
!src/mcp_agent/cli/cloud/commands/env/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# Make sure secrets files aren't added
**/*.secrets.yaml

# but make sure example files are
!examples/**/*.secrets.yaml.example

# For our repo, ignore deployed configs (e.g. from examples)
# For your own projects, you likely won't want to ignore these
**/mcp_agent.deployed.config.yaml

# Test data files
examples/mcp/mcp_roots/test_data/*.png

# PyCharm
#  JetBrains specific template is maintained in a separate JetBrains.gitignore that can
#  be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
#  and can be added to the global gitignore or merged into this file.  For a more nuclear
#  option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
uv.lock

# File generated from promptify script (to create an LLM-friendly prompt for the repo)
prompt.md

# example logs
examples/**/*.jsonl
**/.DS_Store

.idea

# node_modules for ChatGPT apps
node_modules


================================================
FILE: .pre-commit-config.yaml
================================================
repos:
  - repo: https://github.com/astral-sh/ruff-pre-commit
    # Ruff version.
    rev: v0.8.4
    hooks:
      # Run the linter.
      - id: ruff
        args: [--fix]
      # Run the formatter.
      - id: ruff-format


================================================
FILE: .prettierignore
================================================
/docs

================================================
FILE: .python-version
================================================
3.10


================================================
FILE: .vscode/extensions.json
================================================
{
  "recommendations": ["esbenp.prettier-vscode", "charliermarsh.ruff"]
}


================================================
FILE: .vscode/launch.json
================================================
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python Debugger: Remote Attach",
            "type": "debugpy",
            "request": "attach",
            "connect": {
                "host": "localhost",
                "port": 5724
            },
            "pathMappings": [
                {
                    "localRoot": "${workspaceFolder}",
                    "remoteRoot": "."
                }
            ]
        }
    ]
}

================================================
FILE: .vscode/settings.json
================================================
{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "[python]": {
    "editor.defaultFormatter": "charliermarsh.ruff",
    "editor.formatOnSave": true,
    "editor.rulers": []
  },
  "yaml.schemas": {
    "https://raw.githubusercontent.com/lastmile-ai/mcp-agent/main/schema/mcp-agent.config.schema.json": [
      "mcp-agent.config.yaml",
      "mcp_agent.config.yaml",
      "mcp-agent.secrets.yaml",
      "mcp_agent.secrets.yaml"
    ]
  },
  "files.watcherExclude": {
    "**/target": true
  }
}

================================================
FILE: CONTRIBUTING.md
================================================
# Contributing

We welcome **all** kinds of contributions - bug fixes, big features, docs, examples and more. _You don't need to be an AI expert
or even a Python developer to help out._

## Checklist

Contributions are made through
[pull requests](https://help.github.com/articles/using-pull-requests/).

Before sending a pull request, make sure to do the following:

- Fork the repo, and create a feature branch prefixed with `feature/`
- [Lint, typecheck, and format](#code-quality) your code
- [Add examples](#examples)
- (Ideal) [Add tests](#testing)

_Please reach out to the mcp-agent maintainers before starting work on a large
contribution._ Get in touch at
[GitHub issues](https://github.com/lastmile-ai/mcp-agent/issues)
or [on Discord](https://lmai.link/discord/mcp-agent).

## Prerequisites

To build mcp-agent, you'll need the following installed:

- Install [uv](https://docs.astral.sh/uv/), which we use for Python package management
- Install [Python](https://www.python.org/) >= 3.10. (You may already it installed. To see your version, use `python -V` at the command line.)

  If you don't, install it using `uv python install 3.10`

- Install dev dependencies using:
  ```bash
  make sync
  ```
  This will sync all packages with extras and dev dependencies.

## Development Commands

We provide a [Makefile](./Makefile) with common development commands:

### Code Quality

**Note**: Lint and format are also run as part of the precommit hook defined in [.pre-commit-config.yaml](./.pre-commit-config.yaml).

**Format:**

```bash
make format
```

**Lint:**

This autofixes linter errors as well:

```bash
make lint
```

### Testing

**Run tests:**

```bash
make tests
```

**Run tests with coverage:**

```bash
make coverage
```

**Generate HTML coverage report:**

```bash
make coverage-report
```

### Generate Schema

If you make changes to [config.py](./src/mcp_agent/config.py), please also run the schema generator to update the [mcp-agent.config.schema.json](./schema/mcp-agent.config.schema.json):

```bash
make schema
```

## Scripts

There are several useful scripts in the `scripts/` directory that can be invoked via `uv run scripts/<script>.py [ARGS]`

### promptify.py

**Generates prompt.md file for LLMs**. Very helpful in leverage LLMs to help develop `mcp-agent`.

You can use the Makefile command for a quick generation with sensible defaults:

```bash
make prompt
```

Or run it directly with custom arguments:

```bash
uv run scripts/promptify.py -i "**/agents/**" -i "**/context.py" -x "**/app.py"
```

Use `-i REGEX` to include only specific files, and `-x REGEX` to exclude certain files.

**Note:** There's also an existing `LLMS.txt` file in the repository root that you can use directly as a prompt for LLMs.

## Examples

We use the examples for end-to-end testing. We'd love for you to add Python unit [tests](./tests) for new functionality going forward.

At minimum, for any new feature or provider integration (e.g. additional LLM support), you should add example usage in the [`examples`](./examples/) directory.

### Running Examples

All examples are in the `examples/` directory, organized by category (basic, mcp, usecases, etc.). Each example has its own README with specific instructions.

**General pattern for running examples:**

1. Navigate to the example directory:

   ```bash
   cd examples/basic/mcp_basic_agent
   ```

2. Install dependencies:

   ```bash
   uv pip install -r requirements.txt
   ```

3. Configure secrets (if needed):

   ```bash
   cp mcp_agent.secrets.yaml.example mcp_agent.secrets.yaml
   # Edit mcp_agent.secrets.yaml with your API keys
   ```

4. Run the example:
   ```bash
   uv run main.py
   ```

**Quick Examples:**

- **Basic Agent** (`examples/basic/mcp_basic_agent/`) - A "finder" agent with filesystem and fetch capabilities
- **Researcher** (`examples/usecases/mcp_researcher/`) - Research assistant with search, web fetch, and Python interpreter

Each example includes a README explaining its purpose, architecture, and specific setup requirements.

## Editor settings

If you use vscode, you might find the following `settings.json` useful. We've added them to the [.vscode](./.vscode) directory along with recommended extensions

```json
{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "[python]": {
    "editor.defaultFormatter": "charliermarsh.ruff",
    "editor.formatOnSave": true,
    "editor.rulers": []
  },
  "yaml.schemas": {
    "https://raw.githubusercontent.com/lastmile-ai/mcp-agent/main/schema/mcp-agent.config.schema.json": [
      "mcp-agent.config.yaml",
      "mcp_agent.config.yaml",
      "mcp-agent.secrets.yaml",
      "mcp_agent.secrets.yaml"
    ]
  }
}
```

## Thank you

If you are considering contributing, or have already done so, **thank you**. This project is meant to streamline AI application development, and we need all the help we can get! Happy building.


================================================
FILE: LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


================================================
FILE: LLMS.txt
================================================
# Project Structure and Function Definitions

This file contains the project directory structure and function definitions to help LLMs understand the codebase.

## Directory Structure

```
mcp-agent/
├── .vscode/
│   ├── extensions.json
│   ├── settings.json
├── schema/
│   ├── mcp-agent.config.schema.json
├── src/
│   ├── mcp_agent/
│   │   ├── agents/
│   │   │   ├── __init__.py
│   │   │   ├── agent.py
│   │   ├── cli/
│   │   │   ├── commands/
│   │   │   │   ├── config.py
│   │   │   ├── __init__.py
│   │   │   ├── __main__.py
│   │   │   ├── main.py
│   │   │   ├── terminal.py
│   │   ├── core/
│   │   │   ├── context.py
│   │   │   ├── context_dependent.py
│   │   │   ├── decorator_app.py
│   │   │   ├── exceptions.py
│   │   ├── data/
│   │   │   ├── artificial_analysis_llm_benchmarks.json
│   │   ├── eval/
│   │   │   ├── __init__.py
│   │   ├── executor/
│   │   │   ├── temporal/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── workflow_registry.py
│   │   │   │   ├── workflow_signal.py
│   │   │   ├── __init__.py
│   │   │   ├── decorator_registry.py
│   │   │   ├── executor.py
│   │   │   ├── signal_registry.py
│   │   │   ├── task_registry.py
│   │   │   ├── workflow.py
│   │   │   ├── workflow_registry.py
│   │   │   ├── workflow_signal.py
│   │   │   ├── workflow_task.py
│   │   ├── human_input/
│   │   │   ├── __init__.py
│   │   │   ├── handler.py
│   │   │   ├── types.py
│   │   ├── logging/
│   │   │   ├── __init__.py
│   │   │   ├── event_progress.py
│   │   │   ├── events.py
│   │   │   ├── json_serializer.py
│   │   │   ├── listeners.py
│   │   │   ├── logger.py
│   │   │   ├── progress_display.py
│   │   │   ├── rich_progress.py
│   │   │   ├── tracing.py
│   │   │   ├── transport.py
│   │   ├── mcp/
│   │   │   ├── __init__.py
│   │   │   ├── gen_client.py
│   │   │   ├── mcp_agent_client_session.py
│   │   │   ├── mcp_aggregator.py
│   │   │   ├── mcp_connection_manager.py
│   │   │   ├── mcp_server_registry.py
│   │   ├── server/
│   │   │   ├── app_server.py
│   │   │   ├── app_server_types.py
│   │   ├── telemetry/
│   │   │   ├── __init__.py
│   │   │   ├── usage_tracking.py
│   │   ├── utils/
│   │   │   ├── common.py
│   │   │   ├── pydantic_type_serializer.py
│   │   ├── workflows/
│   │   │   ├── embedding/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── embedding_base.py
│   │   │   │   ├── embedding_cohere.py
│   │   │   │   ├── embedding_openai.py
│   │   │   ├── evaluator_optimizer/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── evaluator_optimizer.py
│   │   │   ├── intent_classifier/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── intent_classifier_base.py
│   │   │   │   ├── intent_classifier_embedding.py
│   │   │   │   ├── intent_classifier_embedding_cohere.py
│   │   │   │   ├── intent_classifier_embedding_openai.py
│   │   │   │   ├── intent_classifier_llm.py
│   │   │   │   ├── intent_classifier_llm_anthropic.py
│   │   │   │   ├── intent_classifier_llm_openai.py
│   │   │   ├── llm/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── augmented_llm.py
│   │   │   │   ├── augmented_llm_anthropic.py
│   │   │   │   ├── augmented_llm_azure.py
│   │   │   │   ├── augmented_llm_bedrock.py
│   │   │   │   ├── augmented_llm_google.py
│   │   │   │   ├── augmented_llm_ollama.py
│   │   │   │   ├── augmented_llm_openai.py
│   │   │   │   ├── llm_selector.py
│   │   │   ├── orchestrator/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── orchestrator.py
│   │   │   │   ├── orchestrator_models.py
│   │   │   │   ├── orchestrator_prompts.py
│   │   │   ├── parallel/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── fan_in.py
│   │   │   │   ├── fan_out.py
│   │   │   │   ├── parallel_llm.py
│   │   │   ├── router/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── router_base.py
│   │   │   │   ├── router_embedding.py
│   │   │   │   ├── router_embedding_cohere.py
│   │   │   │   ├── router_embedding_openai.py
│   │   │   │   ├── router_llm.py
│   │   │   │   ├── router_llm_anthropic.py
│   │   │   │   ├── router_llm_openai.py
│   │   │   ├── swarm/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── swarm.py
│   │   │   │   ├── swarm_anthropic.py
│   │   │   │   ├── swarm_openai.py
│   │   │   ├── __init__.py
│   │   ├── __init__.py
│   │   ├── app.py
│   │   ├── config.py
│   │   ├── console.py
│   │   ├── py.typed
├── LLMS.md
├── logs.txt
├── test_output.txt
```

## Project README

<p align="center">
  <img src="https://github.com/user-attachments/assets/6f4e40c4-dc88-47b6-b965-5856b69416d2" alt="Logo" width="300" />
</p>

<p align="center">
  <em>Build effective agents with Model Context Protocol using simple, composable patterns.</em>

<p align="center">
  <a href="https://github.com/lastmile-ai/mcp-agent/tree/main/examples" target="_blank"><strong>Examples</strong></a>
  |
  <a href="https://www.anthropic.com/research/building-effective-agents" target="_blank"><strong>Building Effective Agents</strong></a>
  |
  <a href="https://modelcontextprotocol.io/introduction" target="_blank"><strong>MCP</strong></a>
</p>

<p align="center">
<a href="https://pypi.org/project/mcp-agent/"><img src="https://img.shields.io/pypi/v/mcp-agent?color=%2334D058&label=pypi" /></a>
<a href="https://github.com/lastmile-ai/mcp-agent/issues"><img src="https://img.shields.io/github/issues-raw/lastmile-ai/mcp-agent" /></a>
<a href="https://lmai.link/discord/mcp-agent"><img src="https://shields.io/discord/1089284610329952357" alt="discord" /></a>
<img alt="Pepy Total Downloads" src="https://img.shields.io/pepy/dt/mcp-agent?label=pypi%20%7C%20downloads"/>
<a href="https://github.com/lastmile-ai/mcp-agent/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/mcp-agent" /></a>
</p>

## Overview

**`mcp-agent`** is a simple, composable framework to build agents using [Model Context Protocol](https://modelcontextprotocol.io/introduction).

**Inspiration**: Anthropic announced 2 foundational updates for AI application developers:

1. [Model Context Protocol](https://www.anthropic.com/news/model-context-protocol) - a standardized interface to let any software be accessible to AI assistants via MCP servers.
2. [Building Effective Agents](https://www.anthropic.com/research/building-effective-agents) - a seminal writeup on simple, composable patterns for building production-ready AI agents.

`mcp-agent` puts these two foundational pieces into an AI application framework:

1. It handles the pesky business of managing the lifecycle of MCP server connections so you don't have to.
2. It implements every pattern described in Building Effective Agents, and does so in a _composable_ way, allowing you to chain these patterns together.
3. **Bonus**: It implements [OpenAI's Swarm](https://github.com/openai/swarm) pattern for multi-agent orchestration, but in a model-agnostic way.

Altogether, this is the simplest and easiest way to build robust agent applications. Much like MCP, this project is in early development.
We welcome all kinds of [contributions](/CONTRIBUTING.md), feedback and your help in growing this to become a new standard.

## Get Started

We recommend using [uv](https://docs.astral.sh/uv/) to manage your Python projects:

```bash
uv add "mcp-agent"
```

Alternatively:

```bash
pip install mcp-agent
```

### Quickstart

> [!TIP]
> The [`examples`](/examples) directory has several example applications to get started with.
> To run an example, clone this repo, then:
>
> ```bash
> cd examples/basic/mcp_basic_agent # Or any other example
> cp mcp_agent.secrets.yaml.example mcp_agent.secrets.yaml # Update API keys
> uv run main.py
> ```

Here is a basic "finder" agent that uses the fetch and filesystem servers to look up a file, read a blog and write a tweet. [Example link](./examples/basic/mcp_basic_agent/):

<details open>
<summary>finder_agent.py</summary>

```python
import asyncio
import os

from mcp_agent.app import MCPApp
from mcp_agent.agents.agent import Agent
from mcp_agent.workflows.llm.augmented_llm_openai import OpenAIAugmentedLLM

app = MCPApp(name="hello_world_agent")

async def example_usage():
    async with app.run() as mcp_agent_app:
        logger = mcp_agent_app.logger
        # This agent can read the filesystem or fetch URLs
        finder_agent = Agent(
            name="finder",
            instruction="""You can read local files or fetch URLs.
                Return the requested information when asked.""",
            server_names=["fetch", "filesystem"], # MCP servers this Agent can use
        )

        async with finder_agent:
            # Automatically initializes the MCP servers and adds their tools for LLM use
            tools = await finder_agent.list_tools()
            logger.info(f"Tools available:", data=tools)

            # Attach an OpenAI LLM to the agent (defaults to GPT-4o)
            llm = await finder_agent.attach_llm(OpenAIAugmentedLLM)

            # This will perform a file lookup and read using the filesystem server
            result = await llm.generate_str(
                message="Show me what's in README.md verbatim"
            )
            logger.info(f"README.md contents: {result}")

            # Uses the fetch server to fetch the content from URL
            result = await llm.generate_str(
                message="Print the first two paragraphs from https://www.anthropic.com/research/building-effective-agents"
            )
            logger.info(f"Blog intro: {result}")

            # Multi-turn interactions by default
            result = await llm.generate_str("Summarize that in a 128-char tweet")
            logger.info(f"Tweet: {result}")

if __name__ == "__main__":
    asyncio.run(example_usage())

```

</details>

<details>
<summary>mcp_agent.config.yaml</summary>

```yaml
execution_engine: asyncio
logger:
  transports: [console] # You can use [file, console] for both
  level: debug
  path: "logs/mcp-agent.jsonl" # Used for file transport
  # For dynamic log filenames:
  # path_settings:
  #   path_pattern: "logs/mcp-agent-{unique_id}.jsonl"
  #   unique_id: "timestamp"  # Or "session_id"
  #   timestamp_format: "%Y%m%d_%H%M%S"

mcp:
  servers:
    fetch:
      command: "uvx"
      args: ["mcp-server-fetch"]
    filesystem:
      command: "npx"
      args:
        [
          "-y",
          "@modelcontextprotocol/server-filesystem",
          "<add_your_directories>",
        ]

openai:
  # Secrets (API keys, etc.) are stored in an mcp_agent.secrets.yaml file which can be gitignored
  default_model: gpt-4o
```

</details>

<details>
<summary>Agent output</summary>
<img width="2398" alt="Image" src="https://github.com/user-attachments/assets/eaa60fdf-bcc6-460b-926e-6fa8534e9089" />
</details>

## Table of Contents

- [Why use mcp-agent?](#why-use-mcp-agent)
- [Example Applications](#examples)
  - [Claude Desktop](#claude-desktop)
  - [Streamlit](#streamlit)
    - [Gmail Agent](#gmail-agent)
    - [RAG](#simple-rag-chatbot)
  - [Marimo](#marimo)
  - [Python](#python)
    - [Swarm (CLI)](#swarm)
- [Core Concepts](#core-components)
- [Workflows Patterns](#workflows)
  - [Augmented LLM](#augmentedllm)
  - [Parallel](#parallel)
  - [Router](#router)
  - [Intent-Classifier](#intentclassifier)
  - [Orchestrator-Workers](#orchestrator-workers)
  - [Evaluator-Optimizer](#evaluator-optimizer)
  - [OpenAI Swarm](#swarm-1)
- [Advanced](#advanced)
  - [Composing multiple workflows](#composability)
  - [Signaling and Human input](#signaling-and-human-input)
  - [App Config](#app-config)
  - [MCP Server Management](#mcp-server-management)
- [Contributing](#contributing)
- [Roadmap](#roadmap)
- [FAQs](#faqs)

## Why use `mcp-agent`?

There are too many AI frameworks out there already. But `mcp-agent` is the only one that is purpose-built for a shared protocol - [MCP](https://modelcontextprotocol.io/introduction). It is also the most lightweight, and is closer to an agent pattern library than a framework.

As [more services become MCP-aware](https://github.com/punkpeye/awesome-mcp-servers), you can use mcp-agent to build robust and controllable AI agents that can leverage those services out-of-the-box.

## Examples

Before we go into the core concepts of mcp-agent, let's show what you can build with it.

In short, you can build any kind of AI application with mcp-agent: multi-agent collaborative workflows, human-in-the-loop workflows, RAG pipelines and more.

### Claude Desktop

You can integrate mcp-agent apps into MCP clients like Claude Desktop.

#### mcp-agent server

This app wraps an mcp-agent application inside an MCP server, and exposes that server to Claude Desktop.
The app exposes agents and workflows that Claude Desktop can invoke to service of the user's request.

https://github.com/user-attachments/assets/7807cffd-dba7-4f0c-9c70-9482fd7e0699

This demo shows a multi-agent evaluation task where each agent evaluates aspects of an input poem, and
then an aggregator summarizes their findings into a final response.

**Details**: Starting from a user's request over text, the application:

- dynamically defines agents to do the job
- uses the appropriate workflow to orchestrate those agents (in this case the Parallel workflow)

**Link to code**: [examples/basic/mcp_agent_server](./examples/basic/mcp_agent_server)

> [!NOTE]
> Huge thanks to [Jerron Lim (@StreetLamb)](https://github.com/StreetLamb)
> for developing and contributing this example!

### Streamlit

You can deploy mcp-agent apps using Streamlit.

#### Gmail agent

This app is able to perform read and write actions on gmail using text prompts -- i.e. read, delete, send emails, mark as read/unread, etc.
It uses an MCP server for Gmail.

https://github.com/user-attachments/assets/54899cac-de24-4102-bd7e-4b2022c956e3

**Link to code**: [gmail-mcp-server](https://github.com/jasonsum/gmail-mcp-server/blob/add-mcp-agent-streamlit/streamlit_app.py)

> [!NOTE]
> Huge thanks to [Jason Summer (@jasonsum)](https://github.com/jasonsum)
> for developing and contributing this example!

#### Simple RAG Chatbot

This app uses a Qdrant vector database (via an MCP server) to do Q&A over a corpus of text.

https://github.com/user-attachments/assets/f4dcd227-cae9-4a59-aa9e-0eceeb4acaf4

**Link to code**: [examples/usecases/streamlit_mcp_rag_agent](./examples/usecases/streamlit_mcp_rag_agent/)

> [!NOTE]
> Huge thanks to [Jerron Lim (@StreetLamb)](https://github.com/StreetLamb)
> for developing and contributing this example!

### Marimo

[Marimo](https://github.com/marimo-team/marimo) is a reactive Python notebook that replaces Jupyter and Streamlit.
Here's the "file finder" agent from [Quickstart](#quickstart) implemented in Marimo:

<img src="https://github.com/user-attachments/assets/139a95a5-e3ac-4ea7-9c8f-bad6577e8597" width="400"/>

**Link to code**: [examples/usecases/marimo_mcp_basic_agent](./examples/usecases/marimo_mcp_basic_agent/)

> [!NOTE]
> Huge thanks to [Akshay Agrawal (@akshayka)](https://github.com/akshayka)
> for developing and contributing this example!

### Python

You can write mcp-agent apps as Python scripts or Jupyter notebooks.

#### Swarm

This example demonstrates a multi-agent setup for handling different customer service requests in an airline context using the Swarm workflow pattern. The agents can triage requests, handle flight modifications, cancellations, and lost baggage cases.

https://github.com/user-attachments/assets/b314d75d-7945-4de6-965b-7f21eb14a8bd

**Link to code**: [examples/workflows/workflow_swarm](./examples/workflows/workflow_swarm/)

## Core Components

The following are the building blocks of the mcp-agent framework:

- **[MCPApp](./src/mcp_agent/app.py)**: global state and app configuration
- **MCP server management**: [`gen_client`](./src/mcp_agent/mcp/gen_client.py) and [`MCPConnectionManager`](./src/mcp_agent/mcp/mcp_connection_manager.py) to easily connect to MCP servers.
- **[Agent](./src/mcp_agent/agents/agent.py)**: An Agent is an entity that has access to a set of MCP servers and exposes them to an LLM as tool calls. It has a name and purpose (instruction).
- **[AugmentedLLM](./src/mcp_agent/workflows/llm/augmented_llm.py)**: An LLM that is enhanced with tools provided from a collection of MCP servers. Every Workflow pattern described below is an `AugmentedLLM` itself, allowing you to compose and chain them together.

Everything in the framework is a derivative of these core capabilities.

## Workflows

mcp-agent provides implementations for every pattern in Anthropic’s [Building Effective Agents](https://www.anthropic.com/research/building-effective-agents), as well as the OpenAI [Swarm](https://github.com/openai/swarm) pattern.
Each pattern is model-agnostic, and exposed as an `AugmentedLLM`, making everything very composable.

### AugmentedLLM

[AugmentedLLM](./src/mcp_agent/workflows/llm/augmented_llm.py) is an LLM that has access to MCP servers and functions via Agents.

LLM providers implement the AugmentedLLM interface to expose 3 functions:

- `generate`: Generate message(s) given a prompt, possibly over multiple iterations and making tool calls as needed.
- `generate_str`: Calls `generate` and returns result as a string output.
- `generate_structured`: Uses [Instructor](https://github.com/instructor-ai/instructor) to return the generated result as a Pydantic model.

Additionally, `AugmentedLLM` has memory, to keep track of long or short-term history.

<details>
<summary>Example</summary>

```python
from mcp_agent.agents.agent import Agent
from mcp_agent.workflows.llm.augmented_llm_anthropic import AnthropicAugmentedLLM

finder_agent = Agent(
    name="finder",
    instruction="You are an agent with filesystem + fetch access. Return the requested file or URL contents.",
    server_names=["fetch", "filesystem"],
)

async with finder_agent:
   llm = await finder_agent.attach_llm(AnthropicAugmentedLLM)

   result = await llm.generate_str(
      message="Print the first 2 paragraphs of https://www.anthropic.com/research/building-effective-agents",
      # Can override model, tokens and other defaults
   )
   logger.info(f"Result: {result}")

   # Multi-turn conversation
   result = await llm.generate_str(
      message="Summarize those paragraphs in a 128 character tweet",
   )
   logger.info(f"Result: {result}")
```

</details>

### [Parallel](src/mcp_agent/workflows/parallel/parallel_llm.py)

![Parallel workflow (Image credit: Anthropic)](https://www.anthropic.com/_next/image?url=https%3A%2F%2Fwww-cdn.anthropic.com%2Fimages%2F4zrzovbb%2Fwebsite%2F406bb032ca007fd1624f261af717d70e6ca86286-2401x1000.png&w=3840&q=75)

Fan-out tasks to multiple sub-agents and fan-in the results. Each subtask is an AugmentedLLM, as is the overall Parallel workflow, meaning each subtask can optionally be a more complex workflow itself.

> [!NOTE]
>
> **[Link to full example](examples/workflows/workflow_parallel/main.py)**

<details>
<summary>Example</summary>

```python
proofreader = Agent(name="proofreader", instruction="Review grammar...")
fact_checker = Agent(name="fact_checker", instruction="Check factual consistency...")
style_enforcer = Agent(name="style_enforcer", instruction="Enforce style guidelines...")

grader = Agent(name="grader", instruction="Combine feedback into a structured report.")

parallel = ParallelLLM(
    fan_in_agent=grader,
    fan_out_agents=[proofreader, fact_checker, style_enforcer],
    llm_factory=OpenAIAugmentedLLM,
)

result = await parallel.generate_str("Student short story submission: ...", RequestParams(model="gpt4-o"))
```

</details>

### [Router](src/mcp_agent/workflows/router/)

![Router workflow (Image credit: Anthropic)](https://www.anthropic.com/_next/image?url=https%3A%2F%2Fwww-cdn.anthropic.com%2Fimages%2F4zrzovbb%2Fwebsite%2F5c0c0e9fe4def0b584c04d37849941da55e5e71c-2401x1000.png&w=3840&q=75)

Given an input, route to the `top_k` most relevant categories. A category can be an Agent, an MCP server or a regular function.

mcp-agent provides several router implementations, including:

- [`EmbeddingRouter`](src/mcp_agent/workflows/router/router_embedding.py): uses embedding models for classification
- [`LLMRouter`](src/mcp_agent/workflows/router/router_llm.py): uses LLMs for classification

> [!NOTE]
>
> **[Link to full example](examples/workflows/workflow_router/main.py)**

<details>
<summary>Example</summary>

```python
def print_hello_world:
     print("Hello, world!")

finder_agent = Agent(name="finder", server_names=["fetch", "filesystem"])
writer_agent = Agent(name="writer", server_names=["filesystem"])

llm = OpenAIAugmentedLLM()
router = LLMRouter(
    llm=llm,
    agents=[finder_agent, writer_agent],
    functions=[print_hello_world],
)

results = await router.route( # Also available: route_to_agent, route_to_server
    request="Find and print the contents of README.md verbatim",
    top_k=1
)
chosen_agent = results[0].result
async with chosen_agent:
    ...
```

</details>

### [IntentClassifier](src/mcp_agent/workflows/intent_classifier/)

A close sibling of Router, the Intent Classifier pattern identifies the `top_k` Intents that most closely match a given input.
Just like a Router, mcp-agent provides both an [embedding](src/mcp_agent/workflows/intent_classifier/intent_classifier_embedding.py) and [LLM-based](src/mcp_agent/workflows/intent_classifier/intent_classifier_llm.py) intent classifier.

### [Evaluator-Optimizer](src/mcp_agent/workflows/evaluator_optimizer/evaluator_optimizer.py)

![Evaluator-optimizer workflow (Image credit: Anthropic)](https://www.anthropic.com/_next/image?url=https%3A%2F%2Fwww-cdn.anthropic.com%2Fimages%2F4zrzovbb%2Fwebsite%2F14f51e6406ccb29e695da48b17017e899a6119c7-2401x1000.png&w=3840&q=75)

One LLM (the “optimizer”) refines a response, another (the “evaluator”) critiques it until a response exceeds a quality criteria.

> [!NOTE]
>
> **[Link to full example](examples/workflows/workflow_evaluator_optimizer/main.py)**

<details>
<summary>Example</summary>

```python
optimizer = Agent(name="cover_letter_writer", server_names=["fetch"], instruction="Generate a cover letter ...")
evaluator = Agent(name="critiquer", instruction="Evaluate clarity, specificity, relevance...")

llm = EvaluatorOptimizerLLM(
    optimizer=optimizer,
    evaluator=evaluator,
    llm_factory=OpenAIAugmentedLLM,
    min_rating=QualityRating.EXCELLENT, # Keep iterating until the minimum quality bar is reached
)

result = await eo_llm.generate_str("Write a job cover letter for an AI framework developer role at LastMile AI.")
print("Final refined cover letter:", result)
```

</details>

### [Orchestrator-workers](src/mcp_agent/workflows/orchestrator/orchestrator.py)

![Orchestrator workflow (Image credit: Anthropic)](https://www.anthropic.com/_next/image?url=https%3A%2F%2Fwww-cdn.anthropic.com%2Fimages%2F4zrzovbb%2Fwebsite%2F8985fc683fae4780fb34eab1365ab78c7e51bc8e-2401x1000.png&w=3840&q=75)

A higher-level LLM generates a plan, then assigns them to sub-agents, and synthesizes the results.
The Orchestrator workflow automatically parallelizes steps that can be done in parallel, and blocks on dependencies.

> [!NOTE]
>
> **[Link to full example](examples/workflows/workflow_orchestrator_worker/main.py)**

<details>
<summary>Example</summary>

```python
finder_agent = Agent(name="finder", server_names=["fetch", "filesystem"])
writer_agent = Agent(name="writer", server_names=["filesystem"])
proofreader = Agent(name="proofreader", ...)
fact_checker = Agent(name="fact_checker", ...)
style_enforcer = Agent(name="style_enforcer", instructions="Use APA style guide from ...", server_names=["fetch"])

orchestrator = Orchestrator(
    llm_factory=AnthropicAugmentedLLM,
    available_agents=[finder_agent, writer_agent, proofreader, fact_checker, style_enforcer],
)

task = "Load short_story.md, evaluate it, produce a graded_report.md with multiple feedback aspects."
result = await orchestrator.generate_str(task, RequestParams(model="gpt-4o"))
print(result)
```

</details>

### [Swarm](src/mcp_agent/workflows/swarm/swarm.py)

OpenAI has an experimental multi-agent pattern called [Swarm](https://github.com/openai/swarm), which we provide a model-agnostic reference implementation for in mcp-agent.

<img src="https://github.com/openai/swarm/blob/main/assets/swarm_diagram.png?raw=true" width=500 />

The mcp-agent Swarm pattern works seamlessly with MCP servers, and is exposed as an `AugmentedLLM`, allowing for composability with other patterns above.

> [!NOTE]
>
> **[Link to full example](examples/workflows/workflow_swarm/main.py)**

<details>
<summary>Example</summary>

```python
triage_agent = SwarmAgent(...)
flight_mod_agent = SwarmAgent(...)
lost_baggage_agent = SwarmAgent(...)

# The triage agent decides whether to route to flight_mod_agent or lost_baggage_agent
swarm = AnthropicSwarm(agent=triage_agent, context_variables={...})

test_input = "My bag was not delivered!"
result = await swarm.generate_str(test_input)
print("Result:", result)
```

</details>

## Advanced

### Composability

An example of composability is using an [Evaluator-Optimizer](#evaluator-optimizer) workflow as the planner LLM inside
the [Orchestrator](#orchestrator-workers) workflow. Generating a high-quality plan to execute is important for robust behavior, and an evaluator-optimizer can help ensure that.

Doing so is seamless in mcp-agent, because each workflow is implemented as an `AugmentedLLM`.

<details>
<summary>Example</summary>

```python
optimizer = Agent(name="plan_optimizer", server_names=[...], instruction="Generate a plan given an objective ...")
evaluator = Agent(name="plan_evaluator", instruction="Evaluate logic, ordering and precision of plan......")

planner_llm = EvaluatorOptimizerLLM(
    optimizer=optimizer,
    evaluator=evaluator,
    llm_factory=OpenAIAugmentedLLM,
    min_rating=QualityRating.EXCELLENT,
)

orchestrator = Orchestrator(
    llm_factory=AnthropicAugmentedLLM,
    available_agents=[finder_agent, writer_agent, proofreader, fact_checker, style_enforcer],
    planner=planner_llm # It's that simple
)

...
```

</details>

### Signaling and Human Input

**Signaling**: The framework can pause/resume tasks. The agent or LLM might “signal” that it needs user input, so the workflow awaits. A developer may signal during a workflow to seek approval or review before continuing with a workflow.

**Human Input**: If an Agent has a `human_input_callback`, the LLM can call a `__human_input__` tool to request user input mid-workflow.

<details>
<summary>Example</summary>

The [Swarm example](examples/workflows/workflow_swarm/main.py) shows this in action.

```python
from mcp_agent.human_input.handler import console_input_callback

lost_baggage = SwarmAgent(
    name="Lost baggage traversal",
    instruction=lambda context_variables: f"""
        {
        FLY_AIR_AGENT_PROMPT.format(
            customer_context=context_variables.get("customer_context", "None"),
            flight_context=context_variables.get("flight_context", "None"),
        )
    }\n Lost baggage policy: policies/lost_baggage_policy.md""",
    functions=[
        escalate_to_agent,
        initiate_baggage_search,
        transfer_to_triage,
        case_resolved,
    ],
    server_names=["fetch", "filesystem"],
    human_input_callback=console_input_callback, # Request input from the console
)
```

</details>

### App Config

Create an [`mcp_agent.config.yaml`](/schema/mcp-agent.config.schema.json) and a gitignored [`mcp_agent.secrets.yaml`](./examples/basic/mcp_basic_agent/mcp_agent.secrets.yaml.example) to define MCP app configuration. This controls logging, execution, LLM provider APIs, and MCP server configuration.

### MCP server management

mcp-agent makes it trivial to connect to MCP servers. Create an [`mcp_agent.config.yaml`](/schema/mcp-agent.config.schema.json) to define server configuration under the `mcp` section:

```yaml
mcp:
  servers:
    fetch:
      command: "uvx"
      args: ["mcp-server-fetch"]
      description: "Fetch content at URLs from the world wide web"
```

#### [`gen_client`](src/mcp_agent/mcp/gen_client.py)

Manage the lifecycle of an MCP server within an async context manager:

```python
from mcp_agent.mcp.gen_client import gen_client

async with gen_client("fetch") as fetch_client:
    # Fetch server is initialized and ready to use
    result = await fetch_client.list_tools()

# Fetch server is automatically disconnected/shutdown
```

The gen_client function makes it easy to spin up connections to MCP servers.

#### Persistent server connections

In many cases, you want an MCP server to stay online for persistent use (e.g. in a multi-step tool use workflow).
For persistent connections, use:

- [`connect`](<(src/mcp_agent/mcp/gen_client.py)>) and [`disconnect`](src/mcp_agent/mcp/gen_client.py)

```python
from mcp_agent.mcp.gen_client import connect, disconnect

fetch_client = None
try:
     fetch_client = connect("fetch")
     result = await fetch_client.list_tools()
finally:
     disconnect("fetch")
```

- [`MCPConnectionManager`](src/mcp_agent/mcp/mcp_connection_manager.py)
  For even more fine-grained control over server connections, you can use the MCPConnectionManager.

<details>
<summary>Example</summary>

```python
from mcp_agent.context import get_current_context
from mcp_agent.mcp.mcp_connection_manager import MCPConnectionManager

context = get_current_context()
connection_manager = MCPConnectionManager(context.server_registry)

async with connection_manager:
fetch_client = await connection_manager.get_server("fetch") # Initializes fetch server
result = fetch_client.list_tool()
fetch_client2 = await connection_manager.get_server("fetch") # Reuses same server connection

# All servers managed by connection manager are automatically disconnected/shut down
```

</details>

#### MCP Server Aggregator

[`MCPAggregator`](src/mcp_agent/mcp/mcp_aggregator.py) acts as a "server-of-servers".
It provides a single MCP server interface for interacting with multiple MCP servers.
This allows you to expose tools from multiple servers to LLM applications.

<details>
<summary>Example</summary>

```python
from mcp_agent.mcp.mcp_aggregator import MCPAggregator

aggregator = await MCPAggregator.create(server_names=["fetch", "filesystem"])

async with aggregator:
   # combined list of tools exposed by 'fetch' and 'filesystem' servers
   tools = await aggregator.list_tools()

   # namespacing -- invokes the 'fetch' server to call the 'fetch' tool
   fetch_result = await aggregator.call_tool(name="fetch-fetch", arguments={"url": "https://www.anthropic.com/research/building-effective-agents"})

   # no namespacing -- first server in the aggregator exposing that tool wins
   read_file_result = await aggregator.call_tool(name="read_file", arguments={})
```

</details>

## Contributing

We welcome any and all kinds of contributions. Please see the [CONTRIBUTING guidelines](./CONTRIBUTING.md) to get started.

### Special Mentions

There have already been incredible community contributors who are driving this project forward:

- [Shaun Smith (@evalstate)](https://github.com/evalstate) -- who has been leading the charge on countless complex improvements, both to `mcp-agent` and generally to the MCP ecosystem.
- [Jerron Lim (@StreetLamb)](https://github.com/StreetLamb) -- who has contributed countless hours and excellent examples, and great ideas to the project.
- [Jason Summer (@jasonsum)](https://github.com/jasonsum) -- for identifying several issues and adapting his Gmail MCP server to work with mcp-agent

## Roadmap

We will be adding a detailed roadmap (ideally driven by your feedback). The current set of priorities include:

- **Durable Execution** -- allow workflows to pause/resume and serialize state so they can be replayed or be paused indefinitely. We are working on integrating [Temporal](./src/mcp_agent/executor/temporal.py) for this purpose.
- **Memory** -- adding support for long-term memory
- **Streaming** -- Support streaming listeners for iterative progress
- **Additional MCP capabilities** -- Expand beyond tool calls to support:
  - Resources
  - Prompts
  - Notifications

## FAQs

### What are the core benefits of using mcp-agent?

mcp-agent provides a streamlined approach to building AI agents using capabilities exposed by **MCP** (Model Context Protocol) servers.

MCP is quite low-level, and this framework handles the mechanics of connecting to servers, working with LLMs, handling external signals (like human input) and supporting persistent state via durable execution. That lets you, the developer, focus on the core business logic of your AI application.

Core benefits:

- 🤝 **Interoperability**: ensures that any tool exposed by any number of MCP servers can seamlessly plug in to your agents.
- ⛓️ **Composability & Cutstomizability**: Implements well-defined workflows, but in a composable way that enables compound workflows, and allows full customization across model provider, logging, orchestrator, etc.
- 💻 **Programmatic control flow**: Keeps things simple as developers just write code instead of thinking in graphs, nodes and edges. For branching logic, you write `if` statements. For cycles, use `while` loops.
- 🖐️ **Human Input & Signals**: Supports pausing workflows for external signals, such as human input, which are exposed as tool calls an Agent can make.

### Do you need an MCP client to use mcp-agent?

No, you can use mcp-agent anywhere, since it handles MCPClient creation for you. This allows you to leverage MCP servers outside of MCP hosts like Claude Desktop.

Here's all the ways you can set up your mcp-agent application:

#### MCP-Agent Server

You can expose mcp-agent applications as MCP servers themselves (see [example](./examples/basic/mcp_agent_server)), allowing MCP clients to interface with sophisticated AI workflows using the standard tools API of MCP servers. This is effectively a server-of-servers.

#### MCP Client or Host

You can embed mcp-agent in an MCP client directly to manage the orchestration across multiple MCP servers.

#### Standalone

You can use mcp-agent applications in a standalone fashion (i.e. they aren't part of an MCP client). The [`examples`](/examples/) are all standalone applications.

### Tell me a fun fact

I debated naming this project _silsila_ (سلسلہ), which means chain of events in Urdu. mcp-agent is more matter-of-fact, but there's still an easter egg in the project paying homage to silsila.


## Code Examples

The MCP-Agent framework provides multiple ways to create and run AI agents with MCP server connections:

### Basic Agent Example

```python
from mcp_agent.app import MCPApp
from mcp_agent.agents.agent import Agent
from mcp_agent.workflows.llm.augmented_llm_openai import OpenAIAugmentedLLM

app = MCPApp(name="my_agent")

async def main():
    async with app.run() as agent_app:
        # Create an agent with filesystem and fetch capabilities
        agent = Agent(
            name="finder",
            instruction="You help find and analyze files and web content",
            server_names=["fetch", "filesystem"]
        )
        
        async with agent:
            # Attach an LLM to the agent
            llm = await agent.attach_llm(OpenAIAugmentedLLM)
            
            # Generate responses using MCP tools
            result = await llm.generate_str(
                message="Find and read the config file"
            )
            print(result)
```

### Router-Based Workflow

```python
from mcp_agent.workflows.router.router_llm_openai import OpenAILLMRouter
from mcp_agent.agents.agent import Agent

# Create specialized agents
finder_agent = Agent(
    name="finder",
    instruction="Find and read files",
    server_names=["filesystem"]
)

writer_agent = Agent(
    name="writer",
    instruction="Write content to files",
    server_names=["filesystem"]
)

# Router automatically selects the best agent
router = OpenAILLMRouter(agents=[finder_agent, writer_agent])

# Route a request to the most appropriate agent
results = await router.route_to_agent(
    request="Read the config file", top_k=1
)
selected_agent = results[0].result
```

### Configuration

MCP-Agent uses YAML configuration files (`mcp_agent.config.yaml`):

```yaml
execution_engine: "asyncio"
mcp:
  servers:
    filesystem:
      command: "npx"
      args: ["-y", "@modelcontextprotocol/server-filesystem"]
    fetch:
      command: "uvx"
      args: ["mcp-server-fetch"]
openai:
  default_model: "gpt-4o-mini"
```

## Function and Class Definitions

*Note: Test files, example files, and script files are excluded from this section.*

### src/mcp_agent/agents/agent.py

**Class: `Agent`**
- **Inherits from**: BaseModel
- **Description**: An Agent is an entity that has access to a set of MCP servers and can interact with them.
Each agent should have a purpose defined by its instruction.
- **Attributes**:
  - `name` (str): Agent name.
  - `instruction` (str | Callable[[Dict], str]) = 'You are a helpful agent.': Instruction for the agent. This can be a string or a callable that takes a dictionary and returns a string. The callable can be used to generate dynamic instructions based on the context.
  - `server_names` (List[str]) = Field(default_factory=list): List of MCP server names that the agent can access.
  - `functions` (List[Callable]) = Field(default_factory=list): List of local functions that the agent can call.
  - `context` (Optional[Context]) = None: The application context that the agent is running in.
  - `connection_persistence` (bool) = True: Whether to persist connections to the MCP servers.
  - `human_input_callback` (Optional[Callable]) = None: Callback function for requesting human input. Must match HumanInputCallback protocol.
  - `llm` (Optional[Any]) = None: The LLM instance that is attached to the agent. This is set in attach_llm method.
  - `initialized` (bool) = False: Whether the agent has been initialized. This is set to True after agent.initialize() is completed.
  - `model_config` = ConfigDict(arbitrary_types_allowed=True, extra='allow')
  - `_function_tool_map` (Dict[str, FastTool]) = PrivateAttr(default_factory=dict)
  - `_namespaced_tool_map` (Dict[str, NamespacedTool]) = PrivateAttr(default_factory=dict)
  - `_server_to_tool_map` (Dict[str, List[NamespacedTool]]) = PrivateAttr(default_factory=dict)
  - `_namespaced_prompt_map` (Dict[str, NamespacedPrompt]) = PrivateAttr(default_factory=dict)
  - `_server_to_prompt_map` (Dict[str, List[NamespacedPrompt]]) = PrivateAttr(default_factory=dict)
  - `_agent_tasks` ('AgentTasks') = PrivateAttr(default=None)
  - `_init_lock` (asyncio.Lock) = PrivateAttr(default_factory=asyncio.Lock)

**Class: `InitAggregatorRequest`**
- **Inherits from**: BaseModel
- **Description**: Request to load/initialize an agent's servers.
- **Attributes**:
  - `agent_name` (str)
  - `server_names` (List[str])
  - `connection_persistence` (bool) = True
  - `force` (bool) = False

**Class: `InitAggregatorResponse`**
- **Inherits from**: BaseModel
- **Description**: Response for the load server request.
- **Attributes**:
  - `initialized` (bool)
  - `namespaced_tool_map` (Dict[str, NamespacedTool]) = Field(default_factory=dict)
  - `server_to_tool_map` (Dict[str, List[NamespacedTool]]) = Field(default_factory=dict)
  - `namespaced_prompt_map` (Dict[str, NamespacedPrompt]) = Field(default_factory=dict)
  - `server_to_prompt_map` (Dict[str, List[NamespacedPrompt]]) = Field(default_factory=dict)

**Class: `ListToolsRequest`**
- **Inherits from**: BaseModel
- **Description**: Request to list tools for an agent.
- **Attributes**:
  - `agent_name` (str)
  - `server_name` (Optional[str]) = None

**Class: `CallToolRequest`**
- **Inherits from**: BaseModel
- **Description**: Request to call a tool for an agent.
- **Attributes**:
  - `agent_name` (str)
  - `server_name` (Optional[str]) = None
  - `name` (str)
  - `arguments` (Optional[dict[str, str]]) = None

**Class: `ListPromptsRequest`**
- **Inherits from**: BaseModel
- **Description**: Request to list prompts for an agent.
- **Attributes**:
  - `agent_name` (str)
  - `server_name` (Optional[str]) = None

**Class: `GetPromptRequest`**
- **Inherits from**: BaseModel
- **Description**: Request to get a prompt from an agent.
- **Attributes**:
  - `agent_name` (str)
  - `server_name` (Optional[str]) = None
  - `name` (str)
  - `arguments` (Optional[dict[str, str]]) = None

**Class: `GetCapabilitiesRequest`**
- **Inherits from**: BaseModel
- **Description**: Request to get the capabilities of a specific server.
- **Attributes**:
  - `agent_name` (str)
  - `server_name` (Optional[str]) = None

**Class: `GetServerSessionRequest`**
- **Inherits from**: BaseModel
- **Description**: Request to get the session data of a specific server.
- **Attributes**:
  - `agent_name` (str)
  - `server_name` (str)

**Class: `GetServerSessionResponse`**
- **Inherits from**: BaseModel
- **Description**: Response to the get server session request.
- **Attributes**:
  - `session_id` (str | None) = None
  - `session_data` (dict[str, Any]) = Field(default_factory=dict)
  - `error` (Optional[str]) = None

**Class: `AgentTasks`**
- **Description**: Agent tasks for executing agent-related activities.
- **Attributes**:
  - `server_aggregators_for_agent` (Dict[str, MCPAggregator]) = {}
  - `server_aggregators_for_agent_lock` (asyncio.Lock) = asyncio.Lock()
  - `agent_refcounts` (dict[str, int]) = {}

**Function:** `Agent.model_post_init(self, __context) -> None`


**Function:** `Agent.attach_llm(self, llm_factory: Callable[..., LLM] | None = None, llm: LLM | None = None) -> LLM`

- **Description**: Create an LLM instance for the agent. Args: llm_factory: A callable that constructs an AugmentedLLM or its subclass. The factory should accept keyword arguments matching the AugmentedLLM constructor parameters. llm: An instance of AugmentedLLM or its subclass. If provided, this will be used instead of creating a new instance. Returns: An instance of AugmentedLLM or one of its subclasses.
- **Parameters**
  - `self`
  - `llm_factory` (Callable[..., LLM] | None, optional): A callable that constructs an AugmentedLLM or its subclass. The factory should accept keyword arguments matching the AugmentedLLM constructor parameters.
  - `llm` (LLM | None, optional): An instance of AugmentedLLM or its subclass. If provided, this will be used instead of creating a new instance.
- **Returns**
  - `LLM`: An instance of AugmentedLLM or one of its subclasses.

**Function:** `Agent.initialize(self, force: bool = False)`

- **Description**: Initialize the agent.
- **Parameters**
  - `self`
  - `force` (bool, optional): Default is False

**Function:** `Agent.shutdown(self)`

- **Description**: Shutdown the agent and close all MCP server connections. NOTE: This method is called automatically when the agent is used as an async context manager.
- **Parameters**
  - `self`

**Function:** `Agent.close(self)`

- **Description**: Close the agent and release all resources. Synonymous with shutdown.
- **Parameters**
  - `self`

**Function:** `Agent.__aenter__(self)`


**Function:** `Agent.__aexit__(self, exc_type, exc_val, exc_tb)`


**Function:** `Agent.get_capabilities(self, server_name: str | None) -> ServerCapabilities | Dict[str, ServerCapabilities]`

- **Description**: Get the capabilities of a specific server.
- **Parameters**
  - `self`
  - `server_name` (str | None)
- **Returns**
  - `ServerCapabilities | Dict[str, ServerCapabilities]`: Return value

**Function:** `Agent.get_server_session(self, server_name: str)`

- **Description**: Get the session data of a specific server.
- **Parameters**
  - `self`
  - `server_name` (str)

**Function:** `Agent.list_tools(self, server_name: str | None = None) -> ListToolsResult`


**Function:** `Agent.list_prompts(self, server_name: str | None = None) -> ListPromptsResult`


**Function:** `Agent.get_prompt(self, name: str, arguments: dict[str, str] | None = None) -> GetPromptResult`


**Function:** `Agent.request_human_input(self, request: HumanInputRequest) -> str`

- **Description**: Request input from a human user. Pauses the workflow until input is received. Args: request: The human input request Returns: The input provided by the human Raises: TimeoutError: If the timeout is exceeded ValueError: If human_input_callback is not set or doesn't have the right signature
- **Parameters**
  - `self`
  - `request` (HumanInputRequest): The human input request
- **Returns**
  - `str`: The input provided by the human
- **Raises**: TimeoutError: If the timeout is exceeded ValueError: If human_input_callback is not set or doesn't have the right signature

**Function:** `Agent.call_callback_and_signal()`


**Function:** `Agent.call_tool(self, name: str, arguments: dict | None = None, server_name: str | None = None) -> CallToolResult`


**Function:** `Agent._call_human_input_tool(self, arguments: dict | None = None) -> CallToolResult`


**Function:** `AgentTasks.__init__(self, context: 'Context')`


**Function:** `AgentTasks.initialize_aggregator_task(self, request: InitAggregatorRequest) -> InitAggregatorResponse`

- **Description**: Load/initialize an agent's servers.
- **Parameters**
  - `self`
  - `request` (InitAggregatorRequest)
- **Returns**
  - `InitAggregatorResponse`: Return value

**Function:** `AgentTasks.shutdown_aggregator_task(self, agent_name: str) -> bool`

- **Description**: Shutdown the agent's servers.
- **Parameters**
  - `self`
  - `agent_name` (str)
- **Returns**
  - `bool`: Return value

**Function:** `AgentTasks.list_tools_task(self, request: ListToolsRequest) -> ListToolsResult`

- **Description**: List tools for an agent.
- **Parameters**
  - `self`
  - `request` (ListToolsRequest)
- **Returns**
  - `ListToolsResult`: Return value

**Function:** `AgentTasks.call_tool_task(self, request: CallToolRequest) -> CallToolResult`

- **Description**: Call a tool for an agent.
- **Parameters**
  - `self`
  - `request` (CallToolRequest)
- **Returns**
  - `CallToolResult`: Return value

**Function:** `AgentTasks.list_prompts_task(self, request: ListPromptsRequest) -> ListPromptsResult`

- **Description**: List tools for an agent.
- **Parameters**
  - `self`
  - `request` (ListPromptsRequest)
- **Returns**
  - `ListPromptsResult`: Return value

**Function:** `AgentTasks.get_prompt_task(self, request: GetPromptRequest) -> GetPromptResult`

- **Description**: Get a prompt for an agent.
- **Parameters**
  - `self`
  - `request` (GetPromptRequest)
- **Returns**
  - `GetPromptResult`: Return value

**Function:** `AgentTasks.get_capabilities_task(self, request: GetCapabilitiesRequest) -> Dict[str, ServerCapabilities]`

- **Description**: Get the capabilities of a specific server.
- **Parameters**
  - `self`
  - `request` (GetCapabilitiesRequest)
- **Returns**
  - `Dict[str, ServerCapabilities]`: Return value

**Function:** `AgentTasks.get_server_session(self, request: GetServerSessionRequest) -> GetServerSessionResponse`

- **Description**: Get the session for a specific server.
- **Parameters**
  - `self`
  - `request` (GetServerSessionRequest)
- **Returns**
  - `GetServerSessionResponse`: Return value

### src/mcp_agent/app.py

**Class: `MCPApp`**
- **Description**: Main application class that manages global state and can host workflows.

Example usage:
    app = MCPApp()

    @app.workflow
    class MyWorkflow(Workflow[str]):
        @app.task
        async def my_task(self):
            pass

        async def run(self):
            await self.my_task()

    async with app.run() as running_app:
        workflow = MyWorkflow()
        result = await workflow.execute()

**Function:** `MCPApp.__init__(self, name: str = 'mcp_application', description: str | None = None, settings: Optional[Settings] | str = None, human_input_callback: Optional[HumanInputCallback] = None, signal_notification: Optional[SignalWaitCallback] = None, upstream_session: Optional['ServerSession'] = None, model_selector: ModelSelector = None)`

- **Description**: Initialize the application with a name and optional settings. Args: name: Name of the application description: Description of the application. If you expose the MCPApp as an MCP server, provide a detailed description, since it will be used as the server's description. settings: Application configuration - If unspecified, the settings are loaded from mcp_agent.config.yaml. If this is a string, it is treated as the path to the config file to load. human_input_callback: Callback for handling human input signal_notification: Callback for getting notified on workflow signals/events. upstream_session: Upstream session if the MCPApp is running as a server to an MCP client. initialize_model_selector: Initializes the built-in ModelSelector to help with model selection. Defaults to False.
- **Parameters**
  - `self`
  - `name` (str, optional): Name of the application
  - `description` (str | None, optional): Description of the application. If you expose the MCPApp as an MCP server, provide a detailed description, since it will be used as the server's description.
  - `settings` (Optional[Settings] | str, optional): Application configuration - If unspecified, the settings are loaded from mcp_agent.config.yaml. If this is a string, it is treated as the path to the config file to load.
  - `human_input_callback` (Optional[HumanInputCallback], optional): Callback for handling human input
  - `signal_notification` (Optional[SignalWaitCallback], optional): Callback for getting notified on workflow signals/events.
  - `upstream_session` (Optional['ServerSession'], optional): Upstream session if the MCPApp is running as a server to an MCP client.
  - `model_selector` (ModelSelector, optional): Default is None

**Function:** `MCPApp.context(self) -> Context`


**Function:** `MCPApp.config(self)`


**Function:** `MCPApp.server_registry(self)`


**Function:** `MCPApp.executor(self)`


**Function:** `MCPApp.engine(self)`


**Function:** `MCPApp.upstream_session(self)`


**Function:** `MCPApp.upstream_session(self, value)`


**Function:** `MCPApp.workflows(self)`


**Function:** `MCPApp.tasks(self)`


**Function:** `MCPApp.session_id(self)`


**Function:** `MCPApp.logger(self)`


**Function:** `MCPApp.initialize(self)`

- **Description**: Initialize the application.
- **Parameters**
  - `self`

**Function:** `MCPApp.cleanup(self)`

- **Description**: Cleanup application resources.
- **Parameters**
  - `self`

**Function:** `MCPApp.run(self)`

- **Description**: Run the application. Use as context manager. Example: async with app.run() as running_app: # App is initialized here pass
- **Parameters**
  - `self`
- **async with app.run() as running_app**: # App is initialized here pass

**Function:** `MCPApp.workflow(self, cls: Type) -> Type`

- **Description**: Decorator for a workflow class. By default it's a no-op, but different executors can use this to customize behavior for workflow registration. Example: If Temporal is available & we use a TemporalExecutor, this decorator will wrap with temporal_workflow.defn.
- **Parameters**
  - `self`
  - `cls` (Type)
- **Returns**
  - `Type`: Return value
- **Example**: If Temporal is available & we use a TemporalExecutor, this decorator will wrap with temporal_workflow.defn.

**Function:** `MCPApp.workflow_signal(self, fn: Callable[..., R] | None = None) -> Callable[..., R]`

- **Description**: Decorator for a workflow's signal handler. Different executors can use this to customize behavior for workflow signal handling. Args: fn: The function to decorate (optional, for use with direct application) name: Optional custom name for the signal. If not provided, uses the function name. Example: If Temporal is in use, this gets converted to @workflow.signal.
- **Parameters**
  - `self`
  - `fn` (Callable[..., R] | None, optional): The function to decorate (optional, for use with direct application)
- **Returns**
  - `Callable[..., R]`: Return value
- **Example**: If Temporal is in use, this gets converted to @workflow.signal.

**Function:** `MCPApp.decorator(func)`


**Function:** `MCPApp.wrapper()`


**Function:** `MCPApp.workflow_run(self, fn: Callable[..., R]) -> Callable[..., R]`

- **Description**: Decorator for a workflow's main 'run' method. Different executors can use this to customize behavior for workflow execution. Example: If Temporal is in use, this gets converted to @workflow.run.
- **Parameters**
  - `self`
  - `fn` (Callable[..., R])
- **Returns**
  - `Callable[..., R]`: Return value
- **Example**: If Temporal is in use, this gets converted to @workflow.run.

**Function:** `MCPApp.wrapper()`


**Function:** `MCPApp.workflow_task(self, name: str | None = None, schedule_to_close_timeout: timedelta | None = None, retry_policy: Dict[str, Any] | None = None) -> Callable[[Callable[..., R]], Callable[..., R]]`

- **Description**: Decorator to mark a function as a workflow task, automatically registering it in the global activity registry. Args: name: Optional custom name for the activity schedule_to_close_timeout: Maximum time the task can take to complete retry_policy: Retry policy configuration **kwargs: Additional metadata passed to the activity registration Returns: Decorated function that preserves async and typing information Raises: TypeError: If the decorated function is not async ValueError: If the retry policy or timeout is invalid
- **Parameters**
  - `self`
  - `name` (str | None, optional): Optional custom name for the activity
  - `schedule_to_close_timeout` (timedelta | None, optional): Maximum time the task can take to complete
  - `retry_policy` (Dict[str, Any] | None, optional): Retry policy configuration
- **Returns**
  - `Callable[[Callable[..., R]], Callable[..., R]]`: Decorated function that preserves async and typing information
- **Raises**: TypeError: If the decorated function is not async ValueError: If the retry policy or timeout is invalid

**Function:** `MCPApp.decorator(target: Callable[..., R]) -> Callable[..., R]`


**Function:** `MCPApp._bound_adapter()`


**Function:** `MCPApp.is_workflow_task(self, func: Callable[..., Any]) -> bool`

- **Description**: Check if a function is marked as a workflow task. This gets set for functions that are decorated with @workflow_task.
- **Parameters**
  - `self`
  - `func` (Callable[..., Any])
- **Returns**
  - `bool`: Return value

**Function:** `MCPApp._register_global_workflow_tasks(self)`

- **Description**: Register all statically defined workflow tasks with this app instance.
- **Parameters**
  - `self`

**Function:** `MCPApp._bound_adapter()`


### src/mcp_agent/cli/commands/config.py

**Function:** `show()`

- **Description**: Show the configuration.

### src/mcp_agent/cli/main.py

**Function:** `main(verbose: bool = typer.Option(False, '--verbose', '-v', help='Enable verbose mode'), color: bool = typer.Option(True, '--color/--no-color', help='Enable/disable color output'))`

- **Description**: Main entry point for the MCP Agent CLI.
- **Parameters**
  - `verbose` (bool, optional): Default is typer.Option(False, '--verbose', '-v', help='Enable verbose mode')
  - `quiet` (bool, optional): Default is typer.Option(False, '--quiet', '-q', help='Disable output')
  - `color` (bool, optional): Default is typer.Option(True, '--color/--no-color', help='Enable/disable color output')

### src/mcp_agent/cli/terminal.py

**Class: `Application`**

**Function:** `Application.__init__(self, verbosity: int = 0, enable_color: bool = True)`


**Function:** `Application.log(self, message: str, level: str = 'info')`


**Function:** `Application.status(self, message: str)`


### src/mcp_agent/config.py

**Module Description**: Reading settings from environment variables and providing a settings object for the application configuration.

**Class: `MCPServerAuthSettings`**
- **Inherits from**: BaseModel
- **Description**: Represents authentication configuration for a server.
- **Attributes**:
  - `api_key` (str | None) = None
  - `model_config` = ConfigDict(extra='allow', arbitrary_types_allowed=True)

**Class: `MCPRootSettings`**
- **Inherits from**: BaseModel
- **Description**: Represents a root directory configuration for an MCP server.
- **Attributes**:
  - `uri` (str): The URI identifying the root. Must start with file://
  - `name` (Optional[str]) = None: Optional name for the root.
  - `server_uri_alias` (Optional[str]) = None: Optional URI alias for presentation to the server
  - `model_config` = ConfigDict(extra='allow', arbitrary_types_allowed=True)

**Class: `MCPServerSettings`**
- **Inherits from**: BaseModel
- **Description**: Represents the configuration for an individual server.
- **Attributes**:
  - `name` (str | None) = None: The name of the server.
  - `description` (str | None) = None: The description of the server.
  - `transport` (Literal['stdio', 'sse', 'streamable_http', 'websocket']) = 'stdio': The transport mechanism.
  - `command` (str | None) = None: The command to execute the server (e.g. npx) in stdio mode.
  - `args` (List[str]) = Field(default_factory=list): The arguments for the server command in stdio mode.
  - `url` (str | None) = None: The URL for the server for SSE, Streamble HTTP or websocket transport.
  - `headers` (Dict[str, str] | None) = None: HTTP headers for SSE or Streamable HTTP requests.
  - `http_timeout_seconds` (int | None) = None: HTTP request timeout in seconds for SSE or Streamable HTTP requests. Note: This is different from read_timeout_seconds, which determines how long (in seconds) the client will wait for a new event before disconnecting
  - `read_timeout_seconds` (int | None) = None: Timeout in seconds the client will wait for a new event before disconnecting from an SSE or Streamable HTTP server connection.
  - `terminate_on_close` (bool) = True: For Streamable HTTP transport, whether to terminate the session on connection close.
  - `auth` (MCPServerAuthSettings | None) = None: The authentication configuration for the server.
  - `roots` (List[MCPRootSettings] | None) = None: Root directories this server has access to.
  - `env` (Dict[str, str] | None) = None: Environment variables to pass to the server process.
  - `model_config` = ConfigDict(extra='allow', arbitrary_types_allowed=True)

**Class: `MCPSettings`**
- **Inherits from**: BaseModel
- **Description**: Configuration for all MCP servers.
- **Attributes**:
  - `servers` (Dict[str, MCPServerSettings]) = Field(default_factory=dict)
  - `model_config` = ConfigDict(extra='allow', arbitrary_types_allowed=True)

**Class: `AnthropicSettings`**
- **Inherits from**: BaseModel
- **Description**: Settings for using Anthropic models in the MCP Agent application.
- **Attributes**:
  - `api_key` (str | None) = None
  - `model_config` = ConfigDict(extra='allow', arbitrary_types_allowed=True)

**Class: `BedrockSettings`**
- **Inherits from**: BaseModel
- **Description**: Settings for using Bedrock models in the MCP Agent application.
- **Attributes**:
  - `aws_access_key_id` (str | None) = None
  - `aws_secret_access_key` (str | None) = None
  - `aws_session_token` (str | None) = None
  - `aws_region` (str | None) = None
  - `profile` (str | None) = None
  - `model_config` = ConfigDict(extra='allow', arbitrary_types_allowed=True)

**Class: `CohereSettings`**
- **Inherits from**: BaseModel
- **Description**: Settings for using Cohere models in the MCP Agent application.
- **Attributes**:
  - `api_key` (str | None) = None
  - `model_config` = ConfigDict(extra='allow', arbitrary_types_allowed=True)

**Class: `OpenAISettings`**
- **Inherits from**: BaseModel
- **Description**: Settings for using OpenAI models in the MCP Agent application.
- **Attributes**:
  - `api_key` (str | None) = None
  - `reasoning_effort` (Literal['low', 'medium', 'high']) = 'medium'
  - `base_url` (str | None) = None
  - `model_config` = ConfigDict(extra='allow', arbitrary_types_allowed=True)

**Class: `AzureSettings`**
- **Inherits from**: BaseModel
- **Description**: Settings for using Azure models in the MCP Agent application.
- **Attributes**:
  - `api_key` (str | None) = None
  - `endpoint` (str)
  - `credential_scopes` (List[str] | None) = Field(default=['https://cognitiveservices.azure.com/.default'])
  - `model_config` = ConfigDict(extra='allow', arbitrary_types_allowed=True)

**Class: `GoogleSettings`**
- **Inherits from**: BaseModel
- **Description**: Settings for using Google models in the MCP Agent application.
- **Attributes**:
  - `api_key` (str | None) = None: Or use the GOOGLE_API_KEY environment variable
  - `vertexai` (bool) = False
  - `project` (str | None) = None
  - `location` (str | None) = None
  - `model_config` = ConfigDict(extra='allow', arbitrary_types_allowed=True)

**Class: `TemporalSettings`**
- **Inherits from**: BaseModel
- **Description**: Temporal settings for the MCP Agent application.
- **Attributes**:
  - `host` (str)
  - `namespace` (str) = 'default'
  - `task_queue` (str)
  - `max_concurrent_activities` (int | None) = None
  - `api_key` (str | None) = None
  - `timeout_seconds` (int | None) = 60
  - `rpc_metadata` (Dict[str, str] | None) = None

**Class: `UsageTelemetrySettings`**
- **Inherits from**: BaseModel
- **Description**: Settings for usage telemetry in the MCP Agent application.
Anonymized usage metrics are sent to a telemetry server to help improve the product.
- **Attributes**:
  - `enabled` (bool) = True: Enable usage telemetry in the MCP Agent application.
  - `enable_detailed_telemetry` (bool) = False: If enabled, detailed telemetry data, including prompts and agents, will be sent to the telemetry server.

**Class: `OpenTelemetrySettings`**
- **Inherits from**: BaseModel
- **Description**: OTEL settings for the MCP Agent application.
- **Attributes**:
  - `enabled` (bool) = True
  - `service_name` (str) = 'mcp-agent'
  - `service_instance_id` (str | None) = None
  - `service_version` (str | None) = None
  - `otlp_endpoint` (str | None) = None: OTLP endpoint for OpenTelemetry tracing
  - `console_debug` (bool) = False: Log spans to console
  - `sample_rate` (float) = 1.0: Sample rate for tracing (1.0 = sample everything)

**Class: `LogPathSettings`**
- **Inherits from**: BaseModel
- **Description**: Settings for configuring log file paths with dynamic elements like timestamps or session IDs.
- **Attributes**:
  - `path_pattern` (str) = 'logs/mcp-agent-{unique_id}.jsonl': Path pattern for log files with a {unique_id} placeholder. The placeholder will be replaced according to the unique_id setting. Example: "logs/mcp-agent-{unique_id}.jsonl"
  - `unique_id` (Literal['timestamp', 'session_id']) = 'timestamp': Type of unique identifier to use in the log filename: - timestamp: Uses the current time formatted according to timestamp_format - session_id: Generates a UUID for the session
  - `timestamp_format` (str) = '%Y%m%d_%H%M%S': Format string for timestamps when unique_id is set to "timestamp". Uses Python's datetime.strftime format.

**Class: `LoggerSettings`**
- **Inherits from**: BaseModel
- **Description**: Logger settings for the MCP Agent application.
- **Attributes**:
  - `type` (Literal['none', 'console', 'file', 'http']) = 'console'
  - `transports` (List[Literal['none', 'console', 'file', 'http']]) = []: List of transports to use (can enable multiple simultaneously)
  - `level` (Literal['debug', 'info', 'warning', 'error']) = 'info': Minimum logging level
  - `progress_display` (bool) = False: Enable or disable the progress display
  - `path` (str) = 'mcp-agent.jsonl': Path to log file, if logger 'type' is 'file'.
  - `path_settings` (LogPathSettings | None) = None: Save log files with more advanced path semantics, like having timestamps or session id in the log name.
  - `batch_size` (int) = 100: Number of events to accumulate before processing
  - `flush_interval` (float) = 2.0: How often to flush events in seconds
  - `max_queue_size` (int) = 2048: Maximum queue size for event processing
  - `http_endpoint` (str | None) = None: HTTP endpoint for event transport
  - `http_headers` (dict[str, str] | None) = None: HTTP headers for event transport
  - `http_timeout` (float) = 5.0: HTTP timeout seconds for event transport

**Class: `Settings`**
- **Inherits from**: BaseSettings
- **Description**: Settings class for the MCP Agent application.
- **Attributes**:
  - `model_config` = SettingsConfigDict(env_nested_delimiter='__', env_file='.env', env_file_encoding='utf-8', extra='allow', nested_model_default_partial_update=True)
  - `mcp` (MCPSettings | None) = MCPSettings(): MCP config, such as MCP servers
  - `execution_engine` (Literal['asyncio', 'temporal']) = 'asyncio': Execution engine for the MCP Agent application
  - `temporal` (TemporalSettings | None) = None: Settings for Temporal workflow orchestration
  - `anthropic` (AnthropicSettings | None) = None: Settings for using Anthropic models in the MCP Agent application
  - `bedrock` (BedrockSettings | None) = None: Settings for using Bedrock models in the MCP Agent application
  - `cohere` (CohereSettings | None) = None: Settings for using Cohere models in the MCP Agent application
  - `openai` (OpenAISettings | None) = None: Settings for using OpenAI models in the MCP Agent application
  - `azure` (AzureSettings | None) = None: Settings for using Azure models in the MCP Agent application
  - `google` (GoogleSettings | None) = None: Settings for using Google models in the MCP Agent application
  - `otel` (OpenTelemetrySettings | None) = OpenTelemetrySettings(): OpenTelemetry logging settings for the MCP Agent application
  - `logger` (LoggerSettings | None) = LoggerSettings(): Logger settings for the MCP Agent application
  - `usage_telemetry` (UsageTelemetrySettings | None) = UsageTelemetrySettings(): Usage tracking settings for the MCP Agent application

**Function:** `MCPRootSettings.validate_uri(cls, v: str) -> str`

- **Description**: Validate that the URI starts with file:// (required by specification 2024-11-05)
- **Parameters**
  - `cls`
  - `v` (str)
- **Returns**
  - `str`: Return value

**Function:** `Settings.find_config(cls) -> Path | None`

- **Description**: Find the config file in the current directory or parent directories.
- **Parameters**
  - `cls`
- **Returns**
  - `Path | None`: Return value

**Function:** `Settings.find_secrets(cls) -> Path | None`

- **Description**: Find the secrets file in the current directory or parent directories.
- **Parameters**
  - `cls`
- **Returns**
  - `Path | None`: Return value

**Function:** `Settings._find_config(cls, filenames: List[str]) -> Path | None`

- **Description**: Find the config file of one of the possible names in the current directory or parent directories.
- **Parameters**
  - `cls`
  - `filenames` (List[str])
- **Returns**
  - `Path | None`: Return value

**Function:** `get_settings(config_path: str | None = None) -> Settings`

- **Description**: Get settings instance, automatically loading from config file if available.
- **Parameters**
  - `config_path` (str | None, optional): Default is None
- **Returns**
  - `Settings`: Return value

**Function:** `deep_merge(base: dict, update: dict) -> dict`

- **Description**: Recursively merge two dictionaries, preserving nested structures.
- **Parameters**
  - `base` (dict)
  - `update` (dict)
- **Returns**
  - `dict`: Return value

### src/mcp_agent/core/context.py

**Module Description**: A central context object to store global state that is shared across the application.

**Class: `Context`**
- **Inherits from**: BaseModel
- **Description**: Context that is passed around through the application.
This is a global context that is shared across the application.
- **Attributes**:
  - `config` (Optional[Settings]) = None
  - `executor` (Optional[Executor]) = None
  - `human_input_handler` (Optional[HumanInputCallback]) = None
  - `signal_notification` (Optional[SignalWaitCallback]) = None
  - `upstream_session` (Optional[ServerSession]) = None
  - `model_selector` (Optional[ModelSelector]) = None
  - `session_id` (str | None) = None
  - `app` (Optional['MCPApp']) = None
  - `server_registry` (Optional[ServerRegistry]) = None
  - `task_registry` (Optional[ActivityRegistry]) = None
  - `signal_registry` (Optional[SignalRegistry]) = None
  - `decorator_registry` (Optional[DecoratorRegistry]) = None
  - `workflow_registry` (Optional['WorkflowRegistry']) = None
  - `tracer` (Optional[trace.Tracer]) = None
  - `model_config` = ConfigDict(extra='allow', arbitrary_types_allowed=True)

**Function:** `configure_otel(config: 'Settings')`

- **Description**: Configure OpenTelemetry based on the application config.
- **Parameters**
  - `config` ('Settings')

**Function:** `configure_logger(config: 'Settings', session_id: str | None = None)`

- **Description**: Configure logging and tracing based on the application config.
- **Parameters**
  - `config` ('Settings')
  - `session_id` (str | None, optional): Default is None

**Function:** `configure_usage_telemetry(_config: 'Settings')`

- **Description**: Configure usage telemetry based on the application config. TODO: saqadri - implement usage tracking
- **Parameters**
  - `_config` ('Settings')

**Function:** `configure_executor(config: 'Settings')`

- **Description**: Configure the executor based on the application config.
- **Parameters**
  - `config` ('Settings')

**Function:** `configure_workflow_registry(config: 'Settings', executor: Executor)`

- **Description**: Configure the workflow registry based on the application config.
- **Parameters**
  - `config` ('Settings')
  - `executor` (Executor)

**Function:** `initialize_context(config: Optional['Settings'] = None, task_registry: Optional[ActivityRegistry] = None, decorator_registry: Optional[DecoratorRegistry] = None, signal_registry: Optional[SignalRegistry] = None, store_globally: bool = False)`

- **Description**: Initialize the global application context.
- **Parameters**
  - `config` (Optional['Settings'], optional): Default is None
  - `task_registry` (Optional[ActivityRegistry], optional): Default is None
  - `decorator_registry` (Optional[DecoratorRegistry], optional): Default is None
  - `signal_registry` (Optional[SignalRegistry], optional): Default is None
  - `store_globally` (bool, optional): Default is False

**Function:** `cleanup_context()`

- **Description**: Cleanup the global application context.

**Function:** `get_current_context() -> Context`

- **Description**: Synchronous initializer/getter for global application context. For async usage, use aget_current_context instead.
- **Returns**
  - `Context`: Return value

**Function:** `run_async()`


**Function:** `get_current_config()`

- **Description**: Get the current application config.

### src/mcp_agent/core/context_dependent.py

**Class: `ContextDependent`**
- **Description**: Mixin class for components that need context access.
Provides both global fallback and instance-specific context support.

**Function:** `ContextDependent.__init__(self, context: Optional['Context'] = None)`


**Function:** `ContextDependent.context(self) -> 'Context'`

- **Description**: Get context, with graceful fallback to global context if needed. Raises clear error if no context is available.
- **Parameters**
  - `self`
- **Returns**
  - `'Context'`: Return value

**Function:** `ContextDependent.use_context(self, context: 'Context')`

- **Description**: Temporarily use a different context.
- **Parameters**
  - `self`
  - `context` ('Context')

### src/mcp_agent/core/exceptions.py

**Module Description**: Custom exceptions for the mcp-agent library. Enables user-friendly error handling for common issues.

**Class: `MCPAgentError`**
- **Inherits from**: Exception
-- **Description**: Base exception class for agent errors

**Class: `ServerConfigError`**
- **Inherits from**: MCPAgentError
- **Description**: Raised when there are issues with MCP server configuration
Example: Server name referenced in agent.servers[] but not defined in config

**Class: `AgentConfigError`**
- **Inherits from**: MCPAgentError
- **Description**: Raised when there are issues with Agent or Workflow configuration
Example: Parallel fan-in references unknown agent

**Class: `ProviderKeyError`**
- **Inherits from**: MCPAgentError
- **Description**: Raised when there are issues with LLM provider API keys
Example: OpenAI/Anthropic key not configured but model requires it

**Class: `ServerInitializationError`**
- **Inherits from**: MCPAgentError
- **Description**: Raised when a server fails to initialize properly.

**Class: `ModelConfigError`**
- **Inherits from**: MCPAgentError
- **Description**: Raised when there are issues with LLM model configuration
Example: Unknown model name in model specification string

**Class: `CircularDependencyError`**
- **Inherits from**: MCPAgentError
- **Description**: Raised when we detect a Circular Dependency in the workflow

**Class: `PromptExitError`**
- **Inherits from**: MCPAgentError
- **Description**: Raised from enhanced_prompt when the user requests hard exits

**Function:** `MCPAgentError.__init__(self, message: str, details: str = '')`


**Function:** `ServerConfigError.__init__(self, message: str, details: str = '')`


**Function:** `AgentConfigError.__init__(self, message: str, details: str = '')`


**Function:** `ProviderKeyError.__init__(self, message: str, details: str = '')`


**Function:** `ServerInitializationError.__init__(self, message: str, details: str = '')`


**Function:** `ModelConfigError.__init__(self, message: str, details: str = '')`


**Function:** `CircularDependencyError.__init__(self, message: str, details: str = '')`


**Function:** `PromptExitError.__init__(self, message: str, details: str = '')`


### src/mcp_agent/executor/decorator_registry.py

**Module Description**: Keep track of all workflow decorator overloads indexed by executor backend. Different executors may have different ways of configuring workflows.

**Class: `DecoratorRegistry`**
- **Description**: Centralized decorator management with validation and metadata.

**Function:** `DecoratorRegistry.__init__(self)`


**Function:** `DecoratorRegistry.register_workflow_defn_decorator(self, executor_name: str, decorator: Callable[[Type], Type])`

- **Description**: Registers a workflow definition decorator for a given executor. :param executor_name: Unique name of the executor. :param decorator: The decorator to register.
- **Parameters**
  - `self`
  - `executor_name` (str)
  - `decorator` (Callable[[Type], Type])

**Function:** `DecoratorRegistry.get_workflow_defn_decorator(self, executor_name: str) -> Callable[[Type], Type]`

- **Description**: Retrieves a workflow definition decorator for a given executor. :param executor_name: Unique name of the executor. :return: The decorator function.
- **Parameters**
  - `self`
  - `executor_name` (str)
- **Returns**
  - `Callable[[Type], Type]`: Return value

**Function:** `DecoratorRegistry.register_workflow_run_decorator(self, executor_name: str, decorator: Callable[[Callable[..., R]], Callable[..., R]])`

- **Description**: Registers a workflow run decorator for a given executor. :param executor_name: Unique name of the executor. :param decorator: The decorator to register.
- **Parameters**
  - `self`
  - `executor_name` (str)
  - `decorator` (Callable[[Callable[..., R]], Callable[..., R]])

**Function:** `DecoratorRegistry.get_workflow_run_decorator(self, executor_name: str) -> Callable[[Callable[..., R]], Callable[..., R]]`

- **Description**: Retrieves a workflow run decorator for a given executor. :param executor_name: Unique name of the executor. :return: The decorator function.
- **Parameters**
  - `self`
  - `executor_name` (str)
- **Returns**
  - `Callable[[Callable[..., R]], Callable[..., R]]`: Return value

**Function:** `DecoratorRegistry.register_workflow_task_decorator(self, executor_name: str, decorator: Callable[[Callable[..., T]], Callable[..., T]])`

- **Description**: Registers a workflow task decorator for a given executor. :param executor_name: Unique name of the executor. :param decorator: The decorator to register.
- **Parameters**
  - `self`
  - `executor_name` (str)
  - `decorator` (Callable[[Callable[..., T]], Callable[..., T]])

**Function:** `DecoratorRegistry.get_workflow_task_decorator(self, executor_name: str) -> Callable[[Callable[..., T]], Callable[..., T]]`

- **Description**: Retrieves a workflow task decorator for a given executor. :param executor_name: Unique name of the executor. :return: The decorator function.
- **Parameters**
  - `self`
  - `executor_name` (str)
- **Returns**
  - `Callable[[Callable[..., T]], Callable[..., T]]`: Return value

**Function:** `DecoratorRegistry.register_workflow_signal_decorator(self, executor_name: str, decorator: Callable[[Callable[..., S]], Callable[..., S]])`

- **Description**: Registers a workflow signal decorator for a given executor. :param executor_name: Unique name of the executor. :param decorator: The decorator to register.
- **Parameters**
  - `self`
  - `executor_name` (str)
  - `decorator` (Callable[[Callable[..., S]], Callable[..., S]])

**Function:** `DecoratorRegistry.get_workflow_signal_decorator(self, executor_name: str) -> Callable[[Callable[..., S]], Callable[..., S]]`

- **Description**: Retrieves a workflow signal decorator for a given executor. :param executor_name: Unique name of the executor. :return: The decorator function.
- **Parameters**
  - `self`
  - `executor_name` (str)
- **Returns**
  - `Callable[[Callable[..., S]], Callable[..., S]]`: Return value

**Function:** `default_workflow_defn(cls: Type) -> Type`

- **Description**: Default no-op workflow definition decorator.
- **Parameters**
  - `cls` (Type)
- **Returns**
  - `Type`: Return value

**Function:** `default_workflow_run(fn: Callable[..., R]) -> Callable[..., R]`

- **Description**: Default no-op workflow run decorator.
- **Parameters**
  - `fn` (Callable[..., R])
- **Returns**
  - `Callable[..., R]`: Return value

**Function:** `wrapper()`


**Function:** `default_workflow_task(fn: Callable[..., T]) -> Callable[..., T]`

- **Description**: Default no-op workflow task decorator.
- **Parameters**
  - `fn` (Callable[..., T])
- **Returns**
  - `Callable[..., T]`: Return value

**Function:** `wrapper()`


**Function:** `default_workflow_signal(fn: Callable[..., R]) -> Callable[..., R]`

- **Description**: Default no-op workflow signal decorator.
- **Parameters**
  - `fn` (Callable[..., R])
- **Returns**
  - `Callable[..., R]`: Return value

**Function:** `wrapper()`


**Function:** `register_asyncio_decorators(decorator_registry: DecoratorRegistry)`

- **Description**: Registers default asyncio decorators.
- **Parameters**
  - `decorator_registry` (DecoratorRegistry)

**Function:** `register_temporal_decorators(decorator_registry: DecoratorRegistry)`

- **Description**: Registers Temporal decorators if Temporal SDK is available.
- **Parameters**
  - `decorator_registry` (DecoratorRegistry)

### src/mcp_agent/executor/executor.py

**Class: `ExecutorConfig`**
- **Inherits from**: BaseModel
- **Description**: Configuration for executors.
- **Attributes**:
  - `max_concurrent_activities` (int | None) = None
  - `timeout_seconds` (timedelta | None) = None
  - `retry_policy` (Dict[str, Any] | None) = None
  - `model_config` = ConfigDict(extra='allow', arbitrary_types_allowed=True)

**Class: `Executor`**
- **Inherits from**: ABC, ContextDependent
- **Description**: Abstract base class for different execution backends

**Class: `AsyncioExecutor`**
- **Inherits from**: Executor
- **Description**: Default executor using asyncio

**Function:** `Executor.__init__(self, engine: str, config: ExecutorConfig | None = None, signal_bus: SignalHandler = None, context: Optional['Context'] = None)`


**Function:** `Executor.execution_context(self)`

- **Description**: Context manager for execution setup/teardown.
- **Parameters**
  - `self`

**Function:** `Executor.execute(self, task: Callable[..., R] | Coroutine[Any, Any, R]) -> R | BaseException`

- **Description**: Execute a list of tasks and return their results
- **Parameters**
  - `self`
  - `task` (Callable[..., R] | Coroutine[Any, Any, R])
- **Returns**
  - `R | BaseException`: Return value

**Function:** `Executor.execute_many(self, tasks: List[Callable[..., R] | Coroutine[Any, Any, R]]) -> List[R | BaseException]`

- **Description**: Execute a list of tasks and return their results
- **Parameters**
  - `self`
  - `tasks` (List[Callable[..., R] | Coroutine[Any, Any, R]])
- **Returns**
  - `List[R | BaseException]`: Return value

**Function:** `Executor.execute_streaming(self, tasks: List[Callable[..., R] | Coroutine[Any, Any, R]]) -> AsyncIterator[R | BaseException]`

- **Description**: Execute tasks and yield results as they complete
- **Parameters**
  - `self`
  - `tasks` (List[Callable[..., R] | Coroutine[Any, Any, R]])
- **Returns**
  - `AsyncIterator[R | BaseException]`: Return value

**Function:** `Executor.map(self, func: Callable[..., R], inputs: List[Any]) -> List[R | BaseException]`

- **Description**: Run `func(item)` for each item in `inputs` with concurrency limit.
- **Parameters**
  - `self`
  - `func` (Callable[..., R])
  - `inputs` (List[Any])
- **Returns**
  - `List[R | BaseException]`: Return value

**Function:** `Executor.run(item)`


**Function:** `Executor.validate_task(self, task: Callable[..., R] | Coroutine[Any, Any, R]) -> None`

- **Description**: Validate a task before execution.
- **Parameters**
  - `self`
  - `task` (Callable[..., R] | Coroutine[Any, Any, R])
- **Returns**
  - `None`: Return value

**Function:** `Executor.signal(self, signal_name: str, payload: SignalValueT = None, signal_description: str | None = None, workflow_id: str | None = None, run_id: str | None = None) -> None`

- **Description**: Emit a signal. Args: signal_name: The name of the signal to emit payload: Optional data to include with the signal signal_description: Optional human-readable description workflow_id: Optional workflow ID to send the signal workflow_id: Optional run ID of the workflow instance to signal
- **Parameters**
  - `self`
  - `signal_name` (str): The name of the signal to emit
  - `payload` (SignalValueT, optional): Optional data to include with the signal
  - `signal_description` (str | None, optional): Optional human-readable description
  - `workflow_id` (str | None, optional): Optional run ID of the workflow instance to signal
  - `run_id` (str | None, optional): Default is None
- **Returns**
  - `None`: Return value

**Function:** `Executor.wait_for_signal(self, signal_name: str, request_id: str | None = None, workflow_id: str | None = None, run_id: str | None = None, signal_description: str | None = None, timeout_seconds: int | None = None, signal_type: Type[SignalValueT] = str) -> SignalValueT`

- **Description**: Wait until a signal with signal_name is emitted (or timeout). Return the signal's payload when triggered, or raise on timeout.
- **Parameters**
  - `self`
  - `signal_name` (str)
  - `request_id` (str | None, optional): Default is None
  - `workflow_id` (str | None, optional): Default is None
  - `run_id` (str | None, optional): Default is None
  - `signal_description` (str | None, optional): Default is None
  - `timeout_seconds` (int | None, optional): Default is None
  - `signal_type` (Type[SignalValueT], optional): Default is str
- **Returns**
  - `SignalValueT`: Return value

**Function:** `Executor.uuid(self) -> uuid.UUID`

- **Description**: Generate a UUID. Some executors enforce deterministic UUIDs, so this is an opportunity for an executor to provide its own UUID generation. Defaults to uuid4().
- **Parameters**
  - `self`
- **Returns**
  - `uuid.UUID`: Return value

**Function:** `Executor.random(self) -> random.Random`

- **Description**: Get a random number generator. Some executors enforce deterministic random number generation, so this is an opportunity for an executor to provide its own random number generator. Defaults to random.Random().
- **Parameters**
  - `self`
- **Returns**
  - `random.Random`: Return value

**Function:** `AsyncioExecutor.__init__(self, config: ExecutorConfig | None = None, signal_bus: SignalHandler | None = None)`


**Function:** `AsyncioExecutor._execute_task(self, task: Callable[..., R] | Coroutine[Any, Any, R]) -> R | BaseException`


**Function:** `AsyncioExecutor.run_task(task: Callable[..., R] | Coroutine[Any, Any, R]) -> R`


**Function:** `AsyncioExecutor.execute(self, task: Callable[..., R] | Coroutine[Any, Any, R]) -> R | BaseException`

- **Description**: Execute a task and return its results. Args: task: The task to execute *args: Positional arguments to pass to the task **kwargs: Additional arguments to pass to the tasks Returns: A result or exception
- **Parameters**
  - `self`
  - `task` (Callable[..., R] | Coroutine[Any, Any, R]): The task to execute
- **Returns**
  - `R | BaseException`: A result or exception

**Function:** `AsyncioExecutor.execute_many(self, tasks: List[Callable[..., R] | Coroutine[Any, Any, R]]) -> List[R | BaseException]`

- **Description**: Execute a list of tasks and return their results. Args: tasks: The tasks to execute *args: Positional arguments to pass to each task **kwargs: Additional arguments to pass to the tasks Returns: A list of results or exceptions
- **Parameters**
  - `self`
  - `tasks` (List[Callable[..., R] | Coroutine[Any, Any, R]]): The tasks to execute
- **Returns**
  - `List[R | BaseException]`: A list of results or exceptions

**Function:** `AsyncioExecutor.execute_streaming(self, tasks: List[Callable[..., R] | Coroutine[Any, Any, R]]) -> AsyncIterator[R | BaseException]`

- **Description**: Execute tasks and yield results as they complete. Args: tasks: The tasks to execute *args: Positional arguments to pass to each task **kwargs: Additional arguments to pass to the tasks Yields: Results or exceptions as tasks complete
- **Parameters**
  - `self`
  - `tasks` (List[Callable[..., R] | Coroutine[Any, Any, R]]): The tasks to execute
- **Returns**
  - `AsyncIterator[R | BaseException]`: Return value
- **Yields**: Results or exceptions as tasks complete

**Function:** `AsyncioExecutor.signal(self, signal_name: str, payload: SignalValueT = None, signal_description: str | None = None, workflow_id: str | None = None, run_id: str | None = None) -> None`


**Function:** `AsyncioExecutor.wait_for_signal(self, signal_name: str, request_id: str | None = None, workflow_id: str | None = None, run_id: str | None = None, signal_description: str | None = None, timeout_seconds: int | None = None, signal_type: Type[SignalValueT] = str) -> SignalValueT`


### src/mcp_agent/executor/signal_registry.py

**Class: `SignalRegistry`**
- **Description**: Centralized signals management

**Function:** `SignalRegistry.__init__(self)`


**Function:** `SignalRegistry.register(self, name: str, func: Callable, state: Dict[str, Any] | None = None)`


**Function:** `SignalRegistry.get_signal(self, name: str) -> Callable`


**Function:** `SignalRegistry.get_state(self, name: str) -> Dict[str, Any]`


**Function:** `SignalRegistry.list_signals(self) -> List[str]`


**Function:** `SignalRegistry.is_registered(self, name: str) -> bool`

- **Description**: Check if an Signal handler is already registered with the given name.
- **Parameters**
  - `self`
  - `name` (str)
- **Returns**
  - `bool`: Return value

### src/mcp_agent/executor/task_registry.py

**Module Description**: Keep track of all activities/tasks that the executor needs to run. This is used by the workflow engine to dynamically orchestrate a workflow graph. The user just writes standard functions annotated with @workflow_task, but behind the scenes a workflow graph is built.

**Class: `ActivityRegistry`**
- **Description**: Centralized task/activity management with validation and metadata.

**Function:** `ActivityRegistry.__init__(self)`


**Function:** `ActivityRegistry.register(self, name: str, func: Callable, metadata: Dict[str, Any] | None = None)`


**Function:** `ActivityRegistry.get_activity(self, name: str) -> Callable`


**Function:** `ActivityRegistry.get_metadata(self, name: str) -> Dict[str, Any]`


**Function:** `ActivityRegistry.list_activities(self) -> List[str]`


**Function:** `ActivityRegistry.is_registered(self, name: str) -> bool`

- **Description**: Check if an activity is already registered with the given name.
- **Parameters**
  - `self`
  - `name` (str)
- **Returns**
  - `bool`: Return value

### src/mcp_agent/executor/temporal/__init__.py

**Module Description**: Temporal based orchestrator for the MCP Agent. Temporal provides durable execution and robust workflow orchestration, as well as dynamic control flow, making it a good choice for an AI agent orchestrator. Read more: https://docs.temporal.io/develop/python/core-application

**Class: `TemporalExecutorConfig`**
- **Inherits from**: ExecutorConfig, TemporalSettings
- **Description**: Configuration for Temporal executors.
- **Attributes**:
  - `model_config` = ConfigDict(extra='allow', arbitrary_types_allowed=True)

**Class: `TemporalExecutor`**
- **Inherits from**: Executor
- **Description**: Executor that runs @workflows as Temporal workflows, with @workflow_tasks as Temporal activities

**Function:** `TemporalExecutor.__init__(self, config: TemporalExecutorConfig | None = None, signal_bus: SignalHandler | None = None, client: TemporalClient | None = None, context: Optional['Context'] = None)`


**Function:** `TemporalExecutor.wrap_as_activity(activity_name: str, func: Callable[..., R] | Coroutine[Any, Any, R]) -> Coroutine[Any, Any, R]`

- **Description**: Convert a function into a Temporal activity and return its info.
- **Parameters**
  - `activity_name` (str)
  - `func` (Callable[..., R] | Coroutine[Any, Any, R])
- **Returns**
  - `Coroutine[Any, Any, R]`: Return value

**Function:** `TemporalExecutor.wrapped_activity()`


**Function:** `TemporalExecutor._execute_task_as_async(self, task: Callable[..., R] | Coroutine[Any, Any, R]) -> R | BaseException`


**Function:** `TemporalExecutor.run_task(task: Callable[..., R] | Coroutine[Any, Any, R]) -> R`


**Function:** `TemporalExecutor._execute_task(self, task: Callable[..., R] | Coroutine[Any, Any, R]) -> R | BaseException`


**Function:** `TemporalExecutor.execute(self, task: Callable[..., R] | Coroutine[Any, Any, R]) -> R | BaseException`

- **Description**: Execute multiple tasks (activities) in parallel.
- **Parameters**
  - `self`
  - `task` (Callable[..., R] | Coroutine[Any, Any, R])
- **Returns**
  - `R | BaseException`: Return value

**Function:** `TemporalExecutor.execute_many(self, tasks: List[Callable[..., R] | Coroutine[Any, Any, R]]) -> List[R | BaseException]`

- **Description**: Execute multiple tasks (activities) in parallel.
- **Parameters**
  - `self`
  - `tasks` (List[Callable[..., R] | Coroutine[Any, Any, R]])
- **Returns**
  - `List[R | BaseException]`: Return value

**Function:** `TemporalExecutor.execute_streaming(self, tasks: List[Callable[..., R] | Coroutine[Any, Any, R]]) -> AsyncIterator[R | BaseException]`


**Function:** `TemporalExecutor.ensure_client(self)`

- **Description**: Ensure we have a connected Temporal client.
- **Parameters**
  - `self`

**Function:** `TemporalExecutor.start_workflow(self, workflow_id: str) -> WorkflowHandle`

- **Description**: Starts a workflow with the given workflow ID and arguments. Args: workflow_id (str): Identifier of the workflow to be started. *workflow_args: Positional arguments to pass to the workflow. wait_for_result: Whether to wait for the workflow to complete and return the result. **workflow_kwargs: Keyword arguments to pass to the workflow. Returns: If wait_for_result is True, returns the workflow result. Otherwise, returns a WorkflowHandle for the started workflow.
- **Parameters**
  - `self`
  - `workflow_id` (str)
- **Returns**
  - `WorkflowHandle`: If wait_for_result is True, returns the workflow result. Otherwise, returns a WorkflowHandle for the started workflow.

**Function:** `TemporalExecutor.execute_workflow(self, workflow_id: str) -> Any`

- **Description**: Execute a workflow and wait for its result. This is a convenience wrapper around start_workflow with wait_for_result=True.
- **Parameters**
  - `self`
  - `workflow_id` (str)
- **Returns**
  - `Any`: Return value

**Function:** `TemporalExecutor.terminate_workflow(self, workflow_id: str, run_id: str | None = None, reason: str | None = 'Cancellation') -> None`

- **Description**: Terminate a workflow execution. Args: workflow_id (str): Identifier of the workflow to terminate. run_id (Optional[str]): If provided, terminates the specific run. Otherwise terminates the latest run. reason (Optional[str]): A reason for the termination.
- **Parameters**
  - `self`
  - `workflow_id` (str)
  - `run_id` (str | None, optional): Default is None
  - `reason` (str | None, optional): Default is 'Cancellation'
- **Returns**
  - `None`: Return value

**Function:** `TemporalExecutor.uuid(self) -> 'UUID'`

- **Description**: Generate a UUID using Temporal's deterministic UUID generator.
- **Parameters**
  - `self`
- **Returns**
  - `'UUID'`: Return value

**Function:** `TemporalExecutor.random(self) -> 'Random'`

- **Description**: Get an instance of Temporal's deterministic pseudo-random number generator. Note, this random number generator is not cryptographically safe and should not be used for security purposes. Returns: The deterministically-seeded pseudo-random number generator.
- **Parameters**
  - `self`
- **Returns**
  - `'Random'`: The deterministically-seeded pseudo-random number generator.

**Function:** `create_temporal_worker_for_app(app: 'MCPApp')`

- **Description**: Create a Temporal worker for the given app.
- **Parameters**
  - `app` ('MCPApp')

### src/mcp_agent/executor/temporal/workflow_registry.py

**Class: `TemporalWorkflowRegistry`**
- **Inherits from**: WorkflowRegistry
- **Description**: Registry for tracking workflow instances in Temporal.
This implementation queries Temporal for workflow status and manages workflows.

**Function:** `TemporalWorkflowRegistry.__init__(self, executor: 'TemporalExecutor')`


**Function:** `TemporalWorkflowRegistry.register(self, workflow: 'Workflow', run_id: str | None = None, workflow_id: str | None = None, task: Optional['asyncio.Task'] = None) -> None`


**Function:** `TemporalWorkflowRegistry.unregister(self, run_id: str, workflow_id: str | None = None) -> None`


**Function:** `TemporalWorkflowRegistry.get_workflow(self, run_id: str | None = None, workflow_id: str | None = None) -> Optional['Workflow']`

- **Description**: Get a workflow instance by run ID or workflow ID. Either run_id or workflow_id must be provided. If workflow_id is provided without run_id, returns the latest run for that workflow.

**Function:** `TemporalWorkflowRegistry.resume_workflow(self, run_id: str | None = None, workflow_id: str | None = None, signal_name: str | None = 'resume', payload: Any | None = None) -> bool`

- **Description**: Resume a paused workflow. Either run_id or workflow_id must be provided. If workflow_id is provided without run_id, resumes the latest run for that workflow.

**Function:** `TemporalWorkflowRegistry.cancel_workflow(self, run_id: str | None = None, workflow_id: str | None = None) -> bool`

- **Description**: Cancel a running workflow. Either run_id or workflow_id must be provided. If workflow_id is provided without run_id, cancels the latest run for that workflow.

**Function:** `TemporalWorkflowRegistry.get_workflow_status(self, run_id: str | None = None, workflow_id: str | None = None) -> Optional[Dict[str, Any]]`

- **Description**: Get the status of a workflow run. Either run_id or workflow_id must be provided. If workflow_id is provided without run_id, returns status for the latest run for that workflow.


**Function:** `TemporalWorkflowRegistry.list_workflow_statuses(self) -> List[Dict[str, Any]]`


**Function:** `TemporalWorkflowRegistry.list_workflows(self) -> List['Workflow']`

- **Description**: List all registered workflow instances. Returns: A list of workflow instances
- **Parameters**
  - `self`
- **Returns**
  - `List['Workflow']`: A list of workflow instances

**Function:** `TemporalWorkflowRegistry._get_temporal_workflow_status(self, workflow_id: str, run_id: str) -> Dict[str, Any]`

- **Description**: Get the status of a workflow directly from Temporal. Args: workflow_id: The workflow ID run_id: The run ID Returns: A dictionary with workflow status information from Temporal
- **Parameters**
  - `self`
  - `workflow_id` (str): The workflow ID
  - `run_id` (str): The run ID
- **Returns**
  - `Dict[str, Any]`: A dictionary with workflow status information from Temporal

### src/mcp_agent/executor/temporal/workflow_signal.py

**Class: `_Record`**
- **Inherits from**: <ast.Subscript object at 0x10572b2e0>
- **Description**: Record for tracking signal values with versioning for broadcast semantics
- **Attributes**:
  - `value` (Optional[SignalValueT]) = None
  - `version` (int) = 0

**Class: `SignalMailbox`**
- **Inherits from**: <ast.Subscript object at 0x105758e80>
- **Description**: Deterministic broadcast mailbox that stores signal values with versioning.
Each workflow run has its own mailbox instance.

**Class: `TemporalSignalHandler`**
- **Inherits from**: <ast.Subscript object at 0x1056c5520>
- **Description**: Temporal-based signal handling using workflow signals.

This implementation uses a mailbox to store signal values and version counters
to track new signals. It allows for dynamic signal handling and supports
waiting for signals.

**Function:** `SignalMailbox.__init__(self) -> None`


**Function:** `SignalMailbox.push(self, name: str, value: SignalValueT) -> None`

- **Description**: Store a signal value and increment its version counter. This enables broadcast semantics where all waiters see the same value.
- **Parameters**
  - `self`
  - `name` (str)
  - `value` (SignalValueT)
- **Returns**
  - `None`: Return value

**Function:** `SignalMailbox.version(self, name: str) -> int`

- **Description**: Get the current version counter for a signal name
- **Parameters**
  - `self`
  - `name` (str)
- **Returns**
  - `int`: Return value

**Function:** `SignalMailbox.value(self, name: str) -> SignalValueT`

- **Description**: Get the current value for a signal name Returns: The signal value Raises: ValueError: If no value exists for the signal
- **Parameters**
  - `self`
  - `name` (str)
- **Returns**
  - `SignalValueT`: The signal value
- **Raises**: ValueError: If no value exists for the signal

**Function:** `TemporalSignalHandler.__init__(self, executor: Optional['TemporalExecutor'] = None) -> None`


**Function:** `TemporalSignalHandler.attach_to_workflow(self, wf_instance: 'Workflow') -> None`

- **Description**: Attach this signal handler to a workflow instance. Registers a single dynamic signal handler for all signals. Args: wf_instance: The workflow instance to attach to Note: If the workflow already has a dynamic signal handler registered through @workflow.signal(dynamic=True), a Temporal runtime error will occur.
- **Parameters**
  - `self`
  - `wf_instance` ('Workflow'): The workflow instance to attach to
- **Returns**
  - `None`: Return value
- **Note**: If the workflow already has a dynamic signal handler registered through @workflow.signal(dynamic=True), a Temporal runtime error will occur.

**Function:** `TemporalSignalHandler.wait_for_signal(self, signal: Signal[SignalValueT], timeout_seconds: int | None = None, min_version: int | None = None) -> SignalValueT`

- **Description**: Wait for a signal to be received. Args: signal: The signal to wait for timeout_seconds: Optional timeout in seconds min_version: Optional minimum version to wait for (defaults to current version). This is useful for waiting for a new signal even if one with the same name was already received. Returns: The emitted signal payload. Raises: RuntimeError: If called outside a workflow or mailbox not initialized TimeoutError: If timeout is reached ValueError: If no value exists for the signal after waiting
- **Parameters**
  - `self`
  - `signal` (Signal[SignalValueT]): The signal to wait for
  - `timeout_seconds` (int | None, optional): Optional timeout in seconds
  - `min_version` (int | None, optional): Optional minimum version to wait for (defaults to current version). This is useful for waiting for a new signal even if one with the same name was already received.
- **Returns**
  - `SignalValueT`: The emitted signal payload.
- **Raises**: RuntimeError: If called outside a workflow or mailbox not initialized TimeoutError: If timeout is reached ValueError: If no value exists for the signal after waiting

**Function:** `TemporalSignalHandler.on_signal(self, signal_name: str)`

- **Description**: Decorator that registers a callback for a signal. The callback will be invoked when the signal is received. Args: signal_name: The name of the signal to handle
- **Parameters**
  - `self`
  - `signal_name` (str): The name of the signal to handle

**Function:** `TemporalSignalHandler.decorator(user_cb: Callable[[Signal[SignalValueT]], Any])`


**Function:** `TemporalSignalHandler.signal(self, signal: Signal[SignalValueT]) -> None`

- **Description**: Send a signal to a running workflow. Args: signal: The signal to send Raises: ValueError: If validation fails RuntimeError: If executor is missing when called outside a workflow
- **Parameters**
  - `self`
  - `signal` (Signal[SignalValueT]): The signal to send
- **Returns**
  - `None`: Return value
- **Raises**: ValueError: If validation fails RuntimeError: If executor is missing when called outside a workflow

**Function:** `TemporalSignalHandler.validate_signal(self, signal)`


### src/mcp_agent/executor/workflow.py

**Class: `WorkflowState`**
- **Inherits from**: BaseModel
- **Description**: Simple container for persistent workflow state.
This can hold fields that should persist across tasks.
- **Attributes**:
  - `status` (str) = 'initialized'
  - `metadata` (Dict[str, Any]) = Field(default_factory=dict)
  - `updated_at` (float | None) = None
  - `error` (Dict[str, Any] | None) = None
  - `model_config` = ConfigDict(extra='allow', arbitrary_types_allowed=True)

**Class: `WorkflowResult`**
- **Inherits from**: BaseModel, <ast.Subscript object at 0x10574bfd0>
- **Attributes**:
  - `value` (Optional[T]) = None
  - `metadata` (Dict[str, Any]) = Field(default_factory=dict)
  - `start_time` (float | None) = None
  - `end_time` (float | None) = None

**Class: `Workflow`**
- **Inherits from**: ABC, <ast.Subscript object at 0x10572adf0>, ContextDependent
- **Description**: Base class for user-defined workflows.
Handles execution and state management.

Workflows represent user-defined application logic modules that can use Agents and AugmentedLLMs.
Typically, workflows are registered with an MCPApp and can be exposed as MCP tools via app_server.py.

Some key notes:
    - The class MUST be decorated with @app.workflow.
    - Persistent state: Provides a simple `state` object for storing data across tasks.
    - Lifecycle management: Provides run_async, pause, resume, cancel, and get_status methods.

**Function:** `WorkflowState.record_error(self, error: Exception) -> None`


**Function:** `Workflow.__init__(self, name: str | None = None, metadata: Dict[str, Any] | None = None, context: Optional['Context'] = None)`


**Function:** `Workflow.executor(self)`

- **Description**: Get the workflow executor from the context.
- **Parameters**
  - `self`

**Function:** `Workflow.id(self) -> str | None`

- **Description**: Get the workflow ID for this workflow.
- **Parameters**
  - `self`
- **Returns**
  - `str | None`: Return value

**Function:** `Workflow.run_id(self) -> str | None`

- **Description**: Get the workflow run ID if it has been assigned. NOTE: The run() method will assign a new workflow ID on every run.
- **Parameters**
  - `self`
- **Returns**
  - `str | None`: Return value

**Function:** `Workflow.create(cls, name: str | None = None, context: Optional['Context'] = None) -> 'Workflow'`

- **Description**: Factory method to create and initialize a workflow instance. This default implementation creates a workflow instance and calls initialize(). Subclasses can override this method for custom initialization logic. Args: name: Optional name for the workflow (defaults to class name) context: Optional context to use (falls back to global context if not provided) **kwargs: Additional parameters to pass to the workflow constructor Returns: An initialized workflow instance
- **Parameters**
  - `cls`
  - `name` (str | None, optional): Optional name for the workflow (defaults to class name)
  - `context` (Optional['Context'], optional): Optional context to use (falls back to global context if not provided)
- **Returns**
  - `'Workflow'`: An initialized workflow instance

**Function:** `Workflow.run(self) -> 'WorkflowResult[T]'`

- **Description**: Main workflow implementation. Must be overridden by subclasses. This is where the user-defined application logic goes. Typically, this involves: 1. Setting up Agents and attaching LLMs to them 2. Executing operations using the Agents and their LLMs 3. Processing results and returning them Returns: WorkflowResult containing the output of the workflow
- **Parameters**
  - `self`
- **Returns**
  - `'WorkflowResult[T]'`: WorkflowResult containing the output of the workflow
- **This is where the user-defined application logic goes. Typically, this involves**: 1. Setting up Agents and attaching LLMs to them 2. Executing operations using the Agents and their LLMs 3. Processing results and returning them

**Function:** `Workflow._cancel_task(self)`

- **Description**: Wait for a cancel signal and cancel the workflow task.
- **Parameters**
  - `self`

**Function:** `Workflow.run_async(self) -> WorkflowExecution`

- **Description**: Run the workflow asynchronously and return the WorkflowExecution. This creates an async task that will be executed through the executor and returns immediately with a WorkflowExecution with run ID that can be used to check status, resume, or cancel. Args: *args: Positional arguments to pass to the run method **kwargs: Keyword arguments to pass to the run method Returns: str: A unique workflow ID that can be used to reference this workflow instance
- **Parameters**
  - `self`
- **Returns**
  - `WorkflowExecution`: WorkflowExecution: The execution details including run ID and workflow ID

**Function:** `Workflow._execute_workflow()`


**Function:** `Workflow.resume(self, signal_name: str | None = 'resume', payload: str | None = None) -> bool`

- **Description**: Send a resume signal to the workflow. Args: signal_name: The name of the signal to send (default: "resume") payload: Optional data to provide to the workflow upon resuming Returns: bool: True if the resume signal was sent successfully, False otherwise
- **Parameters**
  - `self`
  - `signal_name` (str | None, optional): The name of the signal to send (default: "resume")
  - `payload` (str | None, optional): Optional data to provide to the workflow upon resuming
- **Returns**
  - `bool`: bool: True if the resume signal was sent successfully, False otherwise

**Function:** `Workflow.cancel(self) -> bool`

- **Description**: Cancel the workflow by sending a cancel signal and cancelling its task. Returns: bool: True if the workflow was cancelled successfully, False otherwise
- **Parameters**
  - `self`
- **Returns**
  - `bool`: bool: True if the workflow was cancelled successfully, False otherwise

**Function:** `Workflow._signal_receiver(self, name: str, args: Sequence[RawValue])`

- **Description**: Dynamic signal handler for Temporal workflows.
- **Parameters**
  - `self`
  - `name` (str)
  - `args` (Sequence[RawValue])

**Function:** `Workflow.get_status(self) -> Dict[str, Any]`

- **Description**: Get the current status of the workflow. Returns: Dict[str, Any]: A dictionary with workflow status information
- **Parameters**
  - `self`
- **Returns**
  - `Dict[str, Any]`: Dict[str, Any]: A dictionary with workflow status information

**Function:** `Workflow.update_status(self, status: str) -> None`

- **Description**: Update the workflow status. Args: status: The new status to set
- **Parameters**
  - `self`
  - `status` (str): The new status to set
- **Returns**
  - `None`: Return value

**Function:** `Workflow.update_state(self)`

- **Description**: Syntactic sugar to update workflow state.
- **Parameters**
  - `self`

**Function:** `Workflow.initialize(self)`

- **Description**: Initialization method that will be called before run. Override this to set up any resources needed by the workflow. This checks the _initialized flag to prevent double initialization.
- **Parameters**
  - `self`

**Function:** `Workflow.cleanup(self)`

- **Description**: Cleanup method that will be called after run. Override this to clean up any resources used by the workflow. This checks the _initialized flag to ensure cleanup is only done on initialized workflows.
- **Parameters**
  - `self`

**Function:** `Workflow.__aenter__(self)`

- **Description**: Support for async context manager pattern.
- **Parameters**
  - `self`

**Function:** `Workflow.__aexit__(self, exc_type, exc_val, exc_tb)`

- **Description**: Support for async context manager pattern.
- **Parameters**
  - `self`
  - `exc_type`
  - `exc_val`
  - `exc_tb`

### src/mcp_agent/executor/workflow_registry.py

**Class: `WorkflowRegistry`**
- **Inherits from**: ABC
- **Description**: Abstract base class for registry tracking workflow instances.
Provides a central place to register, look up, and manage workflow instances.

**Class: `InMemoryWorkflowRegistry`**
- **Inherits from**: WorkflowRegistry
- **Description**: Registry for tracking workflow instances in memory for AsyncioExecutor.

**Function:** `WorkflowRegistry.__init__(self)`


**Function:** `WorkflowRegistry.register(self, workflow: 'Workflow', run_id: str | None = None, workflow_id: str | None = None, task: Optional['asyncio.Task'] = None) -> None`

- **Description**: Register a workflow instance (i.e. a workflow run). Args: workflow: The workflow instance run_id: The unique ID for this specific workflow run. If unspecified, it will be retrieved from the workflow instance. workflow_id: The unique ID for the workflow type. If unspecified, it will be retrieved from the workflow instance. task: The asyncio task running the workflow
- **Parameters**
  - `self`
  - `workflow` ('Workflow'): The workflow instance
  - `run_id` (str | None, optional): The unique ID for this specific workflow run. If unspecified, it will be retrieved from the workflow instance.
  - `workflow_id` (str | None, optional): The unique ID for the workflow type. If unspecified, it will be retrieved from the workflow instance.
  - `task` (Optional['asyncio.Task'], optional): The asyncio task running the workflow
- **Returns**
  - `None`: Return value

**Function:** `WorkflowRegistry.unregister(self, run_id: str, workflow_id: str | None = None) -> None`

- **Description**: Remove a workflow instance from the registry. Args: run_id: The unique ID for this specific workflow run. workflow_id: The ID of the workflow.
- **Parameters**
  - `self`
  - `run_id` (str): The unique ID for this specific workflow run.
  - `workflow_id` (str | None, optional): The ID of the workflow.
- **Returns**
  - `None`: Return value

**Function:** `WorkflowRegistry.get_workflow(self, run_id: str | None = None, workflow_id: str | None = None) -> Optional['Workflow']`

- **Description**: Get a workflow instance by run ID or workflow ID. Either run_id or workflow_id must be provided. If workflow_id is provided without run_id, returns the latest run for that workflow.
- **Parameters**
  - `self`
  - `run_id` (str | None, optional): The unique ID for a specific workflow run to retrieve.
  - `workflow_id` (str | None, optional): The ID of the workflow to retrieve.
- **Returns**
  - `Optional['Workflow']`: The workflow instance, or None if not found

**Function:** `WorkflowRegistry.resume_workflow(self, run_id: str | None = None, workflow_id: str | None = None, signal_name: str | None = 'resume', payload: Any | None = None) -> bool`

- **Description**: Resume a paused workflow. Either run_id or workflow_id must be provided. If workflow_id is provided without run_id, resumes the latest run for that workflow.
- **Parameters**
  - `self`
  - `run_id` (str | None, optional): The unique ID for this specific workflow run
  - `workflow_id` (str | None, optional): The ID of the workflow to resume
  - `signal_name` (str | None, optional): Name of the signal to send to the workflow (default is "resume")
  - `payload` (Any | None, optional): Payload to send with the signal
- **Returns**
  - `bool`: True if the resume signal was sent successfully, False otherwise

**Function:** `WorkflowRegistry.cancel_workflow(self, run_id: str | None = None, workflow_id: str | None = None) -> bool`

- **Description**: Cancel (terminate) a running workflow. Either run_id or workflow_id must be provided. If workflow_id is provided without run_id, cancels the latest run for that workflow.
- **Parameters**
  - `self`
  - `run_id` (str | None, optional): The unique ID for this specific workflow run
  - `workflow_id` (str | None, optional): The ID of the workflow to cancel
- **Returns**
  - `bool`: True if the cancel signal was sent successfully, False otherwise

**Function:** `WorkflowRegistry.get_workflow_status(self, run_id: str | None = None, workflow_id: str | None = None) -> Optional[Dict[str, Any]]`

- **Description**: Get the status of a workflow run. Either run_id or workflow_id must be provided. If workflow_id is provided without run_id, returns status for the latest run for that workflow.
- **Parameters**
  - `self`
  - `run_id` (str | None, optional): The unique ID for this specific workflow run
  - `workflow_id` (str | None, optional): The ID of the workflow to get status for
- **Returns**
  - `Optional[Dict[str, Any]]`: The last available workflow status if found, None otherwise

**Function:** `WorkflowRegistry.list_workflow_statuses(self) -> List[Dict[str, Any]]`

- **Description**: List all registered workflow instances with their status. Returns: A list of dictionaries with workflow information
- **Parameters**
  - `self`
- **Returns**
  - `List[Dict[str, Any]]`: A list of dictionaries with workflow information

**Function:** `WorkflowRegistry.list_workflows(self) -> List['Workflow']`

- **Description**: List all registered workflow instances. Returns: A list of workflow instances
- **Parameters**
  - `self`
- **Returns**
  - `List['Workflow']`: A list of workflow instances

**Function:** `InMemoryWorkflowRegistry.__init__(self)`


**Function:** `InMemoryWorkflowRegistry.register(self, workflow: 'Workflow', run_id: str | None = None, workflow_id: str | None = None, task: Optional['asyncio.Task'] = None) -> None`


**Function:** `InMemoryWorkflowRegistry.unregister(self, run_id: str, workflow_id: str | None = None) -> None`


**Function:** `InMemoryWorkflowRegistry.get_workflow(self, run_id: str | None = None, workflow_id: str | None = None) -> Optional['Workflow']`


**Function:** `InMemoryWorkflowRegistry.resume_workflow(self, run_id: str | None = None, workflow_id: str | None = None, signal_name: str | None = 'resume', payload: Any | None = None) -> bool`


**Function:** `InMemoryWorkflowRegistry.cancel_workflow(self, run_id: str | None = None, workflow_id: str | None = None) -> bool`


**Function:** `InMemoryWorkflowRegistry.get_workflow_status(self, run_id: str | None = None, workflow_id: str | None = None) -> Optional[Dict[str, Any]]`


**Function:** `InMemoryWorkflowRegistry.list_workflow_statuses(self) -> List[Dict[str, Any]]`


**Function:** `InMemoryWorkflowRegistry.list_workflows(self) -> List['Workflow']`


### src/mcp_agent/executor/workflow_signal.py

**Class: `Signal`**
- **Inherits from**: BaseModel, <ast.Subscript object at 0x1057011c0>
- **Description**: Represents a signal that can be sent to a workflow.
- **Attributes**:
  - `name` (str): The name of the signal. This is used to identify the signal and route it to the correct handler.
  - `description` (str | None) = 'Workflow Signal': A description of the signal. This can be used to provide additional context about the signal.
  - `payload` (SignalValueT | None) = None: The payload of the signal. This is the data that will be sent with the signal.
  - `metadata` (Dict[str, Any] | None) = None: Additional metadata about the signal. This can be used to provide extra context or information.
  - `workflow_id` (str | None) = None: The ID of the workflow that this signal is associated with. This is used in conjunction with the run_id to identify the specific workflow instance.
  - `run_id` (str | None) = None: The unique ID for this specific workflow run to signal. This is used to identify the specific instance of the workflow that this signal is associated with.
  - `model_config` = ConfigDict(arbitrary_types_allowed=True)

**Class: `SignalRegistration`**
- **Inherits from**: BaseModel
- **Description**: Tracks registration of a signal handler.
- **Attributes**:
  - `signal_name` (str)
  - `unique_name` (str)
  - `workflow_id` (str | None) = None
  - `run_id` (str | None) = None
  - `model_config` = ConfigDict(arbitrary_types_allowed=True)

**Class: `SignalHandler`**
- **Inherits from**: Protocol, <ast.Subscript object at 0x105733a90>
- **Description**: Protocol for handling signals.

**Class: `PendingSignal`**
- **Inherits from**: BaseModel
- **Description**: Tracks a waiting signal handler and its event.
- **Attributes**:
  - `registration` (SignalRegistration)
  - `event` (asyncio.Event | None) = None
  - `value` (SignalValueT | None) = None
  - `model_config` = ConfigDict(arbitrary_types_allowed=True)

**Class: `BaseSignalHandler`**
- **Inherits from**: ABC, <ast.Subscript object at 0x105733e20>
- **Description**: Base class implementing common signal handling functionality.

**Class: `ConsoleSignalHandler`**
- **Inherits from**: <ast.Subscript object at 0x1056be100>
- **Description**: Simple console-based signal handling (blocks on input).

**Class: `AsyncioSignalHandler`**
- **Inherits from**: <ast.Subscript object at 0x10572bd00>
- **Description**: Asyncio-based signal handling using an internal dictionary of asyncio Events.

**Class: `LocalSignalStore`**
- **Description**: Simple in-memory structure that allows coroutines to wait for a signal
and triggers them when a signal is emitted.

**Class: `SignalWaitCallback`**
- **Inherits from**: Protocol
- **Description**: Protocol for callbacks that are triggered when a workflow pauses waiting for a given signal.

**Function:** `SignalHandler.signal(self, signal: Signal[SignalValueT]) -> None`

- **Description**: Emit a signal to all waiting handlers and registered callbacks.
- **Parameters**
  - `self`
  - `signal` (Signal[SignalValueT])
- **Returns**
  - `None`: Return value

**Function:** `SignalHandler.wait_for_signal(self, signal: Signal[SignalValueT], timeout_seconds: int | None = None) -> SignalValueT`

- **Description**: Wait for a signal to be emitted.
- **Parameters**
  - `self`
  - `signal` (Signal[SignalValueT])
  - `timeout_seconds` (int | None, optional): Default is None
- **Returns**
  - `SignalValueT`: Return value

**Function:** `SignalHandler.on_signal(self, signal_name: str) -> Callable`

- **Description**: Decorator to register a handler for a signal. Example: @signal_handler.on_signal("approval_needed") async def handle_approval(value: str): print(f"Got approval signal with value: {value}")
- **Parameters**
  - `self`
  - `signal_name` (str)
- **Returns**
  - `Callable`: Return value
- **Example**: @signal_handler.on_signal("approval_needed")
- **async def handle_approval(value: str)**: print(f"Got approval signal with value: {value}")

**Function:** `BaseSignalHandler.__init__(self)`


**Function:** `BaseSignalHandler.cleanup(self, signal_name: str | None = None)`

- **Description**: Clean up handlers and registrations for a signal or all signals.
- **Parameters**
  - `self`
  - `signal_name` (str | None, optional): Default is None

**Function:** `BaseSignalHandler.validate_signal(self, signal: Signal[SignalValueT])`

- **Description**: Validate signal properties.
- **Parameters**
  - `self`
  - `signal` (Signal[SignalValueT])

**Function:** `BaseSignalHandler.on_signal(self, signal_name: str) -> Callable`

- **Description**: Register a handler for a signal.
- **Parameters**
  - `self`
  - `signal_name` (str)
- **Returns**
  - `Callable`: Return value

**Function:** `BaseSignalHandler.decorator(func: Callable) -> Callable`


**Function:** `BaseSignalHandler.wrapped(value: SignalValueT)`


**Function:** `BaseSignalHandler.signal(self, signal: Signal[SignalValueT]) -> None`

- **Description**: Emit a signal to all waiting handlers and registered callbacks.
- **Parameters**
  - `self`
  - `signal` (Signal[SignalValueT])
- **Returns**
  - `None`: Return value

**Function:** `BaseSignalHandler.wait_for_signal(self, signal: Signal[SignalValueT], timeout_seconds: int | None = None) -> SignalValueT`

- **Description**: Wait for a signal to be emitted.
- **Parameters**
  - `self`
  - `signal` (Signal[SignalValueT])
  - `timeout_seconds` (int | None, optional): Default is None
- **Returns**
  - `SignalValueT`: Return value

**Function:** `ConsoleSignalHandler.__init__(self)`


**Function:** `ConsoleSignalHandler.wait_for_signal(self, signal, timeout_seconds = None)`

- **Description**: Block and wait for console input.
- **Parameters**
  - `self`
  - `signal`
  - `timeout_seconds` (optional): Default is None

**Function:** `ConsoleSignalHandler.on_signal(self, signal_name)`


**Function:** `ConsoleSignalHandler.decorator(func)`


**Function:** `ConsoleSignalHandler.wrapped(value: SignalValueT)`


**Function:** `ConsoleSignalHandler.signal(self, signal)`


**Function:** `AsyncioSignalHandler.wait_for_signal(self, signal, timeout_seconds: int | None = None) -> SignalValueT`


**Function:** `AsyncioSignalHandler.on_signal(self, signal_name)`


**Function:** `AsyncioSignalHandler.decorator(func)`


**Function:** `AsyncioSignalHandler.wrapped(value: SignalValueT)`


**Function:** `AsyncioSignalHandler.signal(self, signal)`


**Function:** `LocalSignalStore.__init__(self)`


**Function:** `LocalSignalStore.emit(self, signal_name: str, payload: Any)`


**Function:** `LocalSignalStore.wait_for(self, signal_name: str, timeout_seconds: int | None = None) -> Any`


**Function:** `SignalWaitCallback.__call__(self, signal_name: str, request_id: str | None = None, workflow_id: str | None = None, run_id: str | None = None, metadata: Dict[str, Any] | None = None) -> None`

- **Description**: Receive a notification that a workflow is pausing on a signal. Args: signal_name: The name of the signal the workflow is pausing on. workflow_id: The ID of the workflow that is pausing (if using a workflow engine). run_id: The ID of the workflow run that is pausing (if using a workflow engine). metadata: Additional metadata about the signal.
- **Parameters**
  - `self`
  - `signal_name` (str): The name of the signal the workflow is pausing on.
  - `request_id` (str | None, optional): Default is None
  - `workflow_id` (str | None, optional): The ID of the workflow that is pausing (if using a workflow engine).
  - `run_id` (str | None, optional): The ID of the workflow run that is pausing (if using a workflow engine).
  - `metadata` (Dict[str, Any] | None, optional): Additional metadata about the signal.
- **Returns**
  - `None`: Return value

### src/mcp_agent/executor/workflow_task.py

**Module Description**: Static decorator registry for @workflow_task. Wherever possible it is preferred to use @app.workflow_task in MCPApp

**Class: `GlobalWorkflowTaskRegistry`**
- **Attributes**:
  - `_instance` = None

**Function:** `GlobalWorkflowTaskRegistry.__new__(cls)`


**Function:** `GlobalWorkflowTaskRegistry.register_task(self, func: Callable, metadata: Dict[str, Any])`


**Function:** `GlobalWorkflowTaskRegistry.get_all_tasks(self) -> List[tuple]`


**Function:** `GlobalWorkflowTaskRegistry.clear(self)`


**Function:** `workflow_task(_fn: Callable[..., R] | None = None) -> Callable[[Callable[..., R]], Callable[..., R]]`

- **Description**: Static decorator to mark a function as a workflow task without requiring direct app access. These tasks will be registered with the MCPApp during app initialization. Args: name: Optional custom name for the activity schedule_to_close_timeout: Maximum time the task can take to complete retry_policy: Retry policy configuration **meta_kwargs: Additional metadata passed to the activity registration Returns: Decorated function that preserves async and typing information
- **Parameters**
  - `_fn` (Callable[..., R] | None, optional): Default is None
- **Returns**
  - `Callable[[Callable[..., R]], Callable[..., R]]`: Decorated function that preserves async and typing information

**Function:** `decorator(target: Callable[..., R]) -> Callable[..., R]`


### src/mcp_agent/human_input/handler.py

**Function:** `console_input_callback(request: HumanInputRequest) -> HumanInputResponse`

- **Description**: Request input from a human user via console using rich panel and prompt.
- **Parameters**
  - `request` (HumanInputRequest)
- **Returns**
  - `HumanInputResponse`: Return value

### src/mcp_agent/human_input/types.py

**Class: `HumanInputRequest`**
- **Inherits from**: BaseModel
- **Description**: Represents a request for human input.
- **Attributes**:
  - `prompt` (str): The prompt to show to the user
  - `description` (str | None) = None: Optional description of what the input is for
  - `request_id` (str | None) = None: Unique identifier for this request
  - `workflow_id` (str | None) = None: Optional workflow ID if using workflow engine
  - `timeout_seconds` (int | None) = None: Optional timeout in seconds
  - `metadata` (dict | None) = None: Additional request payload

**Class: `HumanInputResponse`**
- **Inherits from**: BaseModel
- **Description**: Represents a response to a human input request
- **Attributes**:
  - `request_id` (str): ID of the original request
  - `response` (str): The input provided by the human
  - `metadata` (dict[str, Any] | None) = None: Additional response payload

**Class: `HumanInputCallback`**
- **Inherits from**: Protocol
- **Description**: Protocol for callbacks that handle human input requests.

**Function:** `HumanInputCallback.__call__(self, request: HumanInputRequest) -> AsyncIterator[HumanInputResponse]`

- **Description**: Handle a human input request. Args: request: The input request to handle Returns: AsyncIterator yielding responses as they come in TODO: saqadri - Keep it simple and just return HumanInputResponse?
- **Parameters**
  - `self`
  - `request` (HumanInputRequest): The input request to handle
- **Returns**
  - `AsyncIterator[HumanInputResponse]`: AsyncIterator yielding responses as they come in TODO: saqadri - Keep it simple and just return HumanInputResponse?

### src/mcp_agent/logging/event_progress.py

**Module Description**: Module for converting log events to progress events.

**Class: `ProgressAction`**
- **Inherits from**: str, Enum
- **Description**: Progress actions available in the system.
- **Attributes**:
  - `STARTING` = 'Starting'
  - `LOADED` = 'Loaded'
  - `RUNNING` = 'Running'
  - `INITIALIZED` = 'Initialized'
  - `CHATTING` = 'Chatting'
  - `ROUTING` = 'Routing'
  - `PLANNING` = 'Planning'
  - `READY` = 'Ready'
  - `CALLING_TOOL` = 'Calling Tool'
  - `FINISHED` = 'Finished'
  - `SHUTDOWN` = 'Shutdown'
  - `AGGREGATOR_INITIALIZED` = 'Running'
  - `FATAL_ERROR` = 'Error'

**Class: `ProgressEvent`**
- **Description**: Represents a progress event converted from a log event.
- **Attributes**:
  - `action` (ProgressAction)
  - `target` (str)
  - `details` (Optional[str]) = None
  - `agent_name` (Optional[str]) = None

**Function:** `ProgressEvent.__str__(self) -> str`

- **Description**: Format the progress event for display.
- **Parameters**
  - `self`
- **Returns**
  - `str`: Return value

**Function:** `convert_log_event(event: Event) -> Optional[ProgressEvent]`

- **Description**: Convert a log event to a progress event if applicable.
- **Parameters**
  - `event` (Event)
- **Returns**
  - `Optional[ProgressEvent]`: Return value

### src/mcp_agent/logging/events.py

**Module Description**: Events and event filters for the logger module for the MCP Agent

**Class: `EventContext`**
- **Inherits from**: BaseModel
- **Description**: Stores correlation or cross-cutting data (workflow IDs, user IDs, etc.).
Also used for distributed environments or advanced logging.
- **Attributes**:
  - `session_id` (str | None) = None
  - `workflow_id` (str | None) = None
  - `model_config` = ConfigDict(extra='allow', arbitrary_types_allowed=True)

**Class: `Event`**
- **Inherits from**: BaseModel
- **Description**: Core event structure. Allows both a broad 'type' (EventType)
and a more specific 'name' string for domain-specific labeling (e.g. "ORDER_PLACED").
- **Attributes**:
  - `type` (EventType)
  - `name` (str | None) = None
  - `namespace` (str)
  - `message` (str)
  - `timestamp` (datetime) = Field(default_factory=datetime.now)
  - `data` (Dict[str, Any]) = Field(default_factory=dict)
  - `context` (EventContext | None) = None
  - `span_id` (str | None) = None
  - `trace_id` (str | None) = None
  - `model_config` = ConfigDict(extra='allow', arbitrary_types_allowed=True)

**Class: `EventFilter`**
- **Inherits from**: BaseModel
- **Description**: Filter events by:
  - allowed EventTypes (types)
  - allowed event 'names'
  - allowed namespace prefixes
  - a minimum severity level (DEBUG < INFO < WARNING < ERROR)
- **Attributes**:
  - `types` (Set[EventType] | None) = Field(default_factory=set)
  - `names` (Set[str] | None) = Field(default_factory=set)
  - `namespaces` (Set[str] | None) = Field(default_factory=set)
  - `min_level` (EventType | None) = 'debug'

**Class: `SamplingFilter`**
- **Inherits from**: EventFilter
- **Description**: Random sampling on top of base filter.
Only pass an event if it meets the base filter AND random() < sample_rate.
- **Attributes**:
  - `sample_rate` (float) = 0.1: Fraction of events to pass through

**Function:** `EventFilter.matches(self, event: Event) -> bool`

- **Description**: Check if an event matches this EventFilter criteria.
- **Parameters**
  - `self`
  - `event` (Event)
- **Returns**
  - `bool`: Return value

**Function:** `SamplingFilter.matches(self, event: Event) -> bool`


### src/mcp_agent/logging/json_serializer.py

**Class: `JSONSerializer`**
- **Description**: A robust JSON serializer that handles various Python objects by attempting
different serialization strategies recursively.
- **Attributes**:
  - `MAX_DEPTH` = 99
  - `SENSITIVE_FIELDS` = {'api_key', 'secret', 'password', 'token', 'auth', 'private_key', 'client_secret', 'access_token', 'refresh_token'}

**Function:** `JSONSerializer.__init__(self)`


**Function:** `JSONSerializer._redact_sensitive_value(self, value: str) -> str`

- **Description**: Redact sensitive values to show only first 10 chars.
- **Parameters**
  - `self`
  - `value` (str)
- **Returns**
  - `str`: Return value

**Function:** `JSONSerializer.serialize(self, obj: Any) -> Any`

- **Description**: Main entry point for serialization.
- **Parameters**
  - `self`
  - `obj` (Any)
- **Returns**
  - `Any`: Return value

**Function:** `JSONSerializer._is_sensitive_key(self, key: str) -> bool`

- **Description**: Check if a key likely contains sensitive information.
- **Parameters**
  - `self`
  - `key` (str)
- **Returns**
  - `bool`: Return value

**Function:** `JSONSerializer._serialize_object(self, obj: Any, depth: int = 0) -> Any`

- **Description**: Recursively serialize an object using various strategies.
- **Parameters**
  - `self`
  - `obj` (Any)
  - `depth` (int, optional): Default is 0
- **Returns**
  - `Any`: Return value

**Function:** `JSONSerializer.__call__(self, obj: Any) -> Any`

- **Description**: Make the serializer callable.
- **Parameters**
  - `self`
  - `obj` (Any)
- **Returns**
  - `Any`: Return value

### src/mcp_agent/logging/listeners.py

**Module Description**: Listeners for the logger module of MCP Agent.

**Class: `EventListener`**
- **Inherits from**: ABC
- **Description**: Base async listener that processes events.

**Class: `LifecycleAwareListener`**
- **Inherits from**: EventListener
- **Description**: Optionally override start()/stop() for setup/teardown.
The event bus calls these at bus start/stop time.

**Class: `FilteredListener`**
- **Inherits from**: LifecycleAwareListener
- **Description**: Only processes events that pass the given filter.
Subclasses override _handle_matched_event().

**Class: `LoggingListener`**
- **Inherits from**: FilteredListener
- **Description**: Routes events to Python's logging facility with appropriate severity level.

**Class: `ProgressListener`**
- **Inherits from**: LifecycleAwareListener
- **Description**: Listens for all events pre-filtering and converts them to progress events
for display. By inheriting directly from LifecycleAwareListener instead of
FilteredListener, we get events before any filtering occurs.

**Class: `BatchingListener`**
- **Inherits from**: FilteredListener
- **Description**: Accumulates events in memory, flushes them in batches.
Here we just print the batch size, but you might store or forward them.

**Function:** `EventListener.handle_event(self, event: Event)`

- **Description**: Process an incoming event.
- **Parameters**
  - `self`
  - `event` (Event)

**Function:** `LifecycleAwareListener.start(self)`

- **Description**: Start an event listener, usually when the event bus is set up.
- **Parameters**
  - `self`

**Function:** `LifecycleAwareListener.stop(self)`

- **Description**: Stop an event listener, usually when the event bus is shutting down.
- **Parameters**
  - `self`

**Function:** `FilteredListener.__init__(self, event_filter: EventFilter | None = None)`

- **Description**: Initialize the listener. Args: filter: Event filter to apply to incoming events.
- **Parameters**
  - `self`
  - `event_filter` (EventFilter | None, optional): Default is None

**Function:** `FilteredListener.handle_event(self, event)`


**Function:** `FilteredListener.handle_matched_event(self, event: Event)`

- **Description**: Process an event that matches the filter.
- **Parameters**
  - `self`
  - `event` (Event)

**Function:** `LoggingListener.__init__(self, event_filter: EventFilter | None = None, logger: logging.Logger | None = None)`

- **Description**: Initialize the listener. Args: logger: Logger to use for event processing. Defaults to 'mcp_agent'.
- **Parameters**
  - `self`
  - `event_filter` (EventFilter | None, optional): Default is None
  - `logger` (logging.Logger | None, optional): Logger to use for event processing. Defaults to 'mcp_agent'.

**Function:** `LoggingListener.handle_matched_event(self, event)`


**Function:** `ProgressListener.__init__(self, display = None)`

- **Description**: Initialize the progress listener. Args: display: Optional display handler. If None, the shared progress_display will be used.
- **Parameters**
  - `self`
  - `display` (optional): Optional display handler. If None, the shared progress_display will be used.

**Function:** `ProgressListener.start(self)`

- **Description**: Start the progress display.
- **Parameters**
  - `self`

**Function:** `ProgressListener.stop(self)`

- **Description**: Stop the progress display.
- **Parameters**
  - `self`

**Function:** `ProgressListener.handle_event(self, event: Event)`

- **Description**: Process an incoming event and display progress if relevant.
- **Parameters**
  - `self`
  - `event` (Event)

**Function:** `BatchingListener.__init__(self, event_filter: EventFilter | None = None, batch_size: int = 5, flush_interval: float = 2.0)`

- **Description**: Initialize the listener. Args: batch_size: Number of events to accumulate before flushing. flush_interval: Time in seconds to wait before flushing events.
- **Parameters**
  - `self`
  - `event_filter` (EventFilter | None, optional): Default is None
  - `batch_size` (int, optional): Number of events to accumulate before flushing.
  - `flush_interval` (float, optional): Time in seconds to wait before flushing events.

**Function:** `BatchingListener.start(self, loop = None)`

- **Description**: Spawn a periodic flush loop.
- **Parameters**
  - `self`
  - `loop` (optional): Default is None

**Function:** `BatchingListener.stop(self)`

- **Description**: Stop flush loop and flush any remaining events.
- **Parameters**
  - `self`

**Function:** `BatchingListener._periodic_flush(self)`


**Function:** `BatchingListener.handle_matched_event(self, event)`


**Function:** `BatchingListener.flush(self)`

- **Description**: Flush the current batch of events.
- **Parameters**
  - `self`

**Function:** `BatchingListener._process_batch(self, events: List[Event])`


### src/mcp_agent/logging/logger.py

**Module Description**: Logger module for the MCP Agent, which provides: - Local + optional remote event transport - Async event bus - OpenTelemetry tracing decorators (for distributed tracing) - Automatic injection of trace_id/span_id into events - Developer-friendly Logger that can be used anywhere

**Class: `Logger`**
- **Description**: Developer-friendly logger that sends events to the AsyncEventBus.
- `type` is a broad category (INFO, ERROR, etc.).
- `name` can be a custom domain-specific event name, e.g. "ORDER_PLACED".

**Class: `LoggingConfig`**
- **Description**: Global configuration for the logging system.
- **Attributes**:
  - `_initialized` = False

**Function:** `Logger.__init__(self, namespace: str, session_id: str | None = None)`


**Function:** `Logger._ensure_event_loop(self)`

- **Description**: Ensure we have an event loop we can use.
- **Parameters**
  - `self`

**Function:** `Logger._emit_event(self, event: Event)`

- **Description**: Emit an event by running it in the event loop.
- **Parameters**
  - `self`
  - `event` (Event)

**Function:** `Logger.event(self, etype: EventType, ename: str | None, message: str, context: EventContext | None, data: dict)`

- **Description**: Create and emit an event.
- **Parameters**
  - `self`
  - `etype` (EventType)
  - `ename` (str | None)
  - `message` (str)
  - `context` (EventContext | None)
  - `data` (dict)

**Function:** `Logger.debug(self, message: str, name: str | None = None, context: EventContext = None)`

- **Description**: Log a debug message.
- **Parameters**
  - `self`
  - `message` (str)
  - `name` (str | None, optional): Default is None
  - `context` (EventContext, optional): Default is None

**Function:** `Logger.info(self, message: str, name: str | None = None, context: EventContext = None)`

- **Description**: Log an info message.
- **Parameters**
  - `self`
  - `message` (str)
  - `name` (str | None, optional): Default is None
  - `context` (EventContext, optional): Default is None

**Function:** `Logger.warning(self, message: str, name: str | None = None, context: EventContext = None)`

- **Description**: Log a warning message.
- **Parameters**
  - `self`
  - `message` (str)
  - `name` (str | None, optional): Default is None
  - `context` (EventContext, optional): Default is None

**Function:** `Logger.error(self, message: str, name: str | None = None, context: EventContext = None)`

- **Description**: Log an error message.
- **Parameters**
  - `self`
  - `message` (str)
  - `name` (str | None, optional): Default is None
  - `context` (EventContext, optional): Default is None

**Function:** `Logger.progress(self, message: str, name: str | None = None, percentage: float = None, context: EventContext = None)`

- **Description**: Log a progress message.
- **Parameters**
  - `self`
  - `message` (str)
  - `name` (str | None, optional): Default is None
  - `percentage` (float, optional): Default is None
  - `context` (EventContext, optional): Default is None

**Function:** `event_context(logger: Logger, message: str, event_type: EventType = 'info', name: str | None = None)`

- **Description**: Times a synchronous block, logs an event after completion. Because logger methods are async, we schedule the final log.
- **Parameters**
  - `logger` (Logger)
  - `message` (str)
  - `event_type` (EventType, optional): Default is 'info'
  - `name` (str | None, optional): Default is None

**Function:** `async_event_context(logger: Logger, message: str, event_type: EventType = 'info', name: str | None = None)`

- **Description**: Times an asynchronous block, logs an event after completion. Because logger methods are async, we schedule the final log.
- **Parameters**
  - `logger` (Logger)
  - `message` (str)
  - `event_type` (EventType, optional): Default is 'info'
  - `name` (str | None, optional): Default is None

**Function:** `LoggingConfig.configure(cls, event_filter: EventFilter | None = None, transport: EventTransport | None = None, batch_size: int = 100, flush_interval: float = 2.0)`

- **Description**: Configure the logging system. Args: event_filter: Default filter for all loggers transport: Transport for sending events to external systems batch_size: Default batch size for batching listener flush_interval: Default flush interval for batching listener **kwargs: Additional configuration options
- **Parameters**
  - `cls`
  - `event_filter` (EventFilter | None, optional): Default filter for all loggers
  - `transport` (EventTransport | None, optional): Transport for sending events to external systems
  - `batch_size` (int, optional): Default batch size for batching listener
  - `flush_interval` (float, optional): Default flush interval for batching listener

**Function:** `LoggingConfig.shutdown(cls)`

- **Description**: Shutdown the logging system gracefully.
- **Parameters**
  - `cls`

**Function:** `LoggingConfig.managed(cls)`

- **Description**: Context manager for the logging system lifecycle.
- **Parameters**
  - `cls`

**Function:** `get_logger(namespace: str, session_id: str | None = None) -> Logger`

- **Description**: Get a logger instance for a given namespace. Creates a new logger if one doesn't exist for this namespace. Args: namespace: The namespace for the logger (e.g. "agent.helper", "workflow.demo") session_id: Optional session ID to associate with all events from this logger Returns: A Logger instance for the given namespace
- **Parameters**
  - `namespace` (str): The namespace for the logger (e.g. "agent.helper", "workflow.demo")
  - `session_id` (str | None, optional): Optional session ID to associate with all events from this logger
- **Returns**
  - `Logger`: A Logger instance for the given namespace

### src/mcp_agent/logging/rich_progress.py

**Module Description**: Rich-based progress display for MCP Agent.

**Class: `RichProgressDisplay`**
- **Description**: Rich-based display for progress events.

**Function:** `RichProgressDisplay.__init__(self, console: Optional[Console] = None)`

- **Description**: Initialize the progress display.
- **Parameters**
  - `self`
  - `console` (Optional[Console], optional): Default is None

**Function:** `RichProgressDisplay.start(self)`

- **Description**: start
- **Parameters**
  - `self`

**Function:** `RichProgressDisplay.stop(self)`

- **Description**: stop
- **Parameters**
  - `self`

**Function:** `RichProgressDisplay.pause(self)`

- **Description**: Pause the progress display.
- **Parameters**
  - `self`

**Function:** `RichProgressDisplay.resume(self)`

- **Description**: Resume the progress display.
- **Parameters**
  - `self`

**Function:** `RichProgressDisplay.paused(self)`

- **Description**: Context manager for temporarily pausing the display.
- **Parameters**
  - `self`

**Function:** `RichProgressDisplay._get_action_style(self, action: ProgressAction) -> str`

- **Description**: Map actions to appropriate styles.
- **Parameters**
  - `self`
  - `action` (ProgressAction)
- **Returns**
  - `str`: Return value

**Function:** `RichProgressDisplay.update(self, event: ProgressEvent) -> None`

- **Description**: Update the progress display with a new event.
- **Parameters**
  - `self`
  - `event` (ProgressEvent)
- **Returns**
  - `None`: Return value

### src/mcp_agent/logging/tracing.py

**Module Description**: Telemetry manager that defines distributed tracing decorators for OpenTelemetry traces/spans for the Logger module for MCP Agent

**Class: `TelemetryManager`**
- **Inherits from**: ContextDependent
- **Description**: Simple manager for creating OpenTelemetry spans automatically.
Decorator usage: @telemetry.traced("SomeSpanName")

**Class: `MCPRequestTrace`**
- **Description**: Helper class for trace context propagation in MCP

**Function:** `TelemetryManager.__init__(self, context: Optional['Context'] = None)`


**Function:** `TelemetryManager.traced(self, name: str | None = None, kind: SpanKind = SpanKind.INTERNAL, attributes: Dict[str, Any] = None) -> Callable`

- **Description**: Decorator that automatically creates and manages a span for a function. Works for both async and sync functions.
- **Parameters**
  - `self`
  - `name` (str | None, optional): Default is None
  - `kind` (SpanKind, optional): Default is SpanKind.INTERNAL
  - `attributes` (Dict[str, Any], optional): Default is None
- **Returns**
  - `Callable`: Return value

**Function:** `TelemetryManager.decorator(func)`


**Function:** `TelemetryManager.async_wrapper()`


**Function:** `TelemetryManager.sync_wrapper()`


**Function:** `TelemetryManager._record_args(self, span, args, kwargs)`

- **Description**: Optionally record primitive args as span attributes.
- **Parameters**
  - `self`
  - `span`
  - `args`
  - `kwargs`

**Function:** `MCPRequestTrace.start_span_from_mcp_request(method: str, params: Dict[str, Any]) -> Tuple[trace.Span, OtelContext]`

- **Description**: Extract trace context from incoming MCP request and start a new span
- **Parameters**
  - `method` (str)
  - `params` (Dict[str, Any])
- **Returns**
  - `Tuple[trace.Span, OtelContext]`: Return value

**Function:** `MCPRequestTrace.inject_trace_context(arguments: Dict[str, Any]) -> Dict[str, Any]`

- **Description**: Inject current trace context into outgoing MCP request arguments
- **Parameters**
  - `arguments` (Dict[str, Any])
- **Returns**
  - `Dict[str, Any]`: Return value

### src/mcp_agent/logging/transport.py

**Module Description**: Transports for the Logger module for MCP Agent, including: - Local + optional remote event transport - Async event bus

**Class: `EventTransport`**
- **Inherits from**: Protocol
- **Description**: Pluggable interface for sending events to a remote or external system
(Kafka, RabbitMQ, REST, etc.).

**Class: `FilteredEventTransport`**
- **Inherits from**: EventTransport, ABC
- **Description**: Event transport that filters events based on a filter before sending.

**Class: `NoOpTransport`**
- **Inherits from**: FilteredEventTransport
- **Description**: Default transport that does nothing (purely local).

**Class: `ConsoleTransport`**
- **Inherits from**: FilteredEventTransport
- **Description**: Simple transport that prints events to console.

**Class: `FileTransport`**
- **Inherits from**: FilteredEventTransport
- **Description**: Transport that writes events to a file with proper formatting.

**Class: `HTTPTransport`**
- **Inherits from**: FilteredEventTransport
- **Description**: Sends events to an HTTP endpoint in batches.
Useful for sending to remote logging services like Elasticsearch, etc.

**Class: `AsyncEventBus`**
- **Description**: Async event bus with local in-process listeners + optional remote transport.
Also injects distributed tracing (trace_id, span_id) if there's a current span.
- **Attributes**:
  - `_instance` = None

**Class: `MultiTransport`**
- **Inherits from**: EventTransport
- **Description**: Transport that sends events to multiple configured transports.

**Function:** `EventTransport.send_event(self, event: Event)`

- **Description**: Send an event to the external system. Args: event: Event to send.
- **Parameters**
  - `self`
  - `event` (Event): Event to send.

**Function:** `FilteredEventTransport.__init__(self, event_filter: EventFilter | None = None)`


**Function:** `FilteredEventTransport.send_event(self, event: Event)`


**Function:** `FilteredEventTransport.send_matched_event(self, event: Event)`

- **Description**: Send an event to the external system.
- **Parameters**
  - `self`
  - `event` (Event)

**Function:** `NoOpTransport.send_matched_event(self, event)`

- **Description**: Do nothing.
- **Parameters**
  - `self`
  - `event`

**Function:** `ConsoleTransport.__init__(self, event_filter: EventFilter | None = None)`


**Function:** `ConsoleTransport.send_matched_event(self, event: Event)`


**Function:** `FileTransport.__init__(self, filepath: str | Path, event_filter: EventFilter | None = None, mode: str = 'a', encoding: str = 'utf-8')`

- **Description**: Initialize FileTransport. Args: filepath: Path to the log file. If relative, the current working directory will be used event_filter: Optional filter for events mode: File open mode ('a' for append, 'w' for write) encoding: File encoding to use
- **Parameters**
  - `self`
  - `filepath` (str | Path): Path to the log file. If relative, the current working directory will be used
  - `event_filter` (EventFilter | None, optional): Optional filter for events
  - `mode` (str, optional): File open mode ('a' for append, 'w' for write)
  - `encoding` (str, optional): File encoding to use

**Function:** `FileTransport.send_matched_event(self, event: Event) -> None`

- **Description**: Write matched event to log file asynchronously. Args: event: Event to write to file
- **Parameters**
  - `self`
  - `event` (Event): Event to write to file
- **Returns**
  - `None`: Return value

**Function:** `FileTransport.close(self) -> None`

- **Description**: Clean up resources if needed.
- **Parameters**
  - `self`
- **Returns**
  - `None`: Return value

**Function:** `FileTransport.is_closed(self) -> bool`

- **Description**: Check if transport is closed.
- **Parameters**
  - `self`
- **Returns**
  - `bool`: Return value

**Function:** `HTTPTransport.__init__(self, endpoint: str, headers: Dict[str, str] = None, batch_size: int = 100, timeout: float = 5.0, event_filter: EventFilter | None = None)`


**Function:** `HTTPTransport.start(self)`

- **Description**: Initialize HTTP session.
- **Parameters**
  - `self`

**Function:** `HTTPTransport.stop(self)`

- **Description**: Close HTTP session and flush any remaining events.
- **Parameters**
  - `self`

**Function:** `HTTPTransport.send_matched_event(self, event: Event)`

- **Description**: Add event to batch, flush if batch is full.
- **Parameters**
  - `self`
  - `event` (Event)

**Function:** `HTTPTransport._flush(self)`

- **Description**: Send batch of events to HTTP endpoint.
- **Parameters**
  - `self`

**Function:** `AsyncEventBus.__init__(self, transport: EventTransport | None = None)`


**Function:** `AsyncEventBus.init_queue(self)`


**Function:** `AsyncEventBus.get(cls, transport: EventTransport | None = None) -> 'AsyncEventBus'`

- **Description**: Get the singleton instance of the event bus.
- **Parameters**
  - `cls`
  - `transport` (EventTransport | None, optional): Default is None
- **Returns**
  - `'AsyncEventBus'`: Return value

**Function:** `AsyncEventBus.reset(cls) -> None`

- **Description**: Reset the singleton instance. This is primarily useful for testing scenarios where you need to ensure a clean state between tests.
- **Parameters**
  - `cls`
- **Returns**
  - `None`: Return value

**Function:** `AsyncEventBus.start(self)`

- **Description**: Start the event bus and all lifecycle-aware listeners.
- **Parameters**
  - `self`

**Function:** `AsyncEventBus.stop(self)`

- **Description**: Stop the event bus and all lifecycle-aware listeners.
- **Parameters**
  - `self`

**Function:** `AsyncEventBus.emit(self, event: Event)`

- **Description**: Emit an event to all listeners and transport.
- **Parameters**
  - `self`
  - `event` (Event)

**Function:** `AsyncEventBus.add_listener(self, name: str, listener: EventListener)`

- **Description**: Add a listener to the event bus.
- **Parameters**
  - `self`
  - `name` (str)
  - `listener` (EventListener)

**Function:** `AsyncEventBus.remove_listener(self, name: str)`

- **Description**: Remove a listener from the event bus.
- **Parameters**
  - `self`
  - `name` (str)

**Function:** `AsyncEventBus._process_events(self)`

- **Description**: Process events from the queue until stopped.
- **Parameters**
  - `self`

**Function:** `MultiTransport.__init__(self, transports: List[EventTransport])`

- **Description**: Initialize MultiTransport with a list of transports. Args: transports: List of EventTransport instances to use
- **Parameters**
  - `self`
  - `transports` (List[EventTransport]): List of EventTransport instances to use

**Function:** `MultiTransport.send_event(self, event: Event)`

- **Description**: Send event to all configured transports in parallel. Args: event: Event to send
- **Parameters**
  - `self`
  - `event` (Event): Event to send

**Function:** `MultiTransport.send_with_exception_handling(transport)`


**Function:** `get_log_filename(settings: LoggerSettings, session_id: str | None = None) -> str`

- **Description**: Generate a log filename based on the configuration. Args: settings: Logger settings containing path configuration session_id: Optional session ID to use in the filename Returns: String path for the log file
- **Parameters**
  - `settings` (LoggerSettings): Logger settings containing path configuration
  - `session_id` (str | None, optional): Optional session ID to use in the filename
- **Returns**
  - `str`: String path for the log file

**Function:** `create_transport(settings: LoggerSettings, event_filter: EventFilter | None = None, session_id: str | None = None) -> EventTransport`

- **Description**: Create event transport based on settings.
- **Parameters**
  - `settings` (LoggerSettings)
  - `event_filter` (EventFilter | None, optional): Default is None
  - `session_id` (str | None, optional): Default is None
- **Returns**
  - `EventTransport`: Return value

### src/mcp_agent/mcp/gen_client.py

**Function:** `gen_client(server_name: str, server_registry: ServerRegistry, client_session_factory: Callable[[MemoryObjectReceiveStream, MemoryObjectSendStream, timedelta | None], ClientSession] = MCPAgentClientSession, session_id: str | None = None) -> AsyncGenerator[ClientSession, None]`

- **Description**: Create a client session to the specified server. Handles server startup, initialization, and message receive loop setup. If required, callers can specify their own message receive loop and ClientSession class constructor to customize further. For persistent connections, use connect() or MCPConnectionManager instead.
- **Parameters**
  - `server_name` (str)
  - `server_registry` (ServerRegistry)
  - `client_session_factory` (Callable[[MemoryObjectReceiveStream, MemoryObjectSendStream, timedelta | None], ClientSession], optional): Default is MCPAgentClientSession
  - `session_id` (str | None, optional): Default is None
- **Returns**
  - `AsyncGenerator[ClientSession, None]`: Return value

**Function:** `connect(server_name: str, server_registry: ServerRegistry, client_session_factory: Callable[[MemoryObjectReceiveStream, MemoryObjectSendStream, timedelta | None], ClientSession] = MCPAgentClientSession, session_id: str | None = None) -> ClientSession`

- **Description**: Create a persistent client session to the specified server. Handles server startup, initialization, and message receive loop setup. If required, callers can specify their own message receive loop and ClientSession class constructor to customize further.
- **Parameters**
  - `server_name` (str)
  - `server_registry` (ServerRegistry)
  - `client_session_factory` (Callable[[MemoryObjectReceiveStream, MemoryObjectSendStream, timedelta | None], ClientSession], optional): Default is MCPAgentClientSession
  - `session_id` (str | None, optional): Default is None
- **Returns**
  - `ClientSession`: Return value

**Function:** `disconnect(server_name: str | None, server_registry: ServerRegistry) -> None`

- **Description**: Disconnect from the specified server. If server_name is None, disconnect from all servers.
- **Parameters**
  - `server_name` (str | None)
  - `server_registry` (ServerRegistry)
- **Returns**
  - `None`: Return value

### src/mcp_agent/mcp/mcp_agent_client_session.py

**Module Description**: A derived client session for the MCP Agent framework. It adds logging and supports sampling requests.

**Class: `MCPAgentClientSession`**
- **Inherits from**: ClientSession, ContextDependent
- **Description**: MCP Agent framework acts as a client to the servers providing tools/resources/prompts for the agent workloads.
This is a simple client session for those server connections, and supports
    - handling sampling requests
    - notifications
    - MCP root configuration

Developers can extend this class to add more custom functionality as needed

**Function:** `MCPAgentClientSession.__init__(self, read_stream: MemoryObjectReceiveStream[JSONRPCMessage | Exception], write_stream: MemoryObjectSendStream[JSONRPCMessage], read_timeout_seconds: timedelta | None = None, sampling_callback: SamplingFnT | None = None, list_roots_callback: ListRootsFnT | None = None, logging_callback: LoggingFnT | None = None, message_handler: MessageHandlerFnT | None = None, client_info: Implementation | None = None, context: Optional['Context'] = None)`


**Function:** `MCPAgentClientSession.set_session_id_callback(self, callback: Callable[[], str | None]) -> None`

- **Description**: Set the callback for retrieving the session ID. This is used by transports that support session IDs, like Streamable HTTP. Args: callback: A function that returns the current session ID or None
- **Parameters**
  - `self`
  - `callback` (Callable[[], str | None]): A function that returns the current session ID or None
- **Returns**
  - `None`: Return value

**Function:** `MCPAgentClientSession.get_session_id(self) -> str | None`

- **Description**: Get the current session ID if available for this session's transport. Returns: The session ID if available, None otherwise
- **Parameters**
  - `self`
- **Returns**
  - `str | None`: The session ID if available, None otherwise

**Function:** `MCPAgentClientSession.send_request(self, request: SendRequestT, result_type: type[ReceiveResultT], request_read_timeout_seconds: timedelta | None = None, metadata: MessageMetadata = None, progress_callback: ProgressFnT | None = None) -> ReceiveResultT`


**Function:** `MCPAgentClientSession.send_notification(self, notification: SendNotificationT, related_request_id: RequestId | None = None) -> None`


**Function:** `MCPAgentClientSession._send_response(self, request_id: RequestId, response: SendResultT | ErrorData) -> None`


**Function:** `MCPAgentClientSession._received_notification(self, notification: ReceiveNotificationT) -> None`

- **Description**: Can be overridden by subclasses to handle a notification without needing to listen on the message stream.
- **Parameters**
  - `self`
  - `notification` (ReceiveNotificationT)
- **Returns**
  - `None`: Return value

**Function:** `MCPAgentClientSession.send_progress_notification(self, progress_token: str | int, progress: float, total: float | None = None) -> None`

- **Description**: Sends a progress notification for a request that is currently being processed.
- **Parameters**
  - `self`
  - `progress_token` (str | int)
  - `progress` (float)
  - `total` (float | None, optional): Default is None
- **Returns**
  - `None`: Return value

**Function:** `MCPAgentClientSession._handle_sampling_callback(self, context: RequestContext['ClientSession', Any], params: CreateMessageRequestParams) -> CreateMessageResult | ErrorData`


**Function:** `MCPAgentClientSession._handle_list_roots_callback(self, context: RequestContext['ClientSession', Any]) -> ListRootsResult | ErrorData`


### src/mcp_agent/mcp/mcp_aggregator.py

**Class: `NamespacedTool`**
- **Inherits from**: BaseModel
- **Description**: A tool that is namespaced by server name.
- **Attributes**:
  - `tool` (Tool)
  - `server_name` (str)
  - `namespaced_tool_name` (str)

**Class: `NamespacedPrompt`**
- **Inherits from**: BaseModel
- **Description**: A prompt that is namespaced by server name.
- **Attributes**:
  - `prompt` (Prompt)
  - `server_name` (str)
  - `namespaced_prompt_name` (str)

**Class: `MCPAggregator`**
- **Inherits from**: ContextDependent
- **Description**: Aggregates multiple MCP servers. When a developer calls, e.g. call_tool(...),
the aggregator searches all servers in its list for a server that provides that tool.
- **Attributes**:
  - `initialized` (bool) = False: Whether the aggregator has been initialized with tools and resources from all servers.
  - `connection_persistence` (bool) = False: Whether to maintain a persistent connection to the server.
  - `server_names` (List[str]): A list of server names to connect to.

**Class: `MCPCompoundServer`**
- **Inherits from**: Server
- **Description**: A compound server (server-of-servers) that aggregates multiple MCP servers and is itself an MCP server

**Function:** `MCPAggregator.__aenter__(self)`


**Function:** `MCPAggregator.__aexit__(self, exc_type, exc_val, exc_tb)`


**Function:** `MCPAggregator.__init__(self, server_names: List[str], connection_persistence: bool = True, context: Optional['Context'] = None, name: str = None)`

- **Description**: :param server_names: A list of server names to connect to. :param connection_persistence: Whether to maintain persistent connections to servers (default: True). Note: The server names must be resolvable by the gen_client function, and specified in the server registry.
- **Parameters**
  - `self`
  - `server_names` (List[str])
  - `connection_persistence` (bool, optional): Default is True
  - `context` (Optional['Context'], optional): Default is None
  - `name` (str, optional): Default is None
- **Note**: The server names must be resolvable by the gen_client function, and specified in the server registry.

**Function:** `MCPAggregator.initialize(self, force: bool = False)`

- **Description**: Initialize the application.
- **Parameters**
  - `self`
  - `force` (bool, optional): Default is False

**Function:** `MCPAggregator.close(self)`

- **Description**: Close all persistent connections when the aggregator is deleted.
- **Parameters**
  - `self`

**Function:** `MCPAggregator.create(cls, server_names: List[str], connection_persistence: bool = False) -> 'MCPAggregator'`

- **Description**: Factory method to create and initialize an MCPAggregator. Use this instead of constructor since we need async initialization. If connection_persistence is True, the aggregator will maintain a persistent connection to the servers for as long as this aggregator is around. By default we do not maintain a persistent connection.
- **Parameters**
  - `cls`
  - `server_names` (List[str])
  - `connection_persistence` (bool, optional): Default is False
- **Returns**
  - `'MCPAggregator'`: Return value

**Function:** `MCPAggregator.load_server(self, server_name: str)`

- **Description**: Load tools and prompts from a single server and update the index of namespaced tool/prompt names for that server.
- **Parameters**
  - `self`
  - `server_name` (str)

**Function:** `MCPAggregator.load_servers(self, force: bool = False)`

- **Description**: Discover tools and prompts from each server in parallel and build an index of namespaced tool/prompt names.
- **Parameters**
  - `self`
  - `force` (bool, optional): Default is False

**Function:** `MCPAggregator.get_server(self, server_name: str) -> Optional[ClientSession]`

- **Description**: Get a server connection if available.
- **Parameters**
  - `self`
  - `server_name` (str)
- **Returns**
  - `Optional[ClientSession]`: Return value

**Function:** `MCPAggregator.get_capabilities(self, server_name: str)`

- **Description**: Get server capabilities if available.
- **Parameters**
  - `self`
  - `server_name` (str)

**Function:** `MCPAggregator.refresh(self, server_name: str | None = None)`

- **Description**: Refresh the tools and prompts from the specified server or all servers.
- **Parameters**
  - `self`
  - `server_name` (str | None, optional): Default is None

**Function:** `MCPAggregator.list_servers(self) -> List[str]`

- **Description**: Return the list of server names aggregated by this agent.
- **Parameters**
  - `self`
- **Returns**
  - `List[str]`: Return value

**Function:** `MCPAggregator.list_tools(self, server_name: str | None = None) -> ListToolsResult`

- **Description**: :return: Tools from all servers aggregated, and renamed to be dot-namespaced by server name.
- **Parameters**
  - `self`
  - `server_name` (str | None, optional): Default is None
- **Returns**
  - `ListToolsResult`: Return value

**Function:** `MCPAggregator.call_tool(self, name: str, arguments: dict | None = None, server_name: str | None = None) -> CallToolResult`

- **Description**: Call a namespaced tool, e.g., 'server_name.tool_name'.
- **Parameters**
  - `self`
  - `name` (str)
  - `arguments` (dict | None, optional): Default is None
  - `server_name` (str | None, optional): Default is None
- **Returns**
  - `CallToolResult`: Return value

**Function:** `MCPAggregator.try_call_tool(client: ClientSession)`


**Function:** `MCPAggregator.list_prompts(self, server_name: str | None = None) -> ListPromptsResult`

- **Description**: :return: Prompts from all servers aggregated, and renamed to be dot-namespaced by server name.
- **Parameters**
  - `self`
  - `server_name` (str | None, optional): Default is None
- **Returns**
  - `ListPromptsResult`: Return value

**Function:** `MCPAggregator.get_prompt(self, name: str, arguments: dict[str, str] | None = None, server_name: str | None = None) -> GetPromptResult`

- **Description**: Get a prompt from a server. Args: name: Name of the prompt, optionally namespaced with server name using the format 'server_name-prompt_name' arguments: Optional dictionary of string arguments to pass to the prompt template for prompt template resolution Returns: Fully resolved prompt returned by the server
- **Parameters**
  - `self`
  - `name` (str): Name of the prompt, optionally namespaced with server name using the format 'server_name-prompt_name'
  - `arguments` (dict[str, str] | None, optional): Optional dictionary of string arguments to pass to the prompt template for prompt template resolution
  - `server_name` (str | None, optional): Default is None
- **Returns**
  - `GetPromptResult`: Fully resolved prompt returned by the server

**Function:** `MCPAggregator.try_get_prompt(client: ClientSession)`


**Function:** `MCPAggregator._parse_capability_name(self, name: str, capability: Literal['tool', 'prompt']) -> tuple[str, str]`

- **Description**: Parse a capability name into server name and local capability name. Args: name: The tool or prompt name, possibly namespaced capability: The type of capability, either 'tool' or 'prompt' Returns: Tuple of (server_name, local_name)
- **Parameters**
  - `self`
  - `name` (str): The tool or prompt name, possibly namespaced
  - `capability` (Literal['tool', 'prompt']): The type of capability, either 'tool' or 'prompt'
- **Returns**
  - `tuple[str, str]`: Tuple of (server_name, local_name)

**Function:** `MCPAggregator.getter(item: NamespacedTool)`


**Function:** `MCPAggregator.getter(item: NamespacedPrompt)`


**Function:** `MCPAggregator._start_server(self, server_name: str)`


**Function:** `MCPAggregator._fetch_tools(self, client: ClientSession, server_name: str) -> List[Tool]`


**Function:** `MCPAggregator._fetch_prompts(self, client: ClientSession, server_name: str) -> List[Prompt]`


**Function:** `MCPAggregator._fetch_capabilities(self, server_name: str)`


**Function:** `MCPCompoundServer.__init__(self, server_names: List[str], name: str = 'MCPCompoundServer')`


**Function:** `MCPCompoundServer._list_tools(self) -> List[Tool]`

- **Description**: List all tools aggregated from connected MCP servers.
- **Parameters**
  - `self`
- **Returns**
  - `List[Tool]`: Return value

**Function:** `MCPCompoundServer._call_tool(self, name: str, arguments: dict | None = None) -> CallToolResult`

- **Description**: Call a specific tool from the aggregated servers.
- **Parameters**
  - `self`
  - `name` (str)
  - `arguments` (dict | None, optional): Default is None
- **Returns**
  - `CallToolResult`: Return value

**Function:** `MCPCompoundServer._list_prompts(self) -> List[Prompt]`

- **Description**: List available prompts from the connected MCP servers.
- **Parameters**
  - `self`
- **Returns**
  - `List[Prompt]`: Return value

**Function:** `MCPCompoundServer._get_prompt(self, name: str, arguments: dict[str, str] | None = None) -> GetPromptResult`

- **Description**: Get a prompt from the aggregated servers. Args: name: Name of the prompt to get (optionally namespaced) arguments: Optional dictionary of string arguments for prompt templating
- **Parameters**
  - `self`
  - `name` (str): Name of the prompt to get (optionally namespaced)
  - `arguments` (dict[str, str] | None, optional): Optional dictionary of string arguments for prompt templating
- **Returns**
  - `GetPromptResult`: Return value

**Function:** `MCPCompoundServer.run_stdio_async(self) -> None`

- **Description**: Run the server using stdio transport.
- **Parameters**
  - `self`
- **Returns**
  - `None`: Return value

### src/mcp_agent/mcp/mcp_connection_manager.py

**Module Description**: Manages the lifecycle of multiple MCP server connections.

**Class: `ServerConnection`**
- **Description**: Represents a long-lived MCP server connection, including:
- The ClientSession to the server
- The transport streams (via stdio/sse, etc.)

**Class: `MCPConnectionManager`**
- **Inherits from**: ContextDependent
- **Description**: Manages the lifecycle of multiple MCP server connections.

**Function:** `ServerConnection.__init__(self, server_name: str, server_config: MCPServerSettings, transport_context_factory: Callable[[], AsyncGenerator[tuple[MemoryObjectReceiveStream[JSONRPCMessage | Exception], MemoryObjectSendStream[JSONRPCMessage]], None]], client_session_factory: Callable[[MemoryObjectReceiveStream, MemoryObjectSendStream, timedelta | None], ClientSession], init_hook: Optional['InitHookCallable'] = None)`


**Function:** `ServerConnection.is_healthy(self) -> bool`

- **Description**: Check if the server connection is healthy and ready to use.
- **Parameters**
  - `self`
- **Returns**
  - `bool`: Return value

**Function:** `ServerConnection.reset_error_state(self) -> None`

- **Description**: Reset the error state, a
Download .txt
gitextract_j9tv7udb/

├── .github/
│   ├── release-drafter.yml
│   └── workflows/
│       ├── checks.yml
│       ├── create-tag.yml
│       ├── main-checks.yml
│       ├── pr-checks.yml
│       ├── publish-pypi.yml
│       └── release-drafter.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .prettierignore
├── .python-version
├── .vscode/
│   ├── extensions.json
│   ├── launch.json
│   └── settings.json
├── CONTRIBUTING.md
├── LICENSE
├── LLMS.txt
├── Makefile
├── README.md
├── SECURITY.md
├── docs/
│   ├── README.md
│   ├── advanced/
│   │   ├── composition.mdx
│   │   ├── monitoring.mdx
│   │   └── temporal.mdx
│   ├── cloud/
│   │   ├── authentication/
│   │   │   ├── deployment-auth.mdx
│   │   │   ├── external-mcp-auth.mdx
│   │   │   └── overview.mdx
│   │   ├── deployment-quickstart.mdx
│   │   ├── mcp-agent-cloud/
│   │   │   ├── deploy-mcp-server.mdx
│   │   │   ├── long-running-tools.mdx
│   │   │   ├── manage-secrets.mdx
│   │   │   ├── overview.mdx
│   │   │   └── use-deployed-server.mdx
│   │   ├── observability.mdx
│   │   ├── overview.mdx
│   │   └── use-cases/
│   │       ├── build-chatgpt-apps.mdx
│   │       ├── deploy-agents.mdx
│   │       ├── deploy-chatgpt-apps.mdx
│   │       └── deploy-mcp-servers.mdx
│   ├── concepts/
│   │   ├── agents.mdx
│   │   ├── augmented-llms.mdx
│   │   ├── elicitation.mdx
│   │   ├── execution-engines.mdx
│   │   ├── mcp-primitives.mdx
│   │   ├── mcp-servers.mdx
│   │   └── workflows.mdx
│   ├── configuration.mdx
│   ├── css/
│   │   ├── style.css
│   │   └── version-badge.css
│   ├── docs.json
│   ├── get-started/
│   │   ├── cloud.mdx
│   │   ├── install.mdx
│   │   ├── quickstart.mdx
│   │   └── welcome.mdx
│   ├── mcp/
│   │   └── overview.mdx
│   ├── mcp-agent-sdk/
│   │   ├── advanced/
│   │   │   ├── authentication.mdx
│   │   │   ├── composition.mdx
│   │   │   ├── durable-agents.mdx
│   │   │   ├── logging.mdx
│   │   │   ├── observability.mdx
│   │   │   └── pause-and-resume.mdx
│   │   ├── core-components/
│   │   │   ├── agents.mdx
│   │   │   ├── augmented-llm.mdx
│   │   │   ├── configuring-your-application.mdx
│   │   │   ├── connecting-to-mcp-servers.mdx
│   │   │   ├── execution-engine.mdx
│   │   │   ├── mcp-servers.mdx
│   │   │   ├── mcpapp.mdx
│   │   │   ├── specify-secrets.mdx
│   │   │   └── workflows.mdx
│   │   ├── effective-patterns/
│   │   │   ├── build-your-own.mdx
│   │   │   ├── deep-research.mdx
│   │   │   ├── evaluator-optimizer.mdx
│   │   │   ├── intent-classifier.mdx
│   │   │   ├── map-reduce.mdx
│   │   │   ├── overview.mdx
│   │   │   ├── planner.mdx
│   │   │   ├── router.mdx
│   │   │   └── swarm.mdx
│   │   ├── mcp/
│   │   │   ├── agent-as-mcp-server.mdx
│   │   │   ├── overview.mdx
│   │   │   └── server-authentication.mdx
│   │   └── overview.mdx
│   ├── oauth_support_design.md
│   ├── openai/
│   │   └── deploy.mdx
│   ├── reference/
│   │   ├── cli.mdx
│   │   ├── configuration.mdx
│   │   └── decorators.mdx
│   ├── roadmap.mdx
│   ├── snippets/
│   │   └── version-badge.mdx
│   ├── streaming_guide.md
│   ├── test-evaluate/
│   │   ├── agent-evaluation.mdx
│   │   ├── mcp-eval.mdx
│   │   └── server-evaluation.mdx
│   └── workflows/
│       ├── deep-orchestrator.mdx
│       ├── evaluator-optimizer.mdx
│       ├── intent-classifier.mdx
│       ├── orchestrator.mdx
│       ├── overview.mdx
│       ├── parallel.mdx
│       ├── router.mdx
│       └── swarm.mdx
├── examples/
│   ├── basic/
│   │   ├── agent_factory/
│   │   │   ├── README.md
│   │   │   ├── agents.yaml
│   │   │   ├── auto_loaded_subagents.py
│   │   │   ├── load_and_route.py
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── orchestrator_demo.py
│   │   │   ├── parallel_demo.py
│   │   │   ├── requirements.txt
│   │   │   └── run_worker.py
│   │   ├── functions/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_basic_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_hello_world/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_model_selector/
│   │   │   ├── README.md
│   │   │   ├── interactive.py
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   └── requirements.txt
│   │   ├── mcp_server_aggregator/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   └── requirements.txt
│   │   ├── mcp_tool_filter/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── quickstart.py
│   │   │   └── requirements.txt
│   │   ├── oauth_basic_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── streaming_demo/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   └── token_counter/
│   │       ├── README.md
│   │       ├── main.py
│   │       ├── mcp_agent.config.yaml
│   │       ├── mcp_agent.secrets.yaml.example
│   │       └── requirements.txt
│   ├── cloud/
│   │   ├── README.md
│   │   ├── agent_factory/
│   │   │   ├── README.md
│   │   │   ├── agents.yaml
│   │   │   ├── custom_tasks.py
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── requirements.txt
│   │   │   └── run_worker.py
│   │   ├── chatgpt_apps/
│   │   │   ├── basic_app/
│   │   │   │   ├── README.md
│   │   │   │   ├── main.py
│   │   │   │   ├── mcp_agent.config.yaml
│   │   │   │   ├── requirements.txt
│   │   │   │   └── web/
│   │   │   │       ├── .gitignore
│   │   │   │       ├── README.md
│   │   │   │       ├── package.json
│   │   │   │       ├── public/
│   │   │   │       │   └── index.html
│   │   │   │       ├── src/
│   │   │   │       │   ├── components/
│   │   │   │       │   │   ├── App.css
│   │   │   │       │   │   ├── App.tsx
│   │   │   │       │   │   ├── Coin.css
│   │   │   │       │   │   └── Coin.tsx
│   │   │   │       │   ├── index.css
│   │   │   │       │   ├── index.tsx
│   │   │   │       │   └── utils/
│   │   │   │       │       ├── dev-openai-global.ts
│   │   │   │       │       ├── hooks/
│   │   │   │       │       │   ├── use-openai-global.ts
│   │   │   │       │       │   ├── use-theme.ts
│   │   │   │       │       │   └── use-widget-state.ts
│   │   │   │       │       └── types.ts
│   │   │   │       └── tsconfig.json
│   │   │   └── timer/
│   │   │       ├── README.md
│   │   │       ├── main.py
│   │   │       ├── mcp_agent.config.yaml
│   │   │       ├── requirements.txt
│   │   │       └── web/
│   │   │           ├── .gitignore
│   │   │           ├── README.md
│   │   │           ├── package.json
│   │   │           ├── public/
│   │   │           │   └── index.html
│   │   │           ├── src/
│   │   │           │   ├── components/
│   │   │           │   │   ├── App.css
│   │   │           │   │   ├── App.tsx
│   │   │           │   │   ├── Timer.css
│   │   │           │   │   ├── Timer.tsx
│   │   │           │   │   └── ui/
│   │   │           │   │       ├── button.tsx
│   │   │           │   │       └── card.tsx
│   │   │           │   ├── index.css
│   │   │           │   ├── index.tsx
│   │   │           │   └── utils/
│   │   │           │       ├── dev-openai-global.ts
│   │   │           │       ├── hooks/
│   │   │           │       │   ├── use-openai-global.ts
│   │   │           │       │   ├── use-theme.ts
│   │   │           │       │   └── use-widget-state.ts
│   │   │           │       └── types.ts
│   │   │           └── tsconfig.json
│   │   ├── hello_world/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   └── requirements.txt
│   │   ├── mcp/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── requirements.txt
│   │   │   └── short_story.md
│   │   ├── observability/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   └── temporal/
│   │       ├── README.md
│   │       ├── main.py
│   │       ├── mcp_agent.config.yaml
│   │       ├── mcp_agent.secrets.yaml.example
│   │       ├── requirements.txt
│   │       └── temporal_worker.py
│   ├── crewai/
│   │   ├── README.md
│   │   ├── main.py
│   │   ├── mcp_agent.config.yaml
│   │   ├── mcp_agent.secrets.yaml.example
│   │   └── requirements.txt
│   ├── human_input/
│   │   └── temporal/
│   │       ├── README.md
│   │       ├── client.py
│   │       ├── main.py
│   │       ├── mcp_agent.config.yaml
│   │       ├── mcp_agent.secrets.yaml.example
│   │       ├── requirements.txt
│   │       └── worker.py
│   ├── langchain/
│   │   ├── README.md
│   │   ├── main.py
│   │   ├── mcp_agent.config.yaml
│   │   ├── mcp_agent.secrets.yaml.example
│   │   └── requirements.txt
│   ├── lm_studio/
│   │   ├── README.md
│   │   ├── main.py
│   │   ├── mcp_agent.config.yaml
│   │   └── requirements.txt
│   ├── mcp/
│   │   ├── mcp_elicitation/
│   │   │   ├── README.md
│   │   │   ├── cloud/
│   │   │   │   ├── README.md
│   │   │   │   ├── main.py
│   │   │   │   ├── mcp_agent.config.yaml
│   │   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   │   └── requirements.txt
│   │   │   ├── demo_server.py
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── requirements.txt
│   │   │   └── temporal/
│   │   │       ├── client.py
│   │   │       ├── main.py
│   │   │       ├── mcp_agent.config.yaml
│   │   │       ├── mcp_agent.secrets.yaml.example
│   │   │       ├── requirements.txt
│   │   │       └── worker.py
│   │   ├── mcp_prompts_and_resources/
│   │   │   ├── README.md
│   │   │   ├── demo_server.py
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_roots/
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── requirements.txt
│   │   │   ├── root_test_server.py
│   │   │   └── test_data/
│   │   │       ├── 01_Data_Processed.csv
│   │   │       └── visualizations/
│   │   │           └── key_insights.md
│   │   ├── mcp_sse/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── server.py
│   │   ├── mcp_sse_with_headers/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_streamable_http/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── requirements.txt
│   │   │   └── stateless_server.py
│   │   └── mcp_websockets/
│   │       ├── README.md
│   │       ├── main.py
│   │       ├── mcp_agent.config.yaml
│   │       ├── mcp_agent.secrets.yaml.example
│   │       └── requirements.txt
│   ├── mcp_agent_server/
│   │   ├── README.md
│   │   ├── asyncio/
│   │   │   ├── README.md
│   │   │   ├── client.py
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── nested_elicitation_server.py
│   │   │   ├── nested_sampling_server.py
│   │   │   ├── requirements.txt
│   │   │   └── short_story.md
│   │   ├── context_isolation/
│   │   │   ├── README.md
│   │   │   ├── clients.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── requirements.txt
│   │   │   └── server.py
│   │   └── temporal/
│   │       ├── README.md
│   │       ├── basic_agent_server_worker.py
│   │       ├── client.py
│   │       ├── main.py
│   │       ├── mcp_agent.config.yaml
│   │       ├── mcp_agent.secrets.yaml.example
│   │       ├── nested_elicitation_server.py
│   │       ├── nested_sampling_server.py
│   │       └── requirements.txt
│   ├── model_providers/
│   │   ├── mcp_basic_azure_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   └── mcp_agent.secrets.yaml.example
│   │   ├── mcp_basic_bedrock_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   └── mcp_agent.secrets.yaml.example
│   │   ├── mcp_basic_google_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   └── mcp_basic_ollama_agent/
│   │       ├── README.md
│   │       ├── main.py
│   │       ├── mcp_agent.config.yaml
│   │       ├── mcp_agent.secrets.yaml.example
│   │       └── requirements.txt
│   ├── multithread/
│   │   ├── main.py
│   │   ├── mcp_agent.config.yaml
│   │   ├── mcp_agent.secrets.yaml.example
│   │   ├── requirements.txt
│   │   └── word_count.py
│   ├── oauth/
│   │   ├── README.md
│   │   ├── interactive_tool/
│   │   │   ├── README.md
│   │   │   ├── client.py
│   │   │   └── server.py
│   │   ├── pre_authorize/
│   │   │   ├── README.md
│   │   │   ├── client.py
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── worker.py
│   │   └── protected_by_oauth/
│   │       ├── README.md
│   │       ├── main.py
│   │       └── registration.py
│   ├── temporal/
│   │   ├── README.md
│   │   ├── basic.py
│   │   ├── evaluator_optimizer.py
│   │   ├── graded_report.md
│   │   ├── interactive.py
│   │   ├── main.py
│   │   ├── mcp_agent.config.yaml
│   │   ├── mcp_agent.secrets.yaml.example
│   │   ├── orchestrator.py
│   │   ├── parallel.py
│   │   ├── requirements.txt
│   │   ├── router.py
│   │   ├── run_worker.py
│   │   ├── short_story.md
│   │   └── workflows.py
│   ├── tracing/
│   │   ├── agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── langfuse/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── llm/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── requirements.txt
│   │   │   └── server.py
│   │   └── temporal/
│   │       ├── README.md
│   │       ├── basic.py
│   │       ├── main.py
│   │       ├── mcp_agent.config.yaml
│   │       ├── mcp_agent.secrets.yaml.example
│   │       ├── requirements.txt
│   │       ├── run_worker.py
│   │       └── workflows.py
│   ├── usecases/
│   │   ├── fastapi_websocket/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── requirements.txt
│   │   │   ├── session_manager.py
│   │   │   └── websocket_client_async.py
│   │   ├── marimo_mcp_basic_agent/
│   │   │   ├── README.md
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── notebook.py
│   │   ├── mcp_basic_slack_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_browser_agent/
│   │   │   ├── README.md
│   │   │   ├── browser_agent.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── pyproject.toml
│   │   ├── mcp_financial_analyzer/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── requirements.txt
│   │   │   └── sample_report.md
│   │   ├── mcp_github_to_slack_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_instagram_gift_advisor/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_marketing_assistant_agent/
│   │   │   ├── README.md
│   │   │   ├── company_config.yaml
│   │   │   ├── company_docs/
│   │   │   │   ├── brand_guidelines.md
│   │   │   │   ├── company_overview.md
│   │   │   │   └── team_bio.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   ├── posts/
│   │   │   │   └── linkedin_content_20250725_163333.md
│   │   │   └── pyproject.toml
│   │   ├── mcp_playwright_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── pyproject.toml
│   │   ├── mcp_realtor_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── property_reports/
│   │   │   │   ├── austin_tx_property_report_20250715_120601.md
│   │   │   │   └── san_fransisco_ca_property_report_20250715_175448.md
│   │   │   ├── pyproject.toml
│   │   │   └── rentspider_server.py
│   │   ├── mcp_researcher/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── mcp_supabase_migration_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   ├── reliable_conversation/
│   │   │   ├── CLAUDE.md
│   │   │   ├── LOST_IN_CONVERSATION.md
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── requirements.txt
│   │   │   ├── src/
│   │   │   │   ├── models/
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   └── conversation_models.py
│   │   │   │   ├── tasks/
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   ├── llm_evaluators.py
│   │   │   │   │   ├── quality_control.py
│   │   │   │   │   ├── task_functions.py
│   │   │   │   │   └── task_registry.py
│   │   │   │   ├── utils/
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   ├── config.py
│   │   │   │   │   ├── log_formatter.py
│   │   │   │   │   ├── logging.py
│   │   │   │   │   ├── logging_config.py
│   │   │   │   │   ├── progress_reporter.py
│   │   │   │   │   ├── readable_output.py
│   │   │   │   │   └── test_runner.py
│   │   │   │   └── workflows/
│   │   │   │       ├── __init__.py
│   │   │   │       └── conversation_workflow.py
│   │   │   └── test_basic.py
│   │   ├── streamlit_mcp_basic_agent/
│   │   │   ├── README.md
│   │   │   ├── main.py
│   │   │   ├── mcp_agent.config.yaml
│   │   │   ├── mcp_agent.secrets.yaml.example
│   │   │   └── requirements.txt
│   │   └── streamlit_mcp_rag_agent/
│   │       ├── README.md
│   │       ├── agent_state.py
│   │       ├── main.py
│   │       ├── mcp_agent.config.yaml
│   │       ├── mcp_agent.secrets.yaml.example
│   │       └── requirements.txt
│   └── workflows/
│       ├── workflow_deep_orchestrator/
│       │   ├── README.md
│       │   ├── graded_report.md
│       │   ├── main.py
│       │   ├── mcp_agent.config.yaml
│       │   ├── mcp_agent.secrets.yaml.example
│       │   ├── requirements.txt
│       │   └── short_story.md
│       ├── workflow_evaluator_optimizer/
│       │   ├── README.md
│       │   ├── main.py
│       │   ├── mcp_agent.config.yaml
│       │   ├── mcp_agent.secrets.yaml.example
│       │   └── requirements.txt
│       ├── workflow_intent_classifier/
│       │   ├── README.md
│       │   ├── main.py
│       │   ├── mcp_agent.config.yaml
│       │   ├── mcp_agent.secrets.yaml.example
│       │   └── requirements.txt
│       ├── workflow_orchestrator_worker/
│       │   ├── README.md
│       │   ├── graded_report.md
│       │   ├── main.py
│       │   ├── mcp_agent.config.yaml
│       │   ├── mcp_agent.secrets.yaml.example
│       │   ├── reports/
│       │   │   └── graded_report.md
│       │   ├── requirements.txt
│       │   └── short_story.md
│       ├── workflow_parallel/
│       │   ├── README.md
│       │   ├── main.py
│       │   ├── mcp_agent.config.yaml
│       │   ├── mcp_agent.secrets.yaml.example
│       │   └── requirements.txt
│       ├── workflow_router/
│       │   ├── README.md
│       │   ├── main.py
│       │   ├── mcp_agent.config.yaml
│       │   ├── mcp_agent.secrets.yaml.example
│       │   └── requirements.txt
│       └── workflow_swarm/
│           ├── README.md
│           ├── main.py
│           ├── mcp_agent.config.yaml
│           ├── mcp_agent.secrets.yaml.example
│           ├── policies/
│           │   ├── flight_cancellation_policy.md
│           │   ├── flight_change_policy.md
│           │   └── lost_baggage_policy.md
│           └── requirements.txt
├── gallery.md
├── logs/
│   └── marketing-20251022_200928.jsonl
├── pyproject.toml
├── schema/
│   └── mcp-agent.config.schema.json
├── scripts/
│   ├── event_replay.py
│   ├── event_summary.py
│   ├── event_viewer.py
│   ├── format.py
│   ├── gen_llm_benchmarks.py
│   ├── gen_schema.py
│   ├── lint.py
│   ├── log_trimmer.py
│   ├── promptify.py
│   └── rich_progress_test.py
├── src/
│   └── mcp_agent/
│       ├── __init__.py
│       ├── agents/
│       │   ├── __init__.py
│       │   ├── agent.py
│       │   └── agent_spec.py
│       ├── app.py
│       ├── cli/
│       │   ├── README.md
│       │   ├── __init__.py
│       │   ├── __main__.py
│       │   ├── auth/
│       │   │   ├── __init__.py
│       │   │   ├── constants.py
│       │   │   ├── main.py
│       │   │   └── models.py
│       │   ├── cloud/
│       │   │   ├── __init__.py
│       │   │   ├── commands/
│       │   │   │   ├── __init__.py
│       │   │   │   ├── app/
│       │   │   │   │   ├── __init__.py
│       │   │   │   │   ├── delete/
│       │   │   │   │   │   ├── __init__.py
│       │   │   │   │   │   └── main.py
│       │   │   │   │   ├── status/
│       │   │   │   │   │   ├── __init__.py
│       │   │   │   │   │   └── main.py
│       │   │   │   │   └── workflows/
│       │   │   │   │       ├── __init__.py
│       │   │   │   │       └── main.py
│       │   │   │   ├── apps/
│       │   │   │   │   ├── __init__.py
│       │   │   │   │   ├── list/
│       │   │   │   │   │   ├── __init__.py
│       │   │   │   │   │   └── main.py
│       │   │   │   │   └── update/
│       │   │   │   │       ├── __init__.py
│       │   │   │   │       └── main.py
│       │   │   │   ├── auth/
│       │   │   │   │   ├── __init__.py
│       │   │   │   │   ├── login/
│       │   │   │   │   │   ├── __init__.py
│       │   │   │   │   │   ├── constants.py
│       │   │   │   │   │   └── main.py
│       │   │   │   │   ├── logout/
│       │   │   │   │   │   ├── __init__.py
│       │   │   │   │   │   └── main.py
│       │   │   │   │   └── whoami/
│       │   │   │   │       ├── __init__.py
│       │   │   │   │       └── main.py
│       │   │   │   ├── configure/
│       │   │   │   │   ├── __init__.py
│       │   │   │   │   └── main.py
│       │   │   │   ├── deploy/
│       │   │   │   │   ├── __init__.py
│       │   │   │   │   ├── bundle_utils.py
│       │   │   │   │   ├── constants.py
│       │   │   │   │   ├── main.py
│       │   │   │   │   ├── materialize.py
│       │   │   │   │   ├── settings.py
│       │   │   │   │   ├── validation.py
│       │   │   │   │   └── wrangler_wrapper.py
│       │   │   │   ├── env/
│       │   │   │   │   ├── __init__.py
│       │   │   │   │   └── main.py
│       │   │   │   ├── logger/
│       │   │   │   │   ├── __init__.py
│       │   │   │   │   ├── configure/
│       │   │   │   │   │   ├── __init__.py
│       │   │   │   │   │   └── main.py
│       │   │   │   │   └── tail/
│       │   │   │   │       ├── __init__.py
│       │   │   │   │       └── main.py
│       │   │   │   ├── servers/
│       │   │   │   │   ├── __init__.py
│       │   │   │   │   ├── delete/
│       │   │   │   │   │   ├── __init__.py
│       │   │   │   │   │   └── main.py
│       │   │   │   │   ├── describe/
│       │   │   │   │   │   ├── __init__.py
│       │   │   │   │   │   └── main.py
│       │   │   │   │   └── list/
│       │   │   │   │       ├── __init__.py
│       │   │   │   │       └── main.py
│       │   │   │   ├── utils.py
│       │   │   │   └── workflows/
│       │   │   │       ├── __init__.py
│       │   │   │       ├── cancel/
│       │   │   │       │   ├── __init__.py
│       │   │   │       │   └── main.py
│       │   │   │       ├── describe/
│       │   │   │       │   ├── __init__.py
│       │   │   │       │   └── main.py
│       │   │   │       ├── list/
│       │   │   │       │   ├── __init__.py
│       │   │   │       │   └── main.py
│       │   │   │       ├── resume/
│       │   │   │       │   ├── __init__.py
│       │   │   │       │   └── main.py
│       │   │   │       ├── runs/
│       │   │   │       │   ├── __init__.py
│       │   │   │       │   └── main.py
│       │   │   │       └── utils.py
│       │   │   └── main.py
│       │   ├── commands/
│       │   │   ├── __init__.py
│       │   │   ├── build.py
│       │   │   ├── chat.py
│       │   │   ├── check.py
│       │   │   ├── config.py
│       │   │   ├── configure.py
│       │   │   ├── dev.py
│       │   │   ├── doctor.py
│       │   │   ├── go.py
│       │   │   ├── init.py
│       │   │   ├── install.py
│       │   │   ├── invoke.py
│       │   │   ├── keys.py
│       │   │   ├── logs.py
│       │   │   ├── models.py
│       │   │   ├── serve.py
│       │   │   └── server.py
│       │   ├── config/
│       │   │   ├── __init__.py
│       │   │   └── settings.py
│       │   ├── core/
│       │   │   ├── __init__.py
│       │   │   ├── api_client.py
│       │   │   ├── constants.py
│       │   │   └── utils.py
│       │   ├── exceptions.py
│       │   ├── main.py
│       │   ├── main_bootstrap.py
│       │   ├── mcp_app/
│       │   │   ├── __init__.py
│       │   │   ├── api_client.py
│       │   │   ├── mcp_client.py
│       │   │   └── mock_client.py
│       │   ├── secrets/
│       │   │   ├── __init__.py
│       │   │   ├── api_client.py
│       │   │   ├── mock_client.py
│       │   │   ├── processor.py
│       │   │   ├── resolver.py
│       │   │   └── yaml_tags.py
│       │   ├── utils/
│       │   │   ├── __init__.py
│       │   │   ├── display.py
│       │   │   ├── git_utils.py
│       │   │   ├── importers.py
│       │   │   ├── retry.py
│       │   │   ├── typer_utils.py
│       │   │   ├── url_parser.py
│       │   │   ├── ux.py
│       │   │   └── version_check.py
│       │   └── workflows/
│       │       ├── __init__.py
│       │       └── api_client.py
│       ├── config.py
│       ├── console.py
│       ├── core/
│       │   ├── context.py
│       │   ├── context_dependent.py
│       │   ├── exceptions.py
│       │   └── request_context.py
│       ├── data/
│       │   ├── artificial_analysis_llm_benchmarks.json
│       │   ├── examples/
│       │   │   ├── basic/
│       │   │   │   ├── agent_factory/
│       │   │   │   │   └── agents.yaml
│       │   │   │   ├── mcp_basic_agent/
│       │   │   │   │   ├── mcp_agent.config.yaml
│       │   │   │   │   └── mcp_agent.secrets.yaml.example
│       │   │   │   └── token_counter/
│       │   │   │       ├── mcp_agent.config.yaml
│       │   │   │       └── mcp_agent.secrets.yaml.example
│       │   │   ├── cloud/
│       │   │   │   ├── agent_factory/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── agents.yaml
│       │   │   │   │   ├── custom_tasks.py
│       │   │   │   │   ├── main.py
│       │   │   │   │   ├── mcp_agent.config.yaml
│       │   │   │   │   ├── mcp_agent.secrets.yaml.example
│       │   │   │   │   ├── requirements.txt
│       │   │   │   │   └── run_worker.py
│       │   │   │   ├── chatgpt_app/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── main.py
│       │   │   │   │   ├── mcp_agent.config.yaml
│       │   │   │   │   └── web/
│       │   │   │   │       ├── .gitignore
│       │   │   │   │       ├── README.md
│       │   │   │   │       ├── package.json
│       │   │   │   │       ├── public/
│       │   │   │   │       │   └── index.html
│       │   │   │   │       ├── src/
│       │   │   │   │       │   ├── components/
│       │   │   │   │       │   │   ├── App.css
│       │   │   │   │       │   │   ├── App.tsx
│       │   │   │   │       │   │   ├── Coin.css
│       │   │   │   │       │   │   └── Coin.tsx
│       │   │   │   │       │   ├── index.css
│       │   │   │   │       │   ├── index.tsx
│       │   │   │   │       │   └── utils/
│       │   │   │   │       │       ├── dev-openai-global.ts
│       │   │   │   │       │       ├── hooks/
│       │   │   │   │       │       │   ├── use-openai-global.ts
│       │   │   │   │       │       │   ├── use-theme.ts
│       │   │   │   │       │       │   └── use-widget-state.ts
│       │   │   │   │       │       └── types.ts
│       │   │   │   │       └── tsconfig.json
│       │   │   │   ├── hello_world/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── main.py
│       │   │   │   │   └── mcp_agent.config.yaml
│       │   │   │   ├── mcp/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── main.py
│       │   │   │   │   ├── mcp_agent.config.yaml
│       │   │   │   │   ├── mcp_agent.secrets.yaml.example
│       │   │   │   │   └── short_story.md
│       │   │   │   └── temporal/
│       │   │   │       ├── README.md
│       │   │   │       ├── main.py
│       │   │   │       ├── mcp_agent.config.yaml
│       │   │   │       ├── mcp_agent.secrets.yaml.example
│       │   │   │       └── temporal_worker.py
│       │   │   ├── mcp_agent_server/
│       │   │   │   ├── asyncio/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── client.py
│       │   │   │   │   ├── logs/
│       │   │   │   │   │   └── mcp-agent.jsonl
│       │   │   │   │   ├── main.py
│       │   │   │   │   ├── mcp_agent.config.yaml
│       │   │   │   │   ├── mcp_agent.secrets.yaml.example
│       │   │   │   │   ├── nested_elicitation_server.py
│       │   │   │   │   ├── nested_sampling_server.py
│       │   │   │   │   ├── requirements.txt
│       │   │   │   │   └── short_story.md
│       │   │   │   ├── elicitation/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── client.py
│       │   │   │   │   └── server.py
│       │   │   │   ├── notifications/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── client.py
│       │   │   │   │   └── server.py
│       │   │   │   ├── reference/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── client.py
│       │   │   │   │   └── server.py
│       │   │   │   └── sampling/
│       │   │   │       ├── README.md
│       │   │   │       ├── client.py
│       │   │   │       └── server.py
│       │   │   ├── usecases/
│       │   │   │   ├── mcp_financial_analyzer/
│       │   │   │   │   ├── README.md
│       │   │   │   │   ├── main.py
│       │   │   │   │   ├── mcp_agent.config.yaml
│       │   │   │   │   ├── mcp_agent.secrets.yaml.example
│       │   │   │   │   └── sample_report.md
│       │   │   │   └── mcp_researcher/
│       │   │   │       ├── README.md
│       │   │   │       ├── main.py
│       │   │   │       ├── mcp_agent.config.yaml
│       │   │   │       └── mcp_agent.secrets.yaml.example
│       │   │   └── workflows/
│       │   │       ├── workflow_deep_orchestrator/
│       │   │       │   ├── README.md
│       │   │       │   ├── graded_report.md
│       │   │       │   ├── main.py
│       │   │       │   ├── mcp_agent.config.yaml
│       │   │       │   ├── mcp_agent.secrets.yaml.example
│       │   │       │   └── short_story.md
│       │   │       ├── workflow_evaluator_optimizer/
│       │   │       │   ├── README.md
│       │   │       │   ├── main.py
│       │   │       │   ├── mcp_agent.config.yaml
│       │   │       │   └── mcp_agent.secrets.yaml.example
│       │   │       ├── workflow_intent_classifier/
│       │   │       │   ├── README.md
│       │   │       │   ├── main.py
│       │   │       │   ├── mcp_agent.config.yaml
│       │   │       │   └── mcp_agent.secrets.yaml.example
│       │   │       ├── workflow_orchestrator_worker/
│       │   │       │   ├── README.md
│       │   │       │   ├── graded_report.md
│       │   │       │   ├── main.py
│       │   │       │   ├── mcp_agent.config.yaml
│       │   │       │   ├── mcp_agent.secrets.yaml.example
│       │   │       │   ├── reports/
│       │   │       │   │   └── graded_report.md
│       │   │       │   └── short_story.md
│       │   │       ├── workflow_parallel/
│       │   │       │   ├── README.md
│       │   │       │   ├── main.py
│       │   │       │   ├── mcp_agent.config.yaml
│       │   │       │   └── mcp_agent.secrets.yaml.example
│       │   │       ├── workflow_router/
│       │   │       │   ├── README.md
│       │   │       │   ├── main.py
│       │   │       │   ├── mcp_agent.config.yaml
│       │   │       │   └── mcp_agent.secrets.yaml.example
│       │   │       └── workflow_swarm/
│       │   │           ├── README.md
│       │   │           ├── main.py
│       │   │           ├── mcp_agent.config.yaml
│       │   │           ├── mcp_agent.secrets.yaml.example
│       │   │           └── policies/
│       │   │               ├── flight_cancellation_policy.md
│       │   │               ├── flight_change_policy.md
│       │   │               └── lost_baggage_policy.md
│       │   └── templates/
│       │       ├── README_basic.md
│       │       ├── README_factory.md
│       │       ├── README_server.md
│       │       ├── agent_basic.py
│       │       ├── agent_factory.py
│       │       ├── agent_factory_run_worker.py
│       │       ├── agent_notebook.py
│       │       ├── agent_streamlit.py
│       │       ├── agents.yaml
│       │       ├── basic_agent.py
│       │       ├── basic_agent_server.py
│       │       ├── config_basic.yaml
│       │       ├── config_claude.yaml
│       │       ├── config_server.yaml
│       │       ├── gitignore.template
│       │       ├── mcp_agent.config.yaml
│       │       ├── secrets.yaml
│       │       ├── secrets_basic.yaml
│       │       └── token_counter.py
│       ├── elicitation/
│       │   ├── __init__.py
│       │   ├── handler.py
│       │   └── types.py
│       ├── eval/
│       │   └── __init__.py
│       ├── executor/
│       │   ├── __init__.py
│       │   ├── decorator_registry.py
│       │   ├── errors.py
│       │   ├── executor.py
│       │   ├── signal_registry.py
│       │   ├── task_registry.py
│       │   ├── temporal/
│       │   │   ├── __init__.py
│       │   │   ├── interactive_workflow.py
│       │   │   ├── interceptor.py
│       │   │   ├── session_proxy.py
│       │   │   ├── system_activities.py
│       │   │   ├── temporal_context.py
│       │   │   ├── workflow_registry.py
│       │   │   └── workflow_signal.py
│       │   ├── workflow.py
│       │   ├── workflow_registry.py
│       │   ├── workflow_signal.py
│       │   └── workflow_task.py
│       ├── human_input/
│       │   ├── __init__.py
│       │   ├── console_handler.py
│       │   ├── elicitation_handler.py
│       │   └── types.py
│       ├── logging/
│       │   ├── __init__.py
│       │   ├── event_progress.py
│       │   ├── events.py
│       │   ├── json_serializer.py
│       │   ├── listeners.py
│       │   ├── logger.py
│       │   ├── progress_display.py
│       │   ├── rich_progress.py
│       │   ├── token_progress_display.py
│       │   └── transport.py
│       ├── mcp/
│       │   ├── __init__.py
│       │   ├── client_proxy.py
│       │   ├── gen_client.py
│       │   ├── mcp_agent_client_session.py
│       │   ├── mcp_aggregator.py
│       │   ├── mcp_connection_manager.py
│       │   ├── mcp_server_registry.py
│       │   ├── sampling_handler.py
│       │   └── stdio_transport.py
│       ├── oauth/
│       │   ├── __init__.py
│       │   ├── access_token.py
│       │   ├── callbacks.py
│       │   ├── errors.py
│       │   ├── flow.py
│       │   ├── http/
│       │   │   ├── __init__.py
│       │   │   └── auth.py
│       │   ├── identity.py
│       │   ├── manager.py
│       │   ├── metadata.py
│       │   ├── pkce.py
│       │   ├── records.py
│       │   └── store/
│       │       ├── __init__.py
│       │       ├── base.py
│       │       ├── in_memory.py
│       │       └── redis.py
│       ├── py.typed
│       ├── server/
│       │   ├── app_server.py
│       │   ├── app_server_types.py
│       │   ├── token_verifier.py
│       │   └── tool_adapter.py
│       ├── telemetry/
│       │   ├── __init__.py
│       │   └── usage_tracking.py
│       ├── tools/
│       │   ├── __init__.py
│       │   ├── crewai_tool.py
│       │   └── langchain_tool.py
│       ├── tracing/
│       │   ├── __init__
│       │   ├── file_span_exporter.py
│       │   ├── semconv.py
│       │   ├── telemetry.py
│       │   ├── token_counter.py
│       │   ├── token_tracking_decorator.py
│       │   └── tracer.py
│       ├── utils/
│       │   ├── common.py
│       │   ├── content_utils.py
│       │   ├── mime_utils.py
│       │   ├── prompt_message_multipart.py
│       │   ├── pydantic_type_serializer.py
│       │   ├── resource_utils.py
│       │   └── tool_filter.py
│       └── workflows/
│           ├── __init__.py
│           ├── deep_orchestrator/
│           │   ├── README.md
│           │   ├── __init__.py
│           │   ├── budget.py
│           │   ├── cache.py
│           │   ├── config.py
│           │   ├── context_builder.py
│           │   ├── knowledge.py
│           │   ├── memory.py
│           │   ├── models.py
│           │   ├── orchestrator.py
│           │   ├── plan_verifier.py
│           │   ├── policy.py
│           │   ├── prompts.py
│           │   ├── queue.py
│           │   ├── task_executor.py
│           │   └── utils.py
│           ├── embedding/
│           │   ├── __init__.py
│           │   ├── embedding_base.py
│           │   ├── embedding_cohere.py
│           │   └── embedding_openai.py
│           ├── evaluator_optimizer/
│           │   ├── __init__.py
│           │   └── evaluator_optimizer.py
│           ├── factory.py
│           ├── intent_classifier/
│           │   ├── __init__.py
│           │   ├── intent_classifier_base.py
│           │   ├── intent_classifier_embedding.py
│           │   ├── intent_classifier_embedding_cohere.py
│           │   ├── intent_classifier_embedding_openai.py
│           │   ├── intent_classifier_llm.py
│           │   ├── intent_classifier_llm_anthropic.py
│           │   └── intent_classifier_llm_openai.py
│           ├── llm/
│           │   ├── __init__.py
│           │   ├── augmented_llm.py
│           │   ├── augmented_llm_anthropic.py
│           │   ├── augmented_llm_azure.py
│           │   ├── augmented_llm_bedrock.py
│           │   ├── augmented_llm_google.py
│           │   ├── augmented_llm_lm_studio.py
│           │   ├── augmented_llm_ollama.py
│           │   ├── augmented_llm_openai.py
│           │   ├── llm_selector.py
│           │   ├── multipart_converter_anthropic.py
│           │   ├── multipart_converter_azure.py
│           │   ├── multipart_converter_bedrock.py
│           │   ├── multipart_converter_google.py
│           │   ├── multipart_converter_openai.py
│           │   └── streaming_events.py
│           ├── orchestrator/
│           │   ├── __init__.py
│           │   ├── orchestrator.py
│           │   ├── orchestrator_models.py
│           │   └── orchestrator_prompts.py
│           ├── parallel/
│           │   ├── __init__.py
│           │   ├── fan_in.py
│           │   ├── fan_out.py
│           │   └── parallel_llm.py
│           ├── router/
│           │   ├── __init__.py
│           │   ├── router_base.py
│           │   ├── router_embedding.py
│           │   ├── router_embedding_cohere.py
│           │   ├── router_embedding_openai.py
│           │   ├── router_llm.py
│           │   ├── router_llm_anthropic.py
│           │   └── router_llm_openai.py
│           └── swarm/
│               ├── __init__.py
│               ├── swarm.py
│               ├── swarm_anthropic.py
│               └── swarm_openai.py
└── tests/
    ├── agents/
    │   ├── conftest.py
    │   ├── test_agent.py
    │   ├── test_agent_tasks_concurrency.py
    │   └── test_agent_tasks_isolation.py
    ├── app/
    │   └── test_dotenv_loading.py
    ├── cli/
    │   ├── __init__.py
    │   ├── cloud/
    │   │   ├── test_env_pull_helpers.py
    │   │   └── test_materialize.py
    │   ├── commands/
    │   │   ├── __init__.py
    │   │   ├── test_app_delete.py
    │   │   ├── test_app_status.py
    │   │   ├── test_app_workflows.py
    │   │   ├── test_apps_update.py
    │   │   ├── test_configure.py
    │   │   ├── test_deploy_command.py
    │   │   ├── test_install.py
    │   │   └── test_wrangler_wrapper.py
    │   ├── conftest.py
    │   ├── fixtures/
    │   │   ├── __init__.py
    │   │   ├── api_test_utils.py
    │   │   ├── bedrock_config.yaml
    │   │   ├── docker-compose-test.yml
    │   │   ├── example_config.yaml
    │   │   ├── example_secrets.yaml
    │   │   ├── mock_secrets_client.py
    │   │   ├── multi_provider_config.yaml
    │   │   ├── realistic_mcp_agent.config.yaml
    │   │   ├── realistic_mcp_configs/
    │   │   │   ├── advanced_agent/
    │   │   │   │   └── mcp_agent.config.yaml
    │   │   │   ├── basic_agent/
    │   │   │   │   └── mcp_agent.config.yaml
    │   │   │   └── complex_integrations/
    │   │   │       └── mcp_agent.config.yaml
    │   │   ├── service_integration_config.yaml
    │   │   ├── test_constants.py
    │   │   ├── test_deploy.sh
    │   │   ├── test_secrets.yaml
    │   │   └── test_secrets_deploy.sh
    │   ├── secrets/
    │   │   ├── __init__.py
    │   │   ├── test_api_client.py
    │   │   ├── test_api_client_deploy.py
    │   │   ├── test_api_client_type.py
    │   │   ├── test_resolver.py
    │   │   ├── test_secrets_transform.py
    │   │   ├── test_yaml_tags.py
    │   │   └── test_yaml_tags_unified.py
    │   ├── test_api_key_rename.py
    │   ├── test_deploy_validation.py
    │   └── utils/
    │       ├── __init__.py
    │       └── jwt_generator.py
    ├── config/
    │   └── test_env_settings.py
    ├── core/
    │   ├── test_context.py
    │   └── test_context_isolation.py
    ├── executor/
    │   ├── temporal/
    │   │   ├── test_execution_id_and_interceptor.py
    │   │   ├── test_signal_handler.py
    │   │   ├── test_temporal_executor.py
    │   │   └── test_workflow_registry.py
    │   ├── test_errors.py
    │   ├── test_inmemory_workflow_registry.py
    │   ├── test_temporal_session_proxy.py
    │   ├── test_workflow.py
    │   └── test_workflow_signal.py
    ├── human_input/
    │   ├── test_elicitation_handler.py
    │   └── test_elicitation_session.py
    ├── integration/
    │   └── test_multithread_smoke.py
    ├── logging/
    │   ├── test_request_context_logging.py
    │   ├── test_request_scoping.py
    │   └── test_upstream_logging.py
    ├── mcp/
    │   ├── test_connection_manager_concurrency.py
    │   ├── test_connection_manager_lifecycle.py
    │   ├── test_mcp_aggregator.py
    │   └── test_mcp_connection_manager.py
    ├── server/
    │   ├── test_app_server.py
    │   ├── test_app_server_memo.py
    │   ├── test_app_server_workflow_schema.py
    │   └── test_tool_decorators.py
    ├── test_app.py
    ├── test_app_server_identity.py
    ├── test_app_session.py
    ├── test_audience_validation.py
    ├── test_config_exporters.py
    ├── test_oauth_utils.py
    ├── test_token_manager.py
    ├── test_token_verifier.py
    ├── test_tracing_configure.py
    ├── test_tracing_isolation.py
    ├── test_version_check.py
    ├── tools/
    │   ├── test_crewai_tool.py
    │   └── test_langchain_tool.py
    ├── tracing/
    │   ├── test_token_counter.py
    │   ├── test_token_counter_concurrency.py
    │   └── test_token_integration_convenience.py
    ├── utils/
    │   ├── test_config_env_aliases.py
    │   ├── test_config_preload.py
    │   ├── test_content_utils.py
    │   ├── test_mime_utils.py
    │   ├── test_multipart_converter_anthropic.py
    │   ├── test_multipart_converter_azure.py
    │   ├── test_multipart_converter_bedrock.py
    │   ├── test_multipart_converter_google.py
    │   ├── test_multipart_converter_openai.py
    │   ├── test_prompt_message_multipart.py
    │   ├── test_pydantic_type_serializer.py
    │   └── test_resource_utils.py
    └── workflows/
        ├── deep_orchestrator/
        │   ├── conftest.py
        │   ├── test_deep_orchestrator.py
        │   ├── test_deep_orchestrator_integration.py
        │   └── test_queue.py
        ├── evaluator_optimizer/
        │   └── test_evaluator_optimizer.py
        ├── intent_classifier/
        │   ├── README.md
        │   ├── conftest.py
        │   ├── test_intent_classifier_embedding_cohere.py
        │   ├── test_intent_classifier_embedding_openai.py
        │   ├── test_intent_classifier_llm_anthropic.py
        │   └── test_intent_classifier_llm_openai.py
        ├── llm/
        │   ├── README.md
        │   ├── conftest.py
        │   ├── test_anthropic_streaming.py
        │   ├── test_augmented_llm_anthropic.py
        │   ├── test_augmented_llm_azure.py
        │   ├── test_augmented_llm_bedrock.py
        │   ├── test_augmented_llm_google.py
        │   ├── test_augmented_llm_lm_studio.py
        │   ├── test_augmented_llm_ollama.py
        │   ├── test_augmented_llm_openai.py
        │   ├── test_bedrock_streaming.py
        │   ├── test_request_params_tool_filter.py
        │   └── test_streaming_events.py
        ├── orchestrator/
        │   ├── __init__.py
        │   ├── conftest.py
        │   ├── test_orchestrator.py
        │   ├── test_orchestrator_integration.py
        │   ├── test_orchestrator_models.py
        │   ├── test_orchestrator_overrides.py
        │   ├── test_orchestrator_prompts.py
        │   └── test_orchestrator_token_counting.py
        ├── parallel/
        │   ├── conftest.py
        │   ├── test_fan_in.py
        │   ├── test_fan_out.py
        │   ├── test_parallel_llm.py
        │   └── test_parallel_llm_token_counting.py
        ├── router/
        │   ├── __init__.py
        │   ├── conftest.py
        │   ├── test_router_base.py
        │   ├── test_router_embedding.py
        │   ├── test_router_embedding_cohere.py
        │   ├── test_router_embedding_openai.py
        │   ├── test_router_llm.py
        │   ├── test_router_llm_anthropic.py
        │   ├── test_router_llm_openai.py
        │   └── test_router_token_counting.py
        ├── swarm/
        │   ├── __init__.py
        │   ├── conftest.py
        │   ├── test_swarm.py
        │   ├── test_swarm_anthropic.py
        │   └── test_swarm_openai.py
        ├── test_agentspec_loader.py
        └── test_llm_provider_errors.py
Download .txt
Showing preview only (466K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (4889 symbols across 532 files)

FILE: examples/basic/agent_factory/auto_loaded_subagents.py
  function main (line 7) | async def main():

FILE: examples/basic/agent_factory/load_and_route.py
  function main (line 12) | async def main():

FILE: examples/basic/agent_factory/main.py
  function route_prompt (line 16) | async def route_prompt(
  function main (line 35) | async def main():

FILE: examples/basic/agent_factory/orchestrator_demo.py
  function main (line 14) | async def main():

FILE: examples/basic/agent_factory/parallel_demo.py
  function main (line 11) | async def main():

FILE: examples/basic/agent_factory/run_worker.py
  function main (line 15) | async def main():

FILE: examples/basic/functions/main.py
  function add_numbers (line 12) | def add_numbers(a: int, b: int) -> int:
  function multiply_numbers (line 20) | def multiply_numbers(a: int, b: int) -> int:
  function calculate (line 32) | async def calculate(expr: str, app_ctx: Optional[Context] = None) -> str:
  function example_usage (line 56) | async def example_usage():

FILE: examples/basic/mcp_basic_agent/main.py
  function example_usage (line 51) | async def example_usage() -> str:
  function display_token_summary (line 118) | async def display_token_summary(app_ctx: MCPApp, agent: Agent | None = N...

FILE: examples/basic/mcp_hello_world/main.py
  function example_usage (line 11) | async def example_usage():

FILE: examples/basic/mcp_model_selector/interactive.py
  function get_valid_float_input (line 20) | async def get_valid_float_input(
  function create_preferences_table (line 39) | def create_preferences_table(
  function display_model_result (line 74) | async def display_model_result(model: ModelInfo, preferences: dict, prov...
  function interactive_model_selection (line 115) | async def interactive_model_selection(model_selector: ModelSelector):
  function main (line 288) | def main():

FILE: examples/basic/mcp_model_selector/main.py
  function example_usage (line 15) | async def example_usage() -> str:
  function main (line 229) | async def main():

FILE: examples/basic/mcp_server_aggregator/main.py
  function example_usage_persistent (line 13) | async def example_usage_persistent() -> str:
  function example_usage (line 68) | async def example_usage() -> str:
  function main (line 126) | async def main():

FILE: examples/basic/mcp_tool_filter/main.py
  function example_1_basic_filtering (line 19) | async def example_1_basic_filtering():
  function example_2_excluded_filter (line 59) | async def example_2_excluded_filter():
  function example_3_server_specific (line 108) | async def example_3_server_specific():
  function example_4_dynamic_filtering (line 150) | async def example_4_dynamic_filtering():
  function main (line 190) | def main():

FILE: examples/basic/mcp_tool_filter/quickstart.py
  function main (line 16) | async def main():

FILE: examples/basic/oauth_basic_agent/main.py
  function _load_settings (line 14) | def _load_settings():
  function example_usage (line 56) | async def example_usage() -> str:
  function display_token_summary (line 115) | async def display_token_summary(app_ctx: MCPApp, agent: Agent | None = N...

FILE: examples/basic/streaming_demo/main.py
  function demo_basic_streaming (line 28) | async def demo_basic_streaming(agent: Agent):
  function demo_streaming_with_tools (line 56) | async def demo_streaming_with_tools(agent: Agent):
  function demo_simple_text_stream (line 112) | async def demo_simple_text_stream(agent: Agent):
  function demo_event_monitoring (line 131) | async def demo_event_monitoring(agent: Agent):
  function demo_progress_tracking (line 174) | async def demo_progress_tracking(agent: Agent):
  function main (line 223) | async def main():

FILE: examples/basic/token_counter/main.py
  class TokenMonitor (line 28) | class TokenMonitor:
    method __init__ (line 31) | def __init__(self):
    method on_token_update (line 35) | async def on_token_update(self, node: TokenNode, usage: TokenUsage):
  function display_token_usage (line 64) | def display_token_usage(usage: TokenUsage, label: str = "Token Usage"):
  function display_token_summary (line 72) | async def display_token_summary(context: Context):
  function display_node_tree (line 111) | async def display_node_tree(
  function example_with_token_monitoring (line 153) | async def example_with_token_monitoring():

FILE: examples/cloud/agent_factory/custom_tasks.py
  function knowledge_base_lookup_task (line 47) | async def knowledge_base_lookup_task(request: dict) -> List[str]:
  function _score (line 76) | def _score(query: str, entry: Dict[str, str]) -> int:

FILE: examples/cloud/agent_factory/main.py
  function route_customer_request (line 29) | async def route_customer_request(
  function main (line 70) | async def main():

FILE: examples/cloud/agent_factory/run_worker.py
  function main (line 14) | async def main():

FILE: examples/cloud/chatgpt_apps/basic_app/main.py
  class CoinFlipWidget (line 24) | class CoinFlipWidget:
  function _resource_description (line 96) | def _resource_description() -> str:
  function _embedded_widget_resource (line 100) | def _embedded_widget_resource() -> types.EmbeddedResource:
  function _tool_meta (line 112) | def _tool_meta() -> Dict[str, Any]:
  function flip_coin (line 135) | async def flip_coin() -> Dict[str, str]:
  function get_widget_html (line 147) | def get_widget_html() -> str:
  function main (line 157) | async def main():

FILE: examples/cloud/chatgpt_apps/basic_app/web/src/components/App.tsx
  function App (line 7) | function App() {

FILE: examples/cloud/chatgpt_apps/basic_app/web/src/components/Coin.tsx
  type CoinProps (line 4) | interface CoinProps {
  function Coin (line 9) | function Coin({ flipResult, onFlipResult }: CoinProps) {

FILE: examples/cloud/chatgpt_apps/basic_app/web/src/utils/dev-openai-global.ts
  function setupDevOpenAiGlobal (line 7) | function setupDevOpenAiGlobal(): void {

FILE: examples/cloud/chatgpt_apps/basic_app/web/src/utils/hooks/use-openai-global.ts
  function useOpenAiGlobal (line 8) | function useOpenAiGlobal<K extends keyof OpenAiGlobals>(

FILE: examples/cloud/chatgpt_apps/basic_app/web/src/utils/hooks/use-theme.ts
  function useTheme (line 4) | function useTheme(): Theme {

FILE: examples/cloud/chatgpt_apps/basic_app/web/src/utils/hooks/use-widget-state.ts
  function useWidgetState (line 13) | function useWidgetState<T extends UnknownObject>(

FILE: examples/cloud/chatgpt_apps/basic_app/web/src/utils/types.ts
  type CoinFlipWidgetState (line 1) | type CoinFlipWidgetState = {
  type OpenAiGlobals (line 5) | type OpenAiGlobals<
  type API (line 32) | type API = {
  type UnknownObject (line 41) | type UnknownObject = Record<string, unknown>;
  type Theme (line 43) | type Theme = "light" | "dark";
  type SafeAreaInsets (line 45) | type SafeAreaInsets = {
  type SafeArea (line 52) | type SafeArea = {
  type DeviceType (line 56) | type DeviceType = "mobile" | "tablet" | "desktop" | "unknown";
  type UserAgent (line 58) | type UserAgent = {
  type DisplayMode (line 67) | type DisplayMode = "pip" | "inline" | "fullscreen";
  type RequestDisplayMode (line 68) | type RequestDisplayMode = (args: { mode: DisplayMode }) => Promise<{
  type CallToolResponse (line 76) | type CallToolResponse = {
  type CallTool (line 81) | type CallTool = (
  constant SET_GLOBALS_EVENT_TYPE (line 87) | const SET_GLOBALS_EVENT_TYPE = "openai:set_globals";
  class SetGlobalsEvent (line 88) | class SetGlobalsEvent extends CustomEvent<{
  type Window (line 98) | interface Window {
  type WindowEventMap (line 102) | interface WindowEventMap {

FILE: examples/cloud/chatgpt_apps/timer/main.py
  class TimerWidget (line 24) | class TimerWidget:
  function _resource_description (line 98) | def _resource_description() -> str:
  function _tool_meta (line 102) | def _tool_meta() -> Dict[str, Any]:
  function _embedded_widget_resource (line 117) | def _embedded_widget_resource() -> types.EmbeddedResource:
  function _list_tools (line 130) | async def _list_tools() -> List[types.Tool]:
  function _list_resources (line 173) | async def _list_resources() -> List[types.Resource]:
  function _list_resource_templates (line 187) | async def _list_resource_templates() -> List[types.ResourceTemplate]:
  function _handle_read_resource (line 200) | async def _handle_read_resource(req: types.ReadResourceRequest) -> types...
  function _call_tool_request (line 221) | async def _call_tool_request(req: types.CallToolRequest) -> types.Server...
  function main (line 298) | async def main():

FILE: examples/cloud/chatgpt_apps/timer/web/src/components/App.tsx
  function App (line 8) | function App() {

FILE: examples/cloud/chatgpt_apps/timer/web/src/components/Timer.tsx
  type TimerProps (line 6) | interface TimerProps {
  function Timer (line 14) | function Timer({ initialHours, initialMinutes, initialSeconds, message =...
  function ClockIcon (line 162) | function ClockIcon(props: React.SVGProps<SVGSVGElement>) {

FILE: examples/cloud/chatgpt_apps/timer/web/src/components/ui/button.tsx
  type ButtonProps (line 3) | interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEleme...

FILE: examples/cloud/chatgpt_apps/timer/web/src/utils/dev-openai-global.ts
  function setupDevOpenAiGlobal (line 7) | function setupDevOpenAiGlobal(): void {

FILE: examples/cloud/chatgpt_apps/timer/web/src/utils/hooks/use-openai-global.ts
  function useOpenAiGlobal (line 8) | function useOpenAiGlobal<K extends keyof OpenAiGlobals>(

FILE: examples/cloud/chatgpt_apps/timer/web/src/utils/hooks/use-theme.ts
  function useTheme (line 4) | function useTheme(): Theme {

FILE: examples/cloud/chatgpt_apps/timer/web/src/utils/hooks/use-widget-state.ts
  function useWidgetState (line 13) | function useWidgetState<T extends UnknownObject>(

FILE: examples/cloud/chatgpt_apps/timer/web/src/utils/types.ts
  type TimerWidgetState (line 1) | type TimerWidgetState = {
  type OpenAiGlobals (line 10) | type OpenAiGlobals<
  type API (line 37) | type API = {
  type UnknownObject (line 46) | type UnknownObject = Record<string, unknown>;
  type Theme (line 48) | type Theme = "light" | "dark";
  type SafeAreaInsets (line 50) | type SafeAreaInsets = {
  type SafeArea (line 57) | type SafeArea = {
  type DeviceType (line 61) | type DeviceType = "mobile" | "tablet" | "desktop" | "unknown";
  type UserAgent (line 63) | type UserAgent = {
  type DisplayMode (line 72) | type DisplayMode = "pip" | "inline" | "fullscreen";
  type RequestDisplayMode (line 73) | type RequestDisplayMode = (args: { mode: DisplayMode }) => Promise<{
  type CallToolResponse (line 81) | type CallToolResponse = {
  type CallTool (line 86) | type CallTool = (
  constant SET_GLOBALS_EVENT_TYPE (line 92) | const SET_GLOBALS_EVENT_TYPE = "openai:set_globals";
  class SetGlobalsEvent (line 93) | class SetGlobalsEvent extends CustomEvent<{
  type Window (line 103) | interface Window {
  type WindowEventMap (line 107) | interface WindowEventMap {

FILE: examples/cloud/hello_world/main.py
  function hello_world (line 22) | def hello_world() -> str:
  function hello_world_async (line 28) | async def hello_world_async() -> str:
  function main (line 34) | async def main():

FILE: examples/cloud/mcp/main.py
  class BasicAgentWorkflow (line 59) | class BasicAgentWorkflow(Workflow[str]):
    method run (line 66) | async def run(self, input: str) -> WorkflowResult[str]:
  function grade_story (line 131) | async def grade_story(story: str, app_ctx: Optional[AppContext] = None) ...
  function grade_story_async (line 195) | async def grade_story_async(story: str, app_ctx: Optional[AppContext] = ...
  function sampling_demo (line 270) | async def sampling_demo(
  function book_table (line 304) | async def book_table(date: str, party_size: int, app_ctx: Context) -> str:
  function notify_resources (line 338) | async def notify_resources(
  function notify_progress (line 355) | async def notify_progress(
  function grade_short_story (line 374) | def grade_short_story(story: str) -> list[PromptMessage]:
  function get_example_short_story (line 388) | def get_example_short_story() -> str:
  function main (line 396) | async def main():

FILE: examples/cloud/observability/main.py
  function get_magic_number (line 28) | def get_magic_number(original_number: int = 0) -> int:
  function gather_sources (line 39) | async def gather_sources(query: str) -> list[str]:
  class ResearchWorkflow (line 45) | class ResearchWorkflow(Workflow[None]):
    method run (line 47) | async def run(self, topic: str) -> List[str]:
  function grade_story_async (line 56) | async def grade_story_async(story: str, app_ctx: Optional[AppContext] = ...
  function main (line 124) | async def main():

FILE: examples/cloud/temporal/main.py
  class BasicAgentWorkflow (line 31) | class BasicAgentWorkflow(Workflow[str]):
    method run (line 38) | async def run(
  function finder_tool (line 88) | async def finder_tool(
  class PauseResumeWorkflow (line 133) | class PauseResumeWorkflow(Workflow[str]):
    method run (line 140) | async def run(
  class SamplingWorkflow (line 182) | class SamplingWorkflow(Workflow[str]):
    method run (line 186) | async def run(self, input: str = "space exploration") -> WorkflowResul...
  class ElicitationWorkflow (line 239) | class ElicitationWorkflow(Workflow[str]):
    method run (line 243) | async def run(self, input: str = "proceed") -> WorkflowResult[str]:
  class NotificationsWorkflow (line 273) | class NotificationsWorkflow(Workflow[str]):
    method run (line 277) | async def run(self, input: str = "notifications-demo") -> WorkflowResu...
  function main (line 295) | async def main():

FILE: examples/cloud/temporal/temporal_worker.py
  function main (line 22) | async def main():

FILE: examples/crewai/main.py
  function example_usage (line 17) | async def example_usage():

FILE: examples/human_input/temporal/client.py
  function main (line 27) | async def main():
  function _tool_result_to_json (line 178) | def _tool_result_to_json(tool_result: CallToolResult):

FILE: examples/human_input/temporal/main.py
  function greet (line 31) | async def greet(app_ctx: Context | None = None) -> str:
  function main (line 68) | async def main():

FILE: examples/human_input/temporal/worker.py
  function main (line 22) | async def main():

FILE: examples/langchain/main.py
  function example_usage (line 17) | async def example_usage():

FILE: examples/lm_studio/main.py
  function example_usage (line 28) | async def example_usage():
  function structured_output_example (line 89) | async def structured_output_example():
  function main (line 132) | async def main():

FILE: examples/mcp/mcp_elicitation/cloud/main.py
  function book_table (line 16) | async def book_table(date: str, party_size: int, app_ctx: Context) -> str:

FILE: examples/mcp/mcp_elicitation/demo_server.py
  function book_table (line 13) | async def book_table(date: str, party_size: int, ctx: Context) -> str:
  function main (line 36) | def main():

FILE: examples/mcp/mcp_elicitation/main.py
  function example_usage (line 19) | async def example_usage():

FILE: examples/mcp/mcp_elicitation/temporal/client.py
  function main (line 29) | async def main():
  function _tool_result_to_json (line 261) | def _tool_result_to_json(tool_result: CallToolResult):

FILE: examples/mcp/mcp_elicitation/temporal/main.py
  function book_table (line 20) | async def book_table(date: str, party_size: int, topic: str, app_ctx: Co...
  class TestWorkflow (line 60) | class TestWorkflow(Workflow[str]):
    method run (line 62) | async def run(self, args: Dict[str, Any]) -> WorkflowResult[str]:
  function main (line 105) | async def main():

FILE: examples/mcp/mcp_elicitation/temporal/worker.py
  function main (line 22) | async def main():

FILE: examples/mcp/mcp_prompts_and_resources/demo_server.py
  function get_readme (line 35) | def get_readme():
  function get_users (line 42) | def get_users():
  function get_weather (line 49) | def get_weather(city: str) -> str:
  function echo (line 55) | def echo(message: str) -> str:
  function main (line 63) | def main():

FILE: examples/mcp/mcp_prompts_and_resources/main.py
  function example_usage (line 36) | async def example_usage():

FILE: examples/mcp/mcp_roots/main.py
  function example_usage (line 15) | async def example_usage():

FILE: examples/mcp/mcp_roots/root_test_server.py
  function show_roots (line 7) | async def show_roots(ctx: Context) -> str:

FILE: examples/mcp/mcp_sse/main.py
  function test_sse (line 12) | async def test_sse():

FILE: examples/mcp/mcp_sse/server.py
  function main (line 13) | def main():

FILE: examples/mcp/mcp_sse_with_headers/main.py
  function example_usage (line 14) | async def example_usage():

FILE: examples/mcp/mcp_streamable_http/main.py
  function example_usage (line 13) | async def example_usage():

FILE: examples/mcp/mcp_streamable_http/stateless_server.py
  function main (line 30) | def main(

FILE: examples/mcp/mcp_websockets/main.py
  function example_usage (line 17) | async def example_usage(username: str):

FILE: examples/mcp_agent_server/asyncio/client.py
  function main (line 30) | async def main():
  function _tool_result_to_json (line 429) | def _tool_result_to_json(tool_result: CallToolResult):

FILE: examples/mcp_agent_server/asyncio/main.py
  class BasicAgentWorkflow (line 51) | class BasicAgentWorkflow(Workflow[str]):
    method run (line 58) | async def run(self, input: str) -> WorkflowResult[str]:
  function sampling_demo (line 128) | async def sampling_demo(
  function elicitation_demo (line 173) | async def elicitation_demo(
  function notify_resources (line 212) | async def notify_resources(
  function notify_progress (line 229) | async def notify_progress(
  function grade_story (line 247) | async def grade_story(story: str, app_ctx: Optional[AppContext] = None) ...
  function grade_story_async (line 318) | async def grade_story_async(story: str, app_ctx: Optional[AppContext] = ...
  function get_workflow_token_usage (line 403) | async def get_workflow_token_usage(
  function main (line 498) | async def main():

FILE: examples/mcp_agent_server/asyncio/nested_elicitation_server.py
  class Confirmation (line 8) | class Confirmation(BaseModel):
  function confirm_action (line 13) | async def confirm_action(action: str, ctx: Context | None = None) -> str:
  function main (line 31) | def main():

FILE: examples/mcp_agent_server/asyncio/nested_sampling_server.py
  function get_haiku (line 8) | async def get_haiku(topic: str, ctx: Context | None = None) -> str:
  function main (line 39) | def main():

FILE: examples/mcp_agent_server/context_isolation/clients.py
  function run_client (line 23) | async def run_client(
  function main (line 96) | async def main() -> None:

FILE: examples/mcp_agent_server/context_isolation/server.py
  function emit_log (line 14) | async def emit_log(context: Context, level: str = "info", message: str =...
  function main (line 33) | async def main() -> None:

FILE: examples/mcp_agent_server/temporal/basic_agent_server_worker.py
  function main (line 22) | async def main():

FILE: examples/mcp_agent_server/temporal/client.py
  function main (line 29) | async def main():
  function _tool_result_to_json (line 383) | def _tool_result_to_json(tool_result: CallToolResult):

FILE: examples/mcp_agent_server/temporal/main.py
  class BasicAgentWorkflow (line 46) | class BasicAgentWorkflow(Workflow[str]):
    method run (line 53) | async def run(
  function finder_tool (line 113) | async def finder_tool(
  class PauseResumeWorkflow (line 158) | class PauseResumeWorkflow(Workflow[str]):
    method run (line 165) | async def run(
  function call_nested_sampling (line 207) | async def call_nested_sampling(topic: str) -> str:
  function call_nested_elicitation (line 245) | async def call_nested_elicitation(action: str) -> str:
  class SamplingWorkflow (line 283) | class SamplingWorkflow(Workflow[str]):
    method run (line 287) | async def run(self, input: str = "space exploration") -> WorkflowResul...
  class ElicitationWorkflow (line 350) | class ElicitationWorkflow(Workflow[str]):
    method run (line 354) | async def run(self, input: str = "proceed") -> WorkflowResult[str]:
  class NotificationsWorkflow (line 391) | class NotificationsWorkflow(Workflow[str]):
    method run (line 395) | async def run(self, input: str = "notifications-demo") -> WorkflowResu...
  function main (line 413) | async def main():

FILE: examples/mcp_agent_server/temporal/nested_elicitation_server.py
  class Confirmation (line 8) | class Confirmation(BaseModel):
  function confirm_action (line 13) | async def confirm_action(action: str) -> str:
  function main (line 26) | def main():

FILE: examples/mcp_agent_server/temporal/nested_sampling_server.py
  function get_haiku (line 8) | async def get_haiku(topic: str, ctx: Context | None = None) -> str:
  function main (line 38) | def main():

FILE: examples/model_providers/mcp_basic_azure_agent/main.py
  function example_usage (line 41) | async def example_usage():

FILE: examples/model_providers/mcp_basic_bedrock_agent/main.py
  function example_usage (line 39) | async def example_usage():

FILE: examples/model_providers/mcp_basic_google_agent/main.py
  class Essay (line 18) | class Essay(BaseModel):
  function example_usage (line 48) | async def example_usage():

FILE: examples/model_providers/mcp_basic_ollama_agent/main.py
  function example_usage (line 12) | async def example_usage():

FILE: examples/multithread/main.py
  function run (line 19) | async def run() -> str:
  function generate_step (line 67) | def generate_step():
  function main (line 82) | def main(concurrency: int) -> list[str]:

FILE: examples/multithread/word_count.py
  function get_script_word_count (line 8) | def get_script_word_count(script: str) -> int:

FILE: examples/oauth/interactive_tool/client.py
  class LoggingClientSession (line 27) | class LoggingClientSession(MCPAgentClientSession):
    method _received_notification (line 28) | async def _received_notification(self, notification):  # type: ignore[...
  function make_session (line 39) | def make_session(
  function main (line 59) | async def main() -> None:

FILE: examples/oauth/interactive_tool/server.py
  function github_org_search (line 107) | async def github_org_search(query: str, app_ctx: Optional[AppContext] = ...
  function main (line 155) | async def main() -> None:

FILE: examples/oauth/pre_authorize/client.py
  function main (line 50) | async def main():
  function _tool_result_to_json (line 191) | def _tool_result_to_json(tool_result: CallToolResult):

FILE: examples/oauth/pre_authorize/main.py
  function _load_settings (line 23) | def _load_settings():
  function github_org_search_activity (line 73) | async def github_org_search_activity(query: str) -> str:
  function github_org_search (line 113) | async def github_org_search(query: str, app_ctx: Optional[AppContext] = ...
  function main (line 123) | async def main():

FILE: examples/oauth/pre_authorize/worker.py
  function main (line 22) | async def main():

FILE: examples/oauth/protected_by_oauth/main.py
  function hello (line 58) | async def hello(app_ctx: Optional[AppContext] = None) -> str:
  function main (line 75) | async def main():

FILE: examples/temporal/basic.py
  class SimpleWorkflow (line 24) | class SimpleWorkflow(Workflow[str]):
    method run (line 30) | async def run(self, input: str) -> WorkflowResult[str]:
  function main (line 58) | async def main():

FILE: examples/temporal/evaluator_optimizer.py
  class EvaluatorOptimizerWorkflow (line 23) | class EvaluatorOptimizerWorkflow(Workflow[str]):
    method run (line 29) | async def run(self, input: str) -> WorkflowResult[str]:
  function main (line 90) | async def main():

FILE: examples/temporal/interactive.py
  class WorkflowWithInteraction (line 30) | class WorkflowWithInteraction(InteractiveWorkflow[str]):
    method run (line 36) | async def run(self, input: str) -> WorkflowResult[str]:
  function main (line 61) | async def main():

FILE: examples/temporal/orchestrator.py
  function run_orchestrator (line 28) | async def run_orchestrator(input: str, app_ctx: Optional[AppContext] = N...
  function main (line 103) | async def main():

FILE: examples/temporal/parallel.py
  class ParallelWorkflow (line 43) | class ParallelWorkflow(Workflow[str]):
    method run (line 49) | async def run(self, input: str) -> WorkflowResult[str]:
  function display_token_summary (line 112) | async def display_token_summary(context: Context):
  function main (line 156) | async def main():

FILE: examples/temporal/router.py
  function print_to_console (line 20) | def print_to_console(message: str):
  function print_hello_world (line 27) | def print_hello_world():
  class RouterWorkflow (line 35) | class RouterWorkflow(Workflow[str]):
    method run (line 41) | async def run(self) -> WorkflowResult[str]:
  function main (line 144) | async def main():

FILE: examples/temporal/run_worker.py
  function main (line 22) | async def main():

FILE: examples/tracing/agent/main.py
  function human_input_handler (line 12) | async def human_input_handler(request: HumanInputRequest) -> HumanInputR...
  function agent_tracing (line 25) | async def agent_tracing():

FILE: examples/tracing/langfuse/main.py
  function human_input_handler (line 12) | async def human_input_handler(request: HumanInputRequest) -> HumanInputR...
  function agent_tracing (line 25) | async def agent_tracing():

FILE: examples/tracing/llm/main.py
  class CountryRecord (line 20) | class CountryRecord(BaseModel):
  class CountryInfo (line 27) | class CountryInfo(BaseModel):
    method summary (line 32) | def summary(self) -> str:
  function llm_tracing (line 39) | async def llm_tracing():

FILE: examples/tracing/mcp/main.py
  function test_sse (line 12) | async def test_sse():

FILE: examples/tracing/mcp/server.py
  function _configure_server_otel (line 17) | def _configure_server_otel():
  function get_magic_number (line 25) | def get_magic_number(original_number: int = 0) -> int:
  function main (line 34) | def main():

FILE: examples/tracing/temporal/basic.py
  class SimpleWorkflow (line 23) | class SimpleWorkflow(Workflow[str]):
    method run (line 29) | async def run(self, input: str) -> WorkflowResult[str]:
  function main (line 57) | async def main():

FILE: examples/tracing/temporal/run_worker.py
  function main (line 22) | async def main():

FILE: examples/usecases/fastapi_websocket/main.py
  function lifespan (line 15) | async def lifespan(app: FastAPI):
  function get (line 28) | async def get():
  function websocket_endpoint (line 126) | async def websocket_endpoint(websocket: WebSocket, user_id: str):
  function health_check (line 186) | async def health_check():
  function list_sessions (line 192) | async def list_sessions():

FILE: examples/usecases/fastapi_websocket/session_manager.py
  class UserSession (line 12) | class UserSession:
    method __init__ (line 15) | def __init__(self, user_id: str, session_id: str):
    method initialize (line 28) | async def initialize(self):
    method process_message (line 66) | async def process_message(self, message: str) -> str:
    method cleanup (line 109) | async def cleanup(self):
  class SessionManager (line 120) | class SessionManager:
    method __init__ (line 123) | def __init__(self):
    method initialize (line 128) | async def initialize(self):
    method get_or_create_session (line 133) | async def get_or_create_session(self, user_id: str) -> UserSession:
    method cleanup_session (line 152) | async def cleanup_session(self, user_id: str):
    method cleanup (line 159) | async def cleanup(self):
    method _cleanup_task (line 170) | async def _cleanup_task(self):
    method get_session_info (line 194) | def get_session_info(self, user_id: str) -> Optional[dict]:

FILE: examples/usecases/fastapi_websocket/websocket_client_async.py
  class AsyncWebSocketClient (line 20) | class AsyncWebSocketClient:
    method __init__ (line 23) | def __init__(self, user_id: str, host: str = "localhost", port: int = ...
    method connect (line 31) | async def connect(self):
    method disconnect (line 41) | async def disconnect(self):
    method send_message (line 47) | async def send_message(self, message: str):
    method listen_for_messages (line 59) | async def listen_for_messages(self):
    method handle_user_input (line 82) | async def handle_user_input(self):
    method interactive_chat (line 111) | async def interactive_chat(self):
    method show_help (line 134) | def show_help(self):
  function main (line 148) | async def main():

FILE: examples/usecases/marimo_mcp_basic_agent/notebook.py
  function _ (line 18) | def _(mo):
  function _ (line 30) | def _(ListToolsResult, mo, tools):
  function _ (line 43) | def _(llm, mo):
  function _ (line 59) | async def _():
  function _ (line 72) | async def _(Agent, OpenAIAugmentedLLM):
  function _ (line 88) | def _():

FILE: examples/usecases/mcp_basic_slack_agent/main.py
  function fetch_latest_slack_message (line 12) | async def fetch_latest_slack_message() -> str:

FILE: examples/usecases/mcp_browser_agent/browser_agent.py
  function initialize_browser_agent (line 36) | async def initialize_browser_agent(url):
  function interact_with_browser (line 100) | async def interact_with_browser(llm, query):
  function close_browser_session (line 121) | async def close_browser_session(browser_agent, browser_manager, browser_...
  function print_banner (line 134) | def print_banner():
  function print_welcome (line 148) | def print_welcome():
  function format_agent_response (line 161) | def format_agent_response(response):
  function update_session_info (line 202) | def update_session_info(response):
  function run_browser_session (line 217) | async def run_browser_session(url):
  function parse_args (line 310) | def parse_args():

FILE: examples/usecases/mcp_financial_analyzer/main.py
  function main (line 31) | async def main():

FILE: examples/usecases/mcp_github_to_slack_agent/main.py
  function github_to_slack (line 17) | async def github_to_slack(github_owner: str, github_repo: str, slack_cha...
  function parse_args (line 85) | def parse_args():

FILE: examples/usecases/mcp_instagram_gift_advisor/main.py
  class InstagramGiftAdvisor (line 13) | class InstagramGiftAdvisor:
    method __init__ (line 14) | def __init__(self):
    method __aenter__ (line 21) | async def __aenter__(self):
    method __aexit__ (line 70) | async def __aexit__(self, exc_type, exc_val, exc_tb):
    method scrape_instagram_profile (line 77) | async def scrape_instagram_profile(self, username):
    method generate_gift_recommendations (line 112) | async def generate_gift_recommendations(self, profile_analysis):
  function run_gift_advisor (line 157) | async def run_gift_advisor(username):
  function parse_args (line 188) | def parse_args():

FILE: examples/usecases/mcp_marketing_assistant_agent/main.py
  function detect_platform (line 32) | def detect_platform(request: str) -> str:
  function load_company_config (line 45) | def load_company_config() -> dict:
  function main (line 61) | async def main():

FILE: examples/usecases/mcp_playwright_agent/main.py
  function linkedin_to_filesystem (line 17) | async def linkedin_to_filesystem(
  function parse_args (line 104) | def parse_args():

FILE: examples/usecases/mcp_realtor_agent/main.py
  function main (line 38) | async def main():

FILE: examples/usecases/mcp_realtor_agent/rentspider_server.py
  class PropertySearchPreferences (line 29) | class PropertySearchPreferences(BaseModel):
  class MarketAnalysisPreferences (line 50) | class MarketAnalysisPreferences(BaseModel):
  class RentalTrendsPreferences (line 66) | class RentalTrendsPreferences(BaseModel):
  function make_api_request (line 83) | async def make_api_request(
  function search_properties (line 114) | async def search_properties(location: str, ctx: Context) -> str:
  function get_market_statistics (line 202) | async def get_market_statistics(location: str, ctx: Context) -> str:
  function get_rental_trends (line 275) | async def get_rental_trends(location: str, ctx: Context) -> str:
  function get_property_details (line 351) | async def get_property_details(property_id: str) -> str:
  function get_comparable_properties (line 373) | async def get_comparable_properties(property_id: str, ctx: Context) -> str:
  function main (line 437) | def main():

FILE: examples/usecases/mcp_researcher/main.py
  function example_usage (line 17) | async def example_usage():

FILE: examples/usecases/mcp_supabase_migration_agent/main.py
  function supabase_migration_codegen (line 13) | async def supabase_migration_codegen(
  function parse_args (line 108) | def parse_args():

FILE: examples/usecases/reliable_conversation/main.py
  class RegisteredConversationWorkflow (line 36) | class RegisteredConversationWorkflow(ConversationWorkflow):
  function run_repl (line 42) | async def run_repl():
  function _display_help (line 189) | def _display_help(formatter: ReadableFormatter):
  function _display_config (line 214) | def _display_config(rcm_app, formatter: ReadableFormatter):
  function _display_stats_enhanced (line 248) | def _display_stats_enhanced(state: ConversationState, formatter: Readabl...
  function _display_requirements_enhanced (line 291) | def _display_requirements_enhanced(
  function _display_final_summary_enhanced (line 304) | def _display_final_summary_enhanced(
  function _display_quality_metrics (line 350) | def _display_quality_metrics(metrics: dict):
  function _display_stats (line 370) | def _display_stats(state: ConversationState):
  function _display_requirements (line 407) | def _display_requirements(state: ConversationState):
  function _display_final_summary (line 438) | def _display_final_summary(state: ConversationState):

FILE: examples/usecases/reliable_conversation/src/models/conversation_models.py
  class ConversationMessage (line 12) | class ConversationMessage:
    method to_dict (line 20) | def to_dict(self) -> Dict[str, Any]:
    method from_dict (line 30) | def from_dict(cls, data: Dict[str, Any]) -> "ConversationMessage":
  class Requirement (line 41) | class Requirement:
    method to_dict (line 50) | def to_dict(self) -> Dict[str, Any]:
    method from_dict (line 61) | def from_dict(cls, data: Dict[str, Any]) -> "Requirement":
  class QualityMetrics (line 73) | class QualityMetrics:
    method overall_score (line 85) | def overall_score(self) -> float:
    method to_dict (line 99) | def to_dict(self) -> Dict[str, Any]:
    method from_dict (line 113) | def from_dict(cls, data: Dict[str, Any]) -> "QualityMetrics":
  class ConversationState (line 127) | class ConversationState:
    method to_dict (line 146) | def to_dict(self) -> Dict[str, Any]:
    method from_dict (line 163) | def from_dict(cls, data: Dict[str, Any]) -> "ConversationState":
  class ConversationConfig (line 183) | class ConversationConfig:
    method to_dict (line 196) | def to_dict(self) -> Dict[str, Any]:
    method from_dict (line 211) | def from_dict(cls, data: Dict[str, Any]) -> "ConversationConfig":

FILE: examples/usecases/reliable_conversation/src/tasks/llm_evaluators.py
  function evaluate_quality_with_llm (line 99) | async def evaluate_quality_with_llm(params: Dict[str, Any]) -> Dict[str,...
  function extract_requirements_with_llm (line 222) | async def extract_requirements_with_llm(params: Dict[str, Any]) -> List[...
  function consolidate_context_with_llm (line 312) | async def consolidate_context_with_llm(params: Dict[str, Any]) -> str:
  function _detect_complete_solution_attempt (line 394) | def _detect_complete_solution_attempt(response: str) -> bool:
  function _calculate_overall_score (line 411) | def _calculate_overall_score(metrics: Dict[str, Any]) -> float:

FILE: examples/usecases/reliable_conversation/src/tasks/quality_control.py
  function process_turn_with_quality (line 23) | async def process_turn_with_quality(params: Dict[str, Any]) -> Dict[str,...
  function generate_response_with_constraints (line 206) | async def generate_response_with_constraints(params: Dict[str, Any]) -> ...
  function _should_consolidate_context (line 298) | def _should_consolidate_context(
  function _calculate_overall_score (line 311) | def _calculate_overall_score(metrics: Dict[str, Any]) -> float:

FILE: examples/usecases/reliable_conversation/src/tasks/task_functions.py
  function evaluate_quality_with_llm (line 96) | async def evaluate_quality_with_llm(params: Dict[str, Any]) -> Dict[str,...
  function extract_requirements_with_llm (line 253) | async def extract_requirements_with_llm(params: Dict[str, Any]) -> List[...
  function consolidate_context_with_llm (line 398) | async def consolidate_context_with_llm(params: Dict[str, Any]) -> str:
  function generate_response_with_constraints (line 516) | async def generate_response_with_constraints(params: Dict[str, Any]) -> ...
  function process_turn_with_quality (line 642) | async def process_turn_with_quality(params: Dict[str, Any]) -> Dict[str,...
  function _should_consolidate_context (line 845) | def _should_consolidate_context(
  function _calculate_overall_score (line 858) | def _calculate_overall_score(metrics: Dict[str, Any]) -> float:
  function _detect_complete_solution_attempt (line 883) | def _detect_complete_solution_attempt(response: str) -> bool:

FILE: examples/usecases/reliable_conversation/src/tasks/task_registry.py
  function register_rcm_tasks (line 9) | def register_rcm_tasks(app: MCPApp):

FILE: examples/usecases/reliable_conversation/src/utils/config.py
  function get_llm_class (line 10) | def get_llm_class(provider: str = "openai") -> Type:
  function extract_rcm_config (line 18) | def extract_rcm_config(app_config: Any) -> dict:

FILE: examples/usecases/reliable_conversation/src/utils/log_formatter.py
  function format_message_content (line 13) | def format_message_content(content: str, max_line_length: int = 100) -> ...
  function format_log_data (line 61) | def format_log_data(data: Dict[str, Any]) -> str:
  function extract_key_info (line 89) | def extract_key_info(log_record) -> Dict[str, Any]:
  function create_readable_summary (line 121) | def create_readable_summary(message: str, record: logging.LogRecord) -> ...
  class ReadableFormatter (line 169) | class ReadableFormatter(logging.Formatter):
    method __init__ (line 172) | def __init__(self, show_summaries: bool = True, max_line_length: int =...
    method format (line 177) | def format(self, record: logging.LogRecord) -> str:

FILE: examples/usecases/reliable_conversation/src/utils/logging.py
  function get_rcm_logger (line 10) | def get_rcm_logger(name: str):
  function log_conversation_event (line 16) | def log_conversation_event(
  function log_quality_metrics (line 28) | def log_quality_metrics(
  function log_workflow_step (line 40) | def log_workflow_step(

FILE: examples/usecases/reliable_conversation/src/utils/logging_config.py
  function setup_readable_logging (line 11) | def setup_readable_logging(
  function setup_test_logging (line 65) | def setup_test_logging() -> None:

FILE: examples/usecases/reliable_conversation/src/utils/progress_reporter.py
  class ProgressReporter (line 10) | class ProgressReporter:
    method __init__ (line 13) | def __init__(self, console: Optional[Console] = None, enabled: bool = ...
    method step (line 18) | def step(self, message: str, details: str = ""):
    method thinking (line 30) | def thinking(self, message: str = "Processing"):
    method quality_check (line 38) | def quality_check(self, score: float, issues: int = 0):
    method requirement_extraction (line 53) | def requirement_extraction(self, count: int):
    method context_consolidation (line 63) | def context_consolidation(self, from_chars: int, to_chars: int):
    method show_llm_interaction (line 73) | def show_llm_interaction(
  function get_progress_reporter (line 111) | def get_progress_reporter() -> Optional[ProgressReporter]:
  function set_progress_reporter (line 116) | def set_progress_reporter(reporter: Optional[ProgressReporter]):
  function report_step (line 122) | def report_step(message: str, details: str = ""):
  function report_thinking (line 129) | def report_thinking(message: str = "Processing"):
  function report_quality_check (line 136) | def report_quality_check(score: float, issues: int = 0):
  function report_requirement_extraction (line 143) | def report_requirement_extraction(count: int):
  function report_context_consolidation (line 150) | def report_context_consolidation(from_chars: int, to_chars: int):
  function show_llm_interaction (line 157) | def show_llm_interaction(role: str, prompt: str, response: str, truncate...

FILE: examples/usecases/reliable_conversation/src/utils/readable_output.py
  class OutputConfig (line 15) | class OutputConfig:
    method __post_init__ (line 26) | def __post_init__(self):
  class ReadableFormatter (line 31) | class ReadableFormatter:
    method __init__ (line 34) | def __init__(
    method format_quality_score (line 40) | def format_quality_score(self, score: float, issues: List[str] = None)...
    method format_conversation_turn (line 75) | def format_conversation_turn(
    method _contains_code (line 123) | def _contains_code(self, text: str) -> bool:
    method _format_code_response (line 129) | def _format_code_response(self, response: str) -> str:
    method format_requirements_status (line 135) | def format_requirements_status(self, requirements: List[Dict[str, Any]...
    method format_conversation_stats (line 170) | def format_conversation_stats(self, stats: Dict[str, Any]) -> None:
    method show_welcome (line 192) | def show_welcome(self, app_name: str = "Reliable Conversation Manager"...
    method show_thinking (line 203) | def show_thinking(self, message: str = "Processing...") -> None:
    method show_progress (line 208) | def show_progress(self, message: str, elapsed_time: float = 0) -> None:
    method show_error (line 215) | def show_error(self, error: str) -> None:
    method show_warning (line 219) | def show_warning(self, warning: str) -> None:
    method show_success (line 223) | def show_success(self, message: str) -> None:
  function safe_format (line 228) | def safe_format(content, formatter_func):

FILE: examples/usecases/reliable_conversation/src/utils/test_runner.py
  class ReadableTestRunner (line 17) | class ReadableTestRunner:
    method __init__ (line 20) | def __init__(
    method show_test_header (line 28) | def show_test_header(self, title: str, description: str = ""):
    method run_test_scenario (line 36) | async def run_test_scenario(
    method _display_test_result (line 97) | def _display_test_result(self, result: Dict[str, Any], execution_time:...
    method _display_quality_summary (line 145) | def _display_quality_summary(self, metrics: Dict[str, Any]):
    method _display_test_validations (line 166) | def _display_test_validations(self, validations: List[Dict[str, Any]]):
    method display_summary (line 180) | def display_summary(self):
    method display_conversation_analysis (line 229) | def display_conversation_analysis(self, conversation_data: Dict[str, A...
    method _display_quality_trend (line 248) | def _display_quality_trend(self, quality_history: List[Dict[str, Any]]):
    method _display_bloat_analysis (line 275) | def _display_bloat_analysis(self, answer_lengths: List[int]):
  function create_test_runner (line 300) | def create_test_runner(verbosity: str = "normal") -> ReadableTestRunner:

FILE: examples/usecases/reliable_conversation/src/workflows/conversation_workflow.py
  class ConversationWorkflow (line 29) | class ConversationWorkflow(Workflow[Dict[str, Any]]):
    method __init__ (line 35) | def __init__(self, app):
    method run (line 42) | async def run(self, args: Dict[str, Any]) -> WorkflowResult[Dict[str, ...
    method _run_asyncio_conversation (line 57) | async def _run_asyncio_conversation(
    method _run_temporal_conversation (line 110) | async def _run_temporal_conversation(
    method _add_system_message (line 117) | async def _add_system_message(self):
    method _process_turn (line 130) | async def _process_turn(self, user_input: str):
    method _generate_basic_response (line 234) | async def _generate_basic_response(self, user_input: str) -> str:
    method _build_conversation_context (line 297) | def _build_conversation_context(self) -> str:

FILE: examples/usecases/reliable_conversation/test_basic.py
  function patch_llm_interactions (line 24) | def patch_llm_interactions():
  function test_rcm_with_real_calls (line 75) | async def test_rcm_with_real_calls():
  function test_fallback_behavior (line 359) | async def test_fallback_behavior():

FILE: examples/usecases/streamlit_mcp_basic_agent/main.py
  class AgentState (line 15) | class AgentState:
  function get_agent_state (line 22) | async def get_agent_state(
  function format_list_tools_result (line 58) | def format_list_tools_result(list_tools_result: ListToolsResult):
  function main (line 65) | async def main():

FILE: examples/usecases/streamlit_mcp_rag_agent/agent_state.py
  class AgentState (line 13) | class AgentState:
  function get_agent_state (line 20) | async def get_agent_state(

FILE: examples/usecases/streamlit_mcp_rag_agent/main.py
  function initialize_collection (line 41) | def initialize_collection():
  function main (line 55) | async def main():

FILE: examples/workflows/workflow_deep_orchestrator/main.py
  class DeepOrchestratorMonitor (line 42) | class DeepOrchestratorMonitor:
    method __init__ (line 45) | def __init__(self, orchestrator: DeepOrchestrator):
    method get_budget_table (line 49) | def get_budget_table(self) -> Table:
    method get_queue_tree (line 89) | def get_queue_tree(self) -> Tree:
    method get_plan_table (line 175) | def get_plan_table(self) -> Table:
    method get_token_stats_panel (line 213) | async def get_token_stats_panel(self) -> Panel:
    method get_memory_panel (line 261) | def get_memory_panel(self) -> Panel:
    method get_agents_table (line 283) | def get_agents_table(self) -> Table:
    method get_policy_panel (line 309) | def get_policy_panel(self) -> Panel:
    method get_status_summary (line 322) | def get_status_summary(self) -> Panel:
  function create_display_layout (line 336) | def create_display_layout() -> Layout:
  function update_display (line 364) | def update_display(layout: Layout, monitor: DeepOrchestratorMonitor):
  function main (line 400) | async def main():

FILE: examples/workflows/workflow_evaluator_optimizer/main.py
  function example_usage (line 29) | async def example_usage(

FILE: examples/workflows/workflow_intent_classifier/main.py
  function example_usage (line 17) | async def example_usage() -> str:

FILE: examples/workflows/workflow_orchestrator_worker/main.py
  function example_usage (line 94) | async def example_usage() -> str:
  function display_node_tree (line 190) | def display_node_tree(
  function display_run_tree (line 240) | async def display_run_tree(context: Context, name: str):

FILE: examples/workflows/workflow_parallel/main.py
  function example_usage (line 40) | async def example_usage():

FILE: examples/workflows/workflow_router/main.py
  function print_to_console (line 15) | def print_to_console(message: str):
  function print_hello_world (line 23) | def print_hello_world():
  function example_usage (line 30) | async def example_usage():

FILE: examples/workflows/workflow_swarm/main.py
  function escalate_to_agent (line 16) | def escalate_to_agent(reason=None):
  function valid_to_change_flight (line 21) | def valid_to_change_flight():
  function change_flight (line 26) | def change_flight():
  function initiate_refund (line 31) | def initiate_refund():
  function initiate_flight_credits (line 37) | def initiate_flight_credits():
  function case_resolved (line 43) | def case_resolved():
  function initiate_baggage_search (line 71) | def initiate_baggage_search():
  function transfer_to_flight_modification (line 76) | def transfer_to_flight_modification():
  function transfer_to_flight_cancel (line 81) | def transfer_to_flight_cancel():
  function transfer_to_flight_change (line 86) | def transfer_to_flight_change():
  function transfer_to_lost_baggage (line 91) | def transfer_to_lost_baggage():
  function transfer_to_triage (line 96) | def transfer_to_triage():
  function triage_instructions (line 105) | def triage_instructions(context_variables):
  function example_usage (line 203) | async def example_usage():
  function main (line 256) | async def main():

FILE: scripts/event_replay.py
  function load_events (line 18) | def load_events(path: Path) -> list[Event]:
  function main (line 37) | def main(log_file: str):

FILE: scripts/event_summary.py
  function load_events (line 17) | def load_events(path: Path) -> list[Event]:
  function create_event_table (line 36) | def create_event_table(events: list[Event]) -> Table:
  function create_summary_panel (line 77) | def create_summary_panel(events: list[Event]) -> Panel:
  function main (line 113) | def main(log_file: str):

FILE: scripts/event_viewer.py
  function get_key (line 22) | def get_key() -> str:
  class EventDisplay (line 33) | class EventDisplay:
    method __init__ (line 36) | def __init__(self, events: List[Event]):
    method next (line 45) | def next(self, steps: int = 1) -> None:
    method prev (line 52) | def prev(self, steps: int = 1) -> None:
    method _rebuild_progress_events (line 59) | def _rebuild_progress_events(self) -> None:
    method _process_current (line 70) | def _process_current(self) -> None:
    method render (line 96) | def render(self) -> Panel:
  function load_events (line 165) | def load_events(path: Path) -> List[Event]:
  function main (line 196) | def main(log_file: str):

FILE: scripts/format.py
  function main (line 15) | def main(path: str = None):

FILE: scripts/gen_llm_benchmarks.py
  class ModelBenchmarks (line 29) | class ModelBenchmarks(BaseModel):
  class ModelLatency (line 48) | class ModelLatency(BaseModel):
  class ModelCost (line 64) | class ModelCost(BaseModel):
  class ModelMetrics (line 87) | class ModelMetrics(BaseModel):
  class ModelInfo (line 97) | class ModelInfo(BaseModel):
  function parse_context_window (line 109) | def parse_context_window(context_str: str) -> int | None:
  function parse_html_to_models (line 129) | def parse_html_to_models(html_content: str) -> list[ModelInfo]:
  function export_to_json (line 506) | def export_to_json(
  function display_summary (line 513) | def display_summary(models: list[ModelInfo]):
  function main (line 559) | def main(

FILE: scripts/gen_schema.py
  function extract_model_info (line 29) | def extract_model_info(content: str) -> Dict[str, Dict[str, str]]:
  class MockModule (line 104) | class MockModule:
    method __getattr__ (line 107) | def __getattr__(self, _: str) -> Any:
    method __call__ (line 110) | def __call__(self, *args: Any, **kwargs: Any) -> Any:
  function create_mock_modules (line 114) | def create_mock_modules() -> None:
  function load_settings_class (line 133) | def load_settings_class(
  function apply_descriptions_to_schema (line 166) | def apply_descriptions_to_schema(
  function generate (line 198) | def generate(

FILE: scripts/lint.py
  function main (line 15) | def main(fix: bool = False, watch: bool = False, path: str = None):

FILE: scripts/log_trimmer.py
  function count_tokens (line 19) | def count_tokens(text: str, model: str = "gpt-4o") -> int:
  function clean (line 35) | def clean(file: Path = typer.Argument(..., help="Path to the file to cle...

FILE: scripts/promptify.py
  function parse_gitignore (line 15) | def parse_gitignore(path: Path) -> List[str]:
  function normalize_pattern (line 28) | def normalize_pattern(pattern: str) -> str:
  function pattern_match (line 35) | def pattern_match(path: str, pattern: str) -> bool:
  function matches_any_pattern (line 60) | def matches_any_pattern(path: Path, patterns: List[str]) -> bool:
  function path_in_directory (line 69) | def path_in_directory(path: Path, dir_pattern: str) -> bool:
  function should_force_include (line 109) | def should_force_include(path: Path, append_patterns: List[str]) -> bool:
  function should_include_by_pattern (line 146) | def should_include_by_pattern(path: Path, include_patterns: List[str]) -...
  function should_ignore (line 180) | def should_ignore(
  function should_process_path (line 189) | def should_process_path(
  function has_includable_content (line 222) | def has_includable_content(
  function create_tree_structure (line 276) | def create_tree_structure(
  function package_project (line 328) | def package_project(
  function main (line 432) | def main(

FILE: scripts/rich_progress_test.py
  function generate_test_events (line 11) | async def generate_test_events():
  function main (line 88) | async def main():

FILE: src/mcp_agent/agents/agent.py
  class Agent (line 62) | class Agent(BaseModel):
    method model_post_init (line 151) | def model_post_init(self, __context) -> None:
    method attach_llm (line 157) | async def attach_llm(
    method get_token_node (line 195) | async def get_token_node(self, return_all_matches: bool = False):
    method get_token_usage (line 206) | async def get_token_usage(self):
    method get_token_cost (line 211) | async def get_token_cost(self) -> float:
    method watch_tokens (line 216) | async def watch_tokens(
    method format_token_tree (line 254) | async def format_token_tree(self) -> str:
    method initialize (line 260) | async def initialize(self, force: bool = False):
    method shutdown (line 336) | async def shutdown(self):
    method close (line 370) | async def close(self):
    method __aenter__ (line 377) | async def __aenter__(self):
    method __aexit__ (line 381) | async def __aexit__(self, exc_type, exc_val, exc_tb):
    method get_capabilities (line 384) | async def get_capabilities(
    method get_server_session (line 440) | async def get_server_session(self, server_name: str):
    method _should_include_non_namespaced_tool (line 462) | def _should_include_non_namespaced_tool(
    method list_tools (line 493) | async def list_tools(
    method list_resources (line 724) | async def list_resources(
    method read_resource (line 749) | async def read_resource(self, uri: str, server_name: str | None = None):
    method create_prompt (line 775) | async def create_prompt(
    method list_prompts (line 868) | async def list_prompts(self, server_name: str | None = None) -> ListPr...
    method get_prompt (line 912) | async def get_prompt(
    method request_human_input (line 965) | async def request_human_input(
    method call_tool (line 1072) | async def call_tool(
    method _call_human_input_tool (line 1127) | async def _call_human_input_tool(
  class InitAggregatorRequest (line 1164) | class InitAggregatorRequest(BaseModel):
  class InitAggregatorResponse (line 1175) | class InitAggregatorResponse(BaseModel):
  class ListToolsRequest (line 1196) | class ListToolsRequest(BaseModel):
  class CallToolRequest (line 1205) | class CallToolRequest(BaseModel):
  class ListPromptsRequest (line 1217) | class ListPromptsRequest(BaseModel):
  class GetPromptRequest (line 1226) | class GetPromptRequest(BaseModel):
  class GetCapabilitiesRequest (line 1238) | class GetCapabilitiesRequest(BaseModel):
  class GetServerSessionRequest (line 1247) | class GetServerSessionRequest(BaseModel):
  class ListResourcesRequest (line 1256) | class ListResourcesRequest(BaseModel):
  class ReadResourceRequest (line 1265) | class ReadResourceRequest(BaseModel):
  class GetServerSessionResponse (line 1275) | class GetServerSessionResponse(BaseModel):
  class AgentTasks (line 1285) | class AgentTasks:
    method __init__ (line 1290) | def __init__(self, context: "Context"):
    method _with_aggregator (line 1306) | async def _with_aggregator(self, agent_name: str):
    method initialize_aggregator_task (line 1384) | async def initialize_aggregator_task(
    method shutdown_aggregator_task (line 1437) | async def shutdown_aggregator_task(self, agent_name: str) -> bool:
    method list_tools_task (line 1477) | async def list_tools_task(self, request: ListToolsRequest) -> ListTool...
    method call_tool_task (line 1488) | async def call_tool_task(self, request: CallToolRequest) -> CallToolRe...
    method list_prompts_task (line 1501) | async def list_prompts_task(self, request: ListPromptsRequest) -> List...
    method get_prompt_task (line 1512) | async def get_prompt_task(self, request: GetPromptRequest) -> GetPromp...
    method get_capabilities_task (line 1525) | async def get_capabilities_task(
    method get_server_session (line 1554) | async def get_server_session(
    method list_resources_task (line 1578) | async def list_resources_task(self, request: ListResourcesRequest):
    method read_resource_task (line 1588) | async def read_resource_task(self, request: ReadResourceRequest):

FILE: src/mcp_agent/agents/agent_spec.py
  class AgentSpec (line 8) | class AgentSpec(BaseModel):

FILE: src/mcp_agent/app.py
  class MCPApp (line 66) | class MCPApp:
    method __init__ (line 87) | def __init__(
    method context (line 185) | def context(self) -> Context:
    method config (line 193) | def config(self):
    method server_registry (line 197) | def server_registry(self):
    method executor (line 201) | def executor(self):
    method engine (line 205) | def engine(self):
    method upstream_session (line 209) | def upstream_session(self):
    method upstream_session (line 213) | def upstream_session(self, value):
    method workflows (line 217) | def workflows(self):
    method tasks (line 221) | def tasks(self):
    method session_id (line 225) | def session_id(self):
    method logger (line 229) | def logger(self):
    method _apply_environment_bindings (line 248) | def _apply_environment_bindings(self) -> None:
    method _load_dotenv_files (line 269) | def _load_dotenv_files(self) -> None:
    method initialize (line 282) | async def initialize(self):
    method _initialize_preconfigured_tokens (line 438) | async def _initialize_preconfigured_tokens(self, token_manager):
    method get_token_node (line 484) | async def get_token_node(self):
    method get_token_usage (line 490) | async def get_token_usage(self):
    method get_token_summary (line 497) | async def get_token_summary(self):
    method watch_tokens (line 504) | async def watch_tokens(
    method format_token_tree (line 523) | async def format_token_tree(self) -> str:
    method cleanup (line 529) | async def cleanup(self):
    method run (line 564) | async def run(self):
    method workflow (line 589) | def workflow(
    method workflow_signal (line 625) | def workflow_signal(
    method workflow_run (line 675) | def workflow_run(self, fn: Callable[..., R], **kwargs) -> Callable[......
    method _create_workflow_from_function (line 736) | def _create_workflow_from_function(
    method tool (line 946) | def tool(self, __fn: Callable[P, R]) -> Callable[P, R]: ...
    method tool (line 949) | def tool(
    method tool (line 961) | def tool(
    method async_tool (line 1056) | def async_tool(self, __fn: Callable[P, R]) -> Callable[P, R]: ...
    method async_tool (line 1059) | def async_tool(
    method async_tool (line 1071) | def async_tool(
    method _get_configured_retry_policy (line 1163) | def _get_configured_retry_policy(self, activity_name: str) -> Dict[str...
    method workflow_task (line 1219) | def workflow_task(
    method is_workflow_task (line 1303) | def is_workflow_task(self, func: Callable[..., Any]) -> bool:
    method _register_global_workflow_tasks (line 1309) | def _register_global_workflow_tasks(self):

FILE: src/mcp_agent/cli/__main__.py
  function main (line 43) | def main():

FILE: src/mcp_agent/cli/auth/main.py
  function save_credentials (line 11) | def save_credentials(credentials: UserCredentials) -> None:
  function load_credentials (line 59) | def load_credentials() -> Optional[UserCredentials]:
  function clear_credentials (line 88) | def clear_credentials() -> bool:
  function load_api_key_credentials (line 108) | def load_api_key_credentials() -> Optional[str]:

FILE: src/mcp_agent/cli/auth/models.py
  class UserCredentials (line 10) | class UserCredentials:
    method is_token_expired (line 22) | def is_token_expired(self) -> bool:
    method to_dict (line 28) | def to_dict(self) -> dict:
    method from_dict (line 42) | def from_dict(cls, data: dict) -> "UserCredentials":
    method to_json (line 56) | def to_json(self) -> str:
    method from_json (line 61) | def from_json(cls, json_str: str) -> "UserCredentials":

FILE: src/mcp_agent/cli/cloud/commands/app/delete/main.py
  function delete_app (line 23) | def delete_app(

FILE: src/mcp_agent/cli/cloud/commands/app/status/main.py
  function get_app_status (line 35) | def get_app_status(
  function print_server_info (line 106) | def print_server_info(server_info: AppServerInfo) -> None:
  function _server_status_text (line 118) | def _server_status_text(status: str) -> str:
  function print_mcp_server_details (line 127) | async def print_mcp_server_details(server_url: str, api_key: str) -> None:
  function print_server_tools (line 173) | async def print_server_tools(session: MCPClientSession) -> None:
  function print_server_prompts (line 223) | async def print_server_prompts(session: MCPClientSession) -> None:
  function print_server_resources (line 270) | async def print_server_resources(session: MCPClientSession) -> None:
  function print_server_workflows (line 305) | async def print_server_workflows(session: MCPClientSession) -> None:

FILE: src/mcp_agent/cli/cloud/commands/app/workflows/main.py
  function list_app_workflows (line 34) | def list_app_workflows(
  function print_mcp_server_workflow_details (line 102) | async def print_mcp_server_workflow_details(server_url: str, api_key: st...
  function print_workflows_list (line 138) | async def print_workflows_list(session: MCPClientSession) -> None:
  function print_runs_list (line 150) | async def print_runs_list(session: MCPClientSession) -> None:

FILE: src/mcp_agent/cli/cloud/commands/apps/list/main.py
  function list_apps (line 25) | def list_apps(
  function print_info_header (line 97) | def print_info_header() -> None:
  function print_apps (line 110) | def print_apps(apps: List[MCPApp]) -> None:
  function print_app_configs (line 140) | def print_app_configs(app_configs: List[MCPAppConfiguration]) -> None:
  function _server_status_text (line 183) | def _server_status_text(status: str, is_last_row: bool = False):
  function _format_deploy_meta (line 193) | def _format_deploy_meta(meta):

FILE: src/mcp_agent/cli/cloud/commands/apps/update/main.py
  function update_app (line 20) | def update_app(

FILE: src/mcp_agent/cli/cloud/commands/auth/login/main.py
  function _load_user_credentials (line 24) | def _load_user_credentials(api_key: str) -> UserCredentials:
  function login (line 57) | def login(
  function _handle_browser_auth (line 106) | def _handle_browser_auth(base_url: str, no_open: bool) -> str:
  function _handle_manual_key_input (line 132) | def _handle_manual_key_input() -> str:
  function _is_valid_api_key (line 158) | def _is_valid_api_key(api_key: str) -> bool:

FILE: src/mcp_agent/cli/cloud/commands/auth/logout/main.py
  function logout (line 9) | def logout() -> None:

FILE: src/mcp_agent/cli/cloud/commands/auth/whoami/main.py
  function whoami (line 12) | def whoami() -> None:

FILE: src/mcp_agent/cli/cloud/commands/configure/main.py
  function configure_app (line 44) | def configure_app(

FILE: src/mcp_agent/cli/cloud/commands/deploy/bundle_utils.py
  function create_pathspec_from_gitignore (line 17) | def create_pathspec_from_gitignore(
  function should_ignore_by_gitignore (line 41) | def should_ignore_by_gitignore(

FILE: src/mcp_agent/cli/cloud/commands/deploy/main.py
  function deploy_config (line 50) | def deploy_config(
  function _deploy_with_retry (line 488) | async def _deploy_with_retry(
  function get_config_files (line 596) | def get_config_files(config_dir: Path) -> tuple[Path, Optional[Path], Op...

FILE: src/mcp_agent/cli/cloud/commands/deploy/materialize.py
  class EnvSpec (line 27) | class EnvSpec:
    method secret_name (line 34) | def secret_name(self) -> str:
  function _normalize_env_specs (line 38) | def _normalize_env_specs(settings: Settings) -> list[EnvSpec]:
  function _secret_name_for_env (line 46) | def _secret_name_for_env(app_id: str, key: str) -> str:
  function _load_deployed_secrets (line 50) | def _load_deployed_secrets(path: Path) -> dict:
  function _extract_existing_env_handles (line 58) | def _extract_existing_env_handles(data: dict) -> dict[str, str]:
  function _persist_deployed_secrets (line 70) | def _persist_deployed_secrets(path: Path, data: dict) -> None:
  function _load_raw_config (line 75) | def _load_raw_config(config_file: Path) -> dict:
  function _write_deployed_config (line 84) | def _write_deployed_config(path: Path, data: dict) -> None:
  function _redact_config_values (line 93) | def _redact_config_values(
  function materialize_deployment_artifacts (line 148) | def materialize_deployment_artifacts(
  function _load_settings_from_app (line 304) | def _load_settings_from_app(config_dir: Path) -> Settings | None:

FILE: src/mcp_agent/cli/cloud/commands/deploy/settings.py
  class DeploymentURLSettings (line 10) | class DeploymentURLSettings(BaseSettings):
    method wrangler_auth_domain (line 24) | def wrangler_auth_domain(self) -> str:
    method wrangler_auth_url (line 29) | def wrangler_auth_url(self) -> str:
    method cloudflare_api_base_url (line 34) | def cloudflare_api_base_url(self) -> str:

FILE: src/mcp_agent/cli/cloud/commands/deploy/validation.py
  function validate_project (line 8) | def validate_project(project_dir: Path):
  function validate_entrypoint (line 53) | def validate_entrypoint(entrypoint_path: Path):

FILE: src/mcp_agent/cli/cloud/commands/deploy/wrangler_wrapper.py
  function _needs_requirements_modification (line 45) | def _needs_requirements_modification(requirements_path: Path) -> bool:
  function _modify_requirements_txt (line 54) | def _modify_requirements_txt(requirements_path: Path) -> None:
  function _handle_wrangler_error (line 61) | def _handle_wrangler_error(e: subprocess.CalledProcessError) -> None:
  function wrangler_deploy (line 120) | def wrangler_deploy(

FILE: src/mcp_agent/cli/cloud/commands/env/main.py
  function _format_env_value (line 34) | def _format_env_value(value: str) -> str:
  function _write_env_file (line 47) | def _write_env_file(path: Path, values: Dict[str, str]) -> None:
  function _confirm_overwrite (line 54) | def _confirm_overwrite(target: Path, force: bool, label: str) -> None:
  function _load_env_file_values (line 64) | def _load_env_file_values(path: Path) -> Dict[str, str]:
  function _ensure_api_key (line 77) | def _ensure_api_key(api_key_option: Optional[str]) -> str:
  function _make_secrets_client (line 86) | def _make_secrets_client(api_url: Optional[str], api_key: str) -> Secret...
  function _resolve_app (line 93) | def _resolve_app(
  function _env_secret_prefix (line 127) | def _env_secret_prefix(app_id: str) -> str:
  function _load_existing_handles (line 131) | def _load_existing_handles(client: SecretsClient, app_id: str) -> Dict[s...
  function list_secrets (line 146) | def list_secrets(
  function add_secret (line 200) | def add_secret(
  function remove_secret (line 287) | def remove_secret(
  function pull_secrets (line 336) | def pull_secrets(

FILE: src/mcp_agent/cli/cloud/commands/logger/configure/main.py
  function configure_logger (line 18) | def configure_logger(
  function _find_config_file (line 134) | def _find_config_file() -> Optional[Path]:
  function _load_config (line 145) | def _load_config(config_path: Path) -> dict:

FILE: src/mcp_agent/cli/cloud/commands/logger/tail/main.py
  function tail_logs (line 37) | def tail_logs(
  function _fetch_logs (line 184) | async def _fetch_logs(
  function _stream_logs (line 267) | async def _stream_logs(
  function _filter_logs (line 364) | def _filter_logs(
  function _matches_pattern (line 384) | def _matches_pattern(message: str, pattern: str) -> bool:
  function _clean_log_entry (line 393) | def _clean_log_entry(entry: Dict[str, Any]) -> Dict[str, Any]:
  function _display_text_log_entry (line 402) | def _display_text_log_entry(entry: Dict[str, Any]) -> None:
  function _display_logs (line 420) | def _display_logs(
  function _display_log_entry (line 441) | def _display_log_entry(log_entry: Dict[str, Any], format: str = "text") ...
  function _convert_timestamp_to_local (line 453) | def _convert_timestamp_to_local(timestamp: float) -> str:
  function _format_timestamp (line 460) | def _format_timestamp(timestamp_str: str) -> str:
  function _parse_log_level (line 473) | def _parse_log_level(level: str) -> str:
  function _clean_message (line 483) | def _clean_message(message: str) -> str:
  function _get_level_style (line 504) | def _get_level_style(level: str) -> str:

FILE: src/mcp_agent/cli/cloud/commands/servers/delete/main.py
  function delete_server (line 18) | def delete_server(

FILE: src/mcp_agent/cli/cloud/commands/servers/describe/main.py
  function describe_server (line 21) | def describe_server(
  function print_server_description (line 36) | def print_server_description(
  function _print_server_json (line 55) | def _print_server_json(server: Union[MCPApp, MCPAppConfiguration]) -> None:
  function _print_server_yaml (line 61) | def _print_server_yaml(server: Union[MCPApp, MCPAppConfiguration]) -> None:
  function _server_to_dict (line 67) | def _server_to_dict(server: Union[MCPApp, MCPAppConfiguration]) -> dict:
  function _print_server_text (line 109) | def _print_server_text(server: Union[MCPApp, MCPAppConfiguration]) -> None:
  function _server_status_text (line 168) | def _server_status_text(status: str) -> str:

FILE: src/mcp_agent/cli/cloud/commands/servers/list/main.py
  function list_servers (line 22) | def list_servers(
  function _apply_filter (line 91) | def _apply_filter(
  function _apply_sort (line 146) | def _apply_sort(
  function _print_servers_text (line 212) | def _print_servers_text(
  function _print_servers_json (line 252) | def _print_servers_json(
  function _print_servers_yaml (line 263) | def _print_servers_yaml(
  function _server_to_dict (line 274) | def _server_to_dict(server: MCPApp) -> dict:
  function _server_config_to_dict (line 294) | def _server_config_to_dict(config: MCPAppConfiguration) -> dict:
  function print_info_header (line 317) | def print_info_header() -> None:
  function print_servers (line 330) | def print_servers(servers: List[MCPApp]) -> None:
  function print_server_configs (line 361) | def print_server_configs(server_configs: List[MCPAppConfiguration]) -> N...
  function _server_status_text (line 405) | def _server_status_text(status: str) -> str:
  function _format_deploy_meta (line 415) | def _format_deploy_meta(meta) -> Optional[str]:

FILE: src/mcp_agent/cli/cloud/commands/utils.py
  function setup_authenticated_client (line 20) | def setup_authenticated_client() -> MCPAppClient:
  function validate_output_format (line 41) | def validate_output_format(format: str) -> None:
  function resolve_server_async (line 58) | async def resolve_server_async(
  function resolve_server (line 97) | def resolve_server(
  function handle_server_api_errors (line 104) | def handle_server_api_errors(func):
  function get_server_name (line 134) | def get_server_name(server: Union[MCPApp, MCPAppConfiguration]) -> str:
  function get_server_id (line 149) | def get_server_id(server: Union[MCPApp, MCPAppConfiguration]) -> str:
  function clean_server_status (line 164) | def clean_server_status(status: str) -> str:
  function get_app_defaults_from_config (line 181) | def get_app_defaults_from_config(

FILE: src/mcp_agent/cli/cloud/commands/workflows/cancel/main.py
  function _cancel_workflow_async (line 19) | async def _cancel_workflow_async(
  function cancel_workflow (line 79) | def cancel_workflow(

FILE: src/mcp_agent/cli/cloud/commands/workflows/describe/main.py
  function _describe_workflow_async (line 24) | async def _describe_workflow_async(
  function describe_workflow (line 77) | def describe_workflow(
  function print_workflow_status (line 104) | def print_workflow_status(workflow_status: WorkflowRun, format: str = "t...

FILE: src/mcp_agent/cli/cloud/commands/workflows/list/main.py
  function _list_workflows_async (line 23) | async def _list_workflows_async(
  function list_workflows (line 93) | def list_workflows(

FILE: src/mcp_agent/cli/cloud/commands/workflows/resume/main.py
  function _signal_workflow_async (line 20) | async def _signal_workflow_async(
  function resume_workflow (line 119) | def resume_workflow(
  function suspend_workflow (line 158) | def suspend_workflow(

FILE: src/mcp_agent/cli/cloud/commands/workflows/runs/main.py
  function _list_workflow_runs_async (line 25) | async def _list_workflow_runs_async(
  function list_workflow_runs (line 92) | def list_workflow_runs(
  function _get_status_filter (line 123) | def _get_status_filter(status: str) -> str:
  function _matches_status (line 149) | def _matches_status(workflow, status_filter: str) -> bool:
  function _print_workflows_json (line 167) | def _print_workflows_json(workflows: list[WorkflowRun]):
  function _print_workflows_yaml (line 173) | def _print_workflows_yaml(workflows: list[WorkflowRun]):

FILE: src/mcp_agent/cli/cloud/commands/workflows/utils.py
  function format_workflow_status (line 15) | def format_workflow_status(status: Optional[str] = None) -> str:
  function clean_run_parameters (line 41) | def clean_run_parameters(schema: dict) -> dict:
  function print_workflows (line 54) | def print_workflows(workflows: list[Workflow]) -> None:
  function print_workflow_runs (line 115) | def print_workflow_runs(

FILE: src/mcp_agent/cli/cloud/main.py
  function callback (line 175) | def callback(
  function run (line 188) | def run() -> None:

FILE: src/mcp_agent/cli/commands/build.py
  function _check_command (line 30) | def _check_command(cmd: str) -> tuple[bool, str]:
  function _check_url (line 54) | def _check_url(url: str, timeout: float = 2.0) -> tuple[bool, str]:
  function _check_environment_vars (line 79) | def _check_environment_vars(settings: Settings) -> Dict[str, Any]:
  function _check_file_permissions (line 92) | def _check_file_permissions(path: Path) -> Dict[str, Any]:
  function _check_dependencies (line 117) | def _check_dependencies() -> Dict[str, Any]:
  function _check_network_connectivity (line 148) | def _check_network_connectivity() -> Dict[str, bool]:
  function _validate_config_schema (line 169) | def _validate_config_schema(settings: Settings) -> List[str]:
  function build (line 193) | def build(
  function validate (line 441) | def validate(

FILE: src/mcp_agent/cli/commands/chat.py
  function _run_single_model (line 32) | async def _run_single_model(
  function chat (line 93) | def chat(

FILE: src/mcp_agent/cli/commands/check.py
  function _find_files (line 25) | def _find_files() -> dict[str, Optional[Path]]:
  function _get_system_info (line 32) | def _get_system_info() -> dict:
  function _config_summary (line 40) | def _config_summary(config_path: Optional[Path]) -> dict:
  function check (line 65) | def check() -> None:

FILE: src/mcp_agent/cli/commands/config.py
  function _find_config_file (line 28) | def _find_config_file() -> Optional[Path]:
  function _find_secrets_file (line 32) | def _find_secrets_file() -> Optional[Path]:
  function _load_template (line 36) | def _load_template(template_name: str) -> str:
  function show (line 53) | def show(
  function check (line 124) | def check(
  function edit (line 278) | def edit(
  function builder (line 335) | def builder(
  function validate (line 608) | def validate(

FILE: src/mcp_agent/cli/commands/configure.py
  function _build_server_entry (line 29) | def _build_server_entry(url: str, name: str | None = None) -> dict:
  function _merge_mcp_json (line 47) | def _merge_mcp_json(existing: dict, addition: dict) -> dict:
  function _write_json (line 65) | def _write_json(path: Path, data: dict) -> None:
  function _print_output (line 70) | def _print_output(data: dict, fmt: str) -> None:
  function configure (line 84) | def configure(

FILE: src/mcp_agent/cli/commands/dev.py
  function dev (line 26) | def dev(script: Path = typer.Option(None, "--script")) -> None:

FILE: src/mcp_agent/cli/commands/doctor.py
  function _check_host (line 27) | def _check_host(url: str, timeout: float = 1.5) -> bool:
  function _check_config_file (line 42) | def _check_config_file(path: Optional[Path]) -> Tuple[str, Optional[str]]:
  function _check_secrets_file (line 56) | def _check_secrets_file(path: Optional[Path]) -> Tuple[str, Optional[str...
  function _check_provider_keys (line 71) | def _check_provider_keys(settings: Settings, secrets: dict) -> dict:
  function _check_command_availability (line 103) | def _check_command_availability() -> dict:
  function _generate_suggestions (line 117) | def _generate_suggestions(
  function doctor (line 197) | def doctor() -> None:

FILE: src/mcp_agent/cli/commands/go.py
  function _resolve_instruction_arg (line 35) | def _resolve_instruction_arg(instruction: Optional[str]) -> Optional[str]:
  function _run_agent (line 66) | async def _run_agent(
  function _parse_stdio_commands (line 242) | def _parse_stdio_commands(cmds: List[str] | None) -> Dict[str, Dict[str,...
  function go (line 259) | def go(

FILE: src/mcp_agent/cli/commands/init.py
  function _load_template (line 20) | def _load_template(template_name: str) -> str:
  function _write (line 34) | def _write(path: Path, content: str, force: bool) -> bool:
  function _write_readme (line 49) | def _write_readme(dir_path: Path, content: str, force: bool) -> str | None:
  function _copy_pkg_tree (line 78) | def _copy_pkg_tree(pkg_rel: str, dst: Path, force: bool) -> int:
  function init (line 111) | def init(
  function interactive (line 443) | def interactive(

FILE: src/mcp_agent/cli/commands/install.py
  function _get_claude_desktop_config_path (line 52) | def _get_claude_desktop_config_path() -> Path:
  function _merge_mcp_json (line 86) | def _merge_mcp_json(
  function _redact_secrets (line 135) | def _redact_secrets(data: dict) -> dict:
  function _write_json (line 159) | def _write_json(path: Path, data: dict) -> None:
  function _build_server_config (line 184) | def _build_server_config(
  function install (line 234) | def install(

FILE: src/mcp_agent/cli/commands/invoke.py
  function invoke (line 28) | def invoke(

FILE: src/mcp_agent/cli/commands/keys.py
  function _validate_key (line 91) | def _validate_key(provider: str, key: str) -> Tuple[bool, str]:
  function _mask_key (line 112) | def _mask_key(key: str, show_chars: int = 4) -> str:
  function _test_key (line 121) | async def _test_key(provider: str, key: str) -> Tuple[bool, str]:
  function show (line 167) | def show(
  function set_key (line 274) | def set_key(
  function unset (line 397) | def unset(
  function test (line 447) | def test(
  function rotate (line 564) | def rotate(
  function export (line 637) | def export(

FILE: src/mcp_agent/cli/commands/logs.py
  function _resolve_log_file (line 24) | def _resolve_log_file(explicit: Path | None) -> Path | None:
  function _parse_rfc3339 (line 51) | def _parse_rfc3339(ts: str) -> datetime | None:
  function _parse_duration (line 61) | def _parse_duration(s: str) -> timedelta | None:
  function _level_value (line 97) | def _level_value(level: str | None) -> int:
  function _extract_tokens (line 105) | def _extract_tokens(data: Any) -> int:
  function _filter_time (line 139) | def _filter_time(
  function logs (line 158) | def logs(

FILE: src/mcp_agent/cli/commands/models.py
  function list_models (line 21) | def list_models(
  function set_default (line 78) | def set_default(

FILE: src/mcp_agent/cli/commands/serve.py
  class ServerMonitor (line 30) | class ServerMonitor:
    method __init__ (line 33) | def __init__(self):
    method get_stats (line 40) | def get_stats(self) -> dict:
  function _create_status_table (line 57) | def _create_status_table(monitor: ServerMonitor, transport: str, address...
  function serve (line 77) | def serve(
  function test (line 383) | def test(
  function generate (line 483) | def generate(

FILE: src/mcp_agent/cli/commands/server.py
  function _load_config_yaml (line 275) | def _load_config_yaml(path: Settings | None = None):
  function _persist_server_entry (line 288) | def _persist_server_entry(name: str, settings: MCPServerSettings) -> None:
  function _check_command_available (line 328) | def _check_command_available(cmd: str) -> bool:
  function list_servers (line 336) | def list_servers(
  function list_recipes (line 386) | def list_recipes(
  function add (line 429) | def add(
  function remove_server (line 649) | def remove_server(
  function test (line 688) | def test(
  function import_claude (line 807) | def import_claude(
  function import_cursor (line 885) | def import_cursor() -> None:
  function import_vscode (line 919) | def import_vscode() -> None:
  function import_mcp_json (line 954) | def import_mcp_json(path: str = typer.Argument(..., help="Path to mcp.js...
  function import_dxt (line 976) | def import_dxt(
  function import_smithery (line 1005) | def import_smithery(
  function discover_servers (line 1046) | def discover_servers() -> None:

FILE: src/mcp_agent/cli/config/settings.py
  class Settings (line 16) | class Settings(BaseSettings):

FILE: src/mcp_agent/cli/core/api_client.py
  class UnauthenticatedError (line 9) | class UnauthenticatedError(Exception):
  function _raise_for_unauthenticated (line 15) | def _raise_for_unauthenticated(response: httpx.Response):
  function _raise_for_status_with_details (line 29) | def _raise_for_status_with_details(response: httpx.Response) -> None:
  class APIClient (line 53) | class APIClient:
    method __init__ (line 56) | def __init__(self, api_url: str, api_key: str):
    method _get_headers (line 68) | def _get_headers(self) -> Dict[str, str]:
    method post (line 75) | async def post(
    method put (line 89) | async def put(
    method get (line 103) | async def get(self, path: str, timeout: float = 30.0) -> httpx.Response:
    method delete (line 114) | async def delete(

FILE: src/mcp_agent/cli/core/constants.py
  class SecretType (line 36) | class SecretType(Enum):

FILE: src/mcp_agent/cli/core/utils.py
  function run_async (line 12) | def run_async(coro):
  function load_user_app (line 30) | def load_user_app(
  function ensure_mcp_servers (line 87) | def ensure_mcp_servers(app: MCPApp) -> None:
  function detect_default_script (line 96) | def detect_default_script(explicit: Optional[Path]) -> Path:
  function select_servers_from_config (line 118) | def select_servers_from_config(
  function attach_url_servers (line 147) | def attach_url_servers(app: MCPApp, servers: Dict[str, Dict[str, Any]] |...
  function attach_stdio_servers (line 161) | def attach_stdio_servers(

FILE: src/mcp_agent/cli/exceptions.py
  class CLIError (line 4) | class CLIError(Exception):
    method __init__ (line 7) | def __init__(self, message: str, exit_code: int = 1, retriable: bool =...

FILE: src/mcp_agent/cli/main.py
  function _dev_group_entry (line 77) | def _dev_group_entry(
  function _print_version (line 92) | def _print_version() -> None:
  function main (line 103) | def main(
  function run (line 195) | def run() -> None:

FILE: src/mcp_agent/cli/main_bootstrap.py
  function run (line 12) | def run() -> None:

FILE: src/mcp_agent/cli/mcp_app/api_client.py
  class AppServerInfo (line 12) | class AppServerInfo(BaseModel):
  class MCPApp (line 23) | class MCPApp(BaseModel):
  class MCPAppConfiguration (line 36) | class MCPAppConfiguration(BaseModel):
  class ListAppsResponse (line 44) | class ListAppsResponse(BaseModel):
  class ListAppConfigurationsResponse (line 52) | class ListAppConfigurationsResponse(BaseModel):
  class CanDoActionCheck (line 60) | class CanDoActionCheck(BaseModel):
  class CanDoActionsResponse (line 65) | class CanDoActionsResponse(BaseModel):
  function is_valid_app_id_format (line 73) | def is_valid_app_id_format(app_id: str) -> bool:
  function is_valid_app_config_id_format (line 85) | def is_valid_app_config_id_format(app_config_id: str) -> bool:
  function is_valid_server_url_format (line 97) | def is_valid_server_url_format(server_url: str) -> bool:
  class LogEntry (line 110) | class LogEntry(BaseModel):
    class Config (line 118) | class Config:
  class GetAppLogsResponse (line 122) | class GetAppLogsResponse(BaseModel):
    method log_entries_list (line 128) | def log_entries_list(self) -> List[LogEntry]:
  class MCPAppClient (line 133) | class MCPAppClient(APIClient):
    method create_app (line 136) | async def create_app(
    method get_app (line 177) | async def get_app(
    method get_app_configuration (line 216) | async def get_app_configuration(
    method update_app (line 259) | async def update_app(
    method get_app_or_config (line 313) | async def get_app_or_config(
    method get_app_by_name (line 351) | async def get_app_by_name(self, name: str) -> Optional[MCPApp]:
    method get_app_id_by_name (line 375) | async def get_app_id_by_name(self, name: str) -> Optional[str]:
    method deploy_app (line 392) | async def deploy_app(
    method configure_app (line 430) | async def configure_app(
    method list_config_params (line 469) | async def list_config_params(self, app_server_url: str) -> List[str]:
    method list_apps (line 491) | async def list_apps(
    method list_app_configurations (line 523) | async def list_app_configurations(
    method delete_app (line 558) | async def delete_app(self, app_id: str) -> str:
    method delete_app_configuration (line 591) | async def delete_app_configuration(self, app_config_id: str) -> str:
    method _can_do_action (line 626) | async def _can_do_action(self, resource_name: str, action: str) -> bool:
    method can_delete_app (line 660) | async def can_delete_app(self, app_id: str) -> bool:
    method can_delete_app_configuration (line 682) | async def can_delete_app_configuration(self, app_config_id: str) -> bool:
    method get_app_logs (line 704) | async def get_app_logs(

FILE: src/mcp_agent/cli/mcp_app/mcp_client.py
  class Workflow (line 24) | class Workflow(BaseModel):
  class ListWorkflowsResult (line 42) | class ListWorkflowsResult(BaseModel):
  class WorkflowRunState (line 48) | class WorkflowRunState(BaseModel):
  class WorkflowRunResult (line 64) | class WorkflowRunResult(BaseModel):
  class WorkflowRunTemporal (line 83) | class WorkflowRunTemporal(BaseModel):
  class WorkflowRun (line 111) | class WorkflowRun(BaseModel):
  class ListWorkflowRunsResult (line 142) | class ListWorkflowRunsResult(BaseModel):
  class MCPClientSession (line 149) | class MCPClientSession(ClientSession):
    method list_workflows (line 152) | async def list_workflows(self) -> ListWorkflowsResult:
    method list_workflow_runs (line 181) | async def list_workflow_runs(
    method deserialize_workflow_run (line 273) | def deserialize_workflow_run(text: str) -> WorkflowRun:
    method get_workflow_status (line 292) | async def get_workflow_status(
    method cancel_workflow (line 327) | async def cancel_workflow(self, run_id: str) -> bool:
    method resume_workflow (line 354) | async def resume_workflow(
  class TransportType (line 389) | class TransportType(Enum):
  class MCPClient (line 396) | class MCPClient:
    method __init__ (line 399) | def __init__(
    method _create_client (line 409) | def _create_client(self):
    method client_session (line 428) | async def client_session(self) -> AsyncGenerator[MCPClientSession, None]:
  function mcp_connection_session (line 451) | async def mcp_connection_session(server_url: str, api_key: str):

FILE: src/mcp_agent/cli/mcp_app/mock_client.py
  class MockMCPAppClient (line 22) | class MockMCPAppClient:
    method __init__ (line 25) | def __init__(self, api_url: str = "http://mock-api", api_key: str = "m...
    method get_app_id_by_name (line 36) | async def get_app_id_by_name(self, name: str) -> Optional[str]:
    method get_app (line 47) | async def get_app(
    method create_app (line 91) | async def create_app(
    method update_app (line 140) | async def update_app(
    method configure_app (line 171) | async def configure_app(
    method list_config_params (line 224) | async def list_config_params(self, app_server_url: str) -> List[str]:

FILE: src/mcp_agent/cli/secrets/api_client.py
  class SecretsClient (line 12) | class SecretsClient(APIClient):
    method create_secret (line 15) | async def create_secret(
    method get_secret_value (line 72) | async def get_secret_value(self, handle: str) -> str:
    method set_secret_value (line 100) | async def set_secret_value(self, handle: str, value: str) -> bool:
    method list_secrets (line 132) | async def list_secrets(
    method delete_secret (line 160) | async def delete_secret(self, handle: str) -> str:
    method _is_valid_handle (line 193) | def _is_valid_handle(self, handle: str) -> bool:

FILE: src/mcp_agent/cli/secrets/mock_client.py
  class MockSecretsClient (line 15) | class MockSecretsClient(SecretsClient):
    method __init__ (line 18) | def __init__(self, api_url: str = "http://mock-api", api_key: str = "m...
    method create_secret (line 30) | async def create_secret(
    method get_secret_value (line 70) | async def get_secret_value(self, handle: str) -> str:
    method set_secret_value (line 87) | async def set_secret_value(self, handle: str, value: str) -> bool:
    method list_secrets (line 103) | async def list_secrets(
    method delete_secret (line 132) | async def delete_secret(self, handle: str) -> str:

FILE: src/mcp_agent/cli/secrets/processor.py
  function process_config_secrets (line 41) | async def process_config_secrets(
  function process_secrets_in_config_str (line 156) | async def process_secrets_in_config_str(
  function get_validated_config_secrets (line 227) | async def get_validated_config_secrets(
  function transform_config_recursive (line 331) | async def transform_config_recursive(
  function configure_user_secrets (line 547) | async def configure_user_secrets(
  function nest_keys (line 629) | def nest_keys(flat_dict: dict[str, str]) -> dict:
  function get_nested_key_value (line 641) | def get_nested_key_value(config: dict, dotted_key: str) -> Any:
  function retrieve_secrets_from_config (line 651) | def retrieve_secrets_from_config(
  function process_prompted_user_secrets (line 689) | async def process_prompted_user_secrets(

FILE: src/mcp_agent/cli/secrets/resolver.py
  class SafeSecretsConfig (line 14) | class SafeSecretsConfig(BaseModel):
  class SecretsResolver (line 27) | class SecretsResolver:
    method __init__ (line 30) | def __init__(self, client: SecretsClient):
    method _is_secret_handle (line 39) | def _is_secret_handle(self, value: Any) -> bool:
    method load_config (line 43) | def load_config(self, config_path: str) -> SafeSecretsConfig:
    method resolve_in_place (line 88) | async def resolve_in_place(self, config: Dict[str, Any]) -> Dict[str, ...

FILE: src/mcp_agent/cli/secrets/yaml_tags.py
  class SecretTag (line 14) | class SecretTag:
    method __init__ (line 17) | def __init__(self, value=None):
    method __repr__ (line 20) | def __repr__(self):
  class UserSecret (line 24) | class UserSecret(SecretTag):
  class DeveloperSecret (line 30) | class DeveloperSecret(SecretTag):
  function construct_user_secret (line 36) | def construct_user_secret(loader, node):
  function construct_developer_secret (line 48) | def construct_developer_secret(loader, node):
  function represent_user_secret (line 60) | def represent_user_secret(dumper, data):
  function represent_developer_secret (line 68) | def represent_developer_secret(dumper, data):
  class SecretYamlLoader (line 76) | class SecretYamlLoader(SafeLoader):
  class SecretYamlDumper (line 82) | class SecretYamlDumper(yaml.SafeDumper):
  function load_yaml_with_secrets (line 97) | def load_yaml_with_secrets(yaml_str):
  function dump_yaml_with_secrets (line 110) | def dump_yaml_with_secrets(data):

FILE: src/mcp_agent/cli/utils/display.py
  class ParallelResultsDisplay (line 13) | class ParallelResultsDisplay:
    method __init__ (line 16) | def __init__(self):
    method show_results (line 19) | def show_results(self, results: List[tuple[str, str]]) -> None:
  class TokenUsageDisplay (line 61) | class TokenUsageDisplay:
    method __init__ (line 64) | def __init__(self):
    method show_summary (line 67) | def show_summary(self, summary: Dict[str, Any]) -> None:
  function format_tool_list (line 103) | def format_tool_list(tools: List[Any], server_name: Optional[str] = None...
  function format_resource_list (line 125) | def format_resource_list(
  function format_server_list (line 152) | def format_server_list(servers: List[str]) -> None:
  function show_progress (line 167) | def show_progress(message: str) -> None:
  function show_error (line 172) | def show_error(message: str) -> None:
  function show_success (line 177) | def show_success(message: str) -> None:
  function show_warning (line 182) | def show_warning(message: str) -> None:

FILE: src/mcp_agent/cli/utils/git_utils.py
  class GitMetadata (line 20) | class GitMetadata:
  function _run_git (line 31) | def _run_git(args: list[str], cwd: Path) -> Optional[str]:
  function get_git_metadata (line 52) | def get_git_metadata(project_dir: Path) -> Optional[GitMetadata]:
  function utc_iso_now (line 88) | def utc_iso_now() -> str:
  function compute_directory_hash (line 92) | def compute_directory_hash(root: Path, *, ignore_names: set[str] | None ...
  function compute_directory_fingerprint (line 130) | def compute_directory_fingerprint(
  function create_git_tag (line 170) | def create_git_tag(project_dir: Path, tag_name: str, message: str) -> bool:
  function sanitize_git_ref_component (line 190) | def sanitize_git_ref_component(name: str) -> str:

FILE: src/mcp_agent/cli/utils/importers.py
  function _detect_transport (line 15) | def _detect_transport(obj: dict) -> str:
  function _to_settings (line 23) | def _to_settings(obj: dict) -> MCPServerSettings:
  function import_servers_from_mcp_json (line 41) | def import_servers_from_mcp_json(path: Path) -> Dict[str, MCPServerSetti...

FILE: src/mcp_agent/cli/utils/retry.py
  class RetryError (line 12) | class RetryError(Exception):
    method __init__ (line 15) | def __init__(self, original_error: Exception, attempts: int):
  function is_retryable_error (line 23) | def is_retryable_error(error: Exception) -> bool:
  function retry_with_exponential_backoff (line 41) | def retry_with_exponential_backoff(
  function retry_async_with_exponential_backoff (line 101) | async def retry_async_with_exponential_backoff(

FILE: src/mcp_agent/cli/utils/typer_utils.py
  class HelpfulTyperGroup (line 13) | class HelpfulTyperGroup(TyperGroup):
    method resolve_command (line 16) | def resolve_command(self, ctx, args):
    method invoke (line 33) | def invoke(self, ctx):

FILE: src/mcp_agent/cli/utils/url_parser.py
  function parse_server_url (line 13) | def parse_server_url(url: str) -> Tuple[str, Literal["http", "sse"], str]:
  function generate_server_name (line 41) | def generate_server_name(url: str) -> str:
  function parse_server_urls (line 60) | def parse_server_urls(
  function generate_server_configs (line 74) | def generate_server_configs(

FILE: src/mcp_agent/cli/utils/ux.py
  function _create_label (line 38) | def _create_label(text: str, style: str) -> str:
  function print_info (line 44) | def print_info(
  function print_verbose (line 65) | def print_verbose(
  function print_success (line 80) | def print_success(
  function print_warning (line 95) | def print_warning(
  function print_error (line 110) | def print_error(
  function print_secret_summary (line 125) | def print_secret_summary(secrets_context: Dict[str, Any]) -> None:
  function print_secrets_summary (line 141) | def print_secrets_summary(
  function print_deployment_header (line 216) | def print_deployment_header(
  function print_configuration_header (line 268) | def print_configuration_header(

FILE: src/mcp_agent/cli/utils/version_check.py
  function _get_installed_version (line 25) | def _get_installed_version() -> Optional[str]:
  function _parse_version (line 34) | def _parse_version(s: str):
  function _simple_version_tuple (line 45) | def _simple_version_tuple(s: str):
  function _is_outdated (line 62) | def _is_outdated(current: str, latest: str) -> bool:
  function _fetch_latest_version (line 70) | def _fetch_latest_version(timeout_seconds: float = 5.0) -> Optional[str]:
  function _run_version_check (line 88) | def _run_version_check() -> None:
  function _spawn_version_check_thread (line 109) | def _spawn_version_check_thread() -> None:
  function _flush_version_check_message (line 118) | def _flush_version_check_message(timeout: float = 0.5) -> None:
  function maybe_warn_newer_version (line 129) | def maybe_warn_newer_version() -> None:

FILE: src/mcp_agent/cli/workflows/api_client.py
  class WorkflowInfo (line 11) | class WorkflowInfo(BaseModel):
  class WorkflowAPIClient (line 22) | class WorkflowAPIClient(APIClient):
    method get_workflow (line 26) | async def get_workflow(self, workflow_id: str) -> WorkflowInfo:

FILE: src/mcp_agent/config.py
  class MCPAuthorizationServerSettings (line 30) | class MCPAuthorizationServerSettings(BaseModel):
    method _validate_required_urls (line 71) | def _validate_required_urls(self) -> "MCPAuthorizationServerSettings":
  class MCPOAuthClientSettings (line 88) | class MCPOAuthClientSettings(BaseModel):
  class OAuthTokenStoreSettings (line 143) | class OAuthTokenStoreSettings(BaseModel):
  class OAuthSettings (line 161) | class OAuthSettings(BaseModel):
  class MCPServerAuthSettings (line 182) | class MCPServerAuthSettings(BaseModel):
  class MCPRootSettings (line 191) | class MCPRootSettings(BaseModel):
    method validate_uri (line 205) | def validate_uri(cls, v: str) -> str:
  class MCPServerSettings (line 214) | class MCPServerSettings(BaseModel):
  class MCPSettings (line 284) | class MCPSettings(BaseModel):
    method none_to_dict (line 291) | def none_to_dict(cls, v):
  class VertexAIMixin (line 295) | class VertexAIMixin(BaseModel):
  class BedrockMixin (line 313) | class BedrockMixin(BaseModel):
  class BedrockSettings (line 344) | class BedrockSettings(BaseSettings, BedrockMixin):
  class AnthropicSettings (line 358) | class AnthropicSettings(BaseSettings, VertexAIMixin, BedrockMixin):
  class CohereSettings (line 392) | class CohereSettings(BaseSettings):
  class OpenAISettings (line 411) | class OpenAISettings(BaseSettings):
  class LMStudioSettings (line 461) | class LMStudioSettings(OpenAISettings):
  class AzureSettings (line 503) | class AzureSettings(BaseSettings):
  class GoogleSettings (line 585) | class GoogleSettings(BaseSettings, VertexAIMixin):
  class VertexAISettings (line 620) | class VertexAISettings(BaseSettings, VertexAIMixin):
  class SubagentSettings (line 632) | class SubagentSettings(BaseModel):
  class TemporalSettings (line 660) | class TemporalSettings(BaseModel):
  class WorkflowTaskRetryPolicy (line 685) | class WorkflowTaskRetryPolicy(BaseModel):
    method _coerce_interval (line 702) | def _coerce_interval(cls, value):
    method to_temporal_kwargs (line 721) | def to_temporal_kwargs(self) -> Dict[str, Any]:
  class UsageTelemetrySettings (line 736) | class UsageTelemetrySettings(BaseModel):
  class TracePathSettings (line 751) | class TracePathSettings(BaseModel):
  class TraceOTLPSettings (line 777) | class TraceOTLPSettings(BaseModel):
  class ConsoleExporterSettings (line 791) | class ConsoleExporterSettings(BaseModel):
  class FileExporterSettings (line 797) | class FileExporterSettings(BaseModel):
  class OTLPExporterSettings (line 806) | class OTLPExporterSettings(BaseModel):
  class OpenTelemetrySettings (line 820) | class OpenTelemetrySettings(BaseModel):
    method _coerce_exporters_schema (line 864) | def _coerce_exporters_schema(cls, data: Dict) -> Dict:
    method _finalize_exporters (line 934) | def _finalize_exporters(cls, values: "OpenTelemetrySettings"):
  class LogPathSettings (line 1060) | class LogPathSettings(BaseModel):
  class LoggerSettings (line 1088) | class LoggerSettings(BaseModel):
  class Settings (line 1136) | class Settings(BaseSettings):
    method __eq__ (line 1214) | def __eq__(self, other):  # type: ignore[override]
    method find_config (line 1221) | def find_config(cls) -> Path | None:
    method find_secrets (line 1226) | def find_secrets(cls) -> Path | None:
    method _find_config (line 1231) | def _find_config(cls, filenames: List[str]) -> Path | None:
    method _validate_env (line 1273) | def _validate_env(
    method iter_env_specs (line 1307) | def iter_env_specs(self) -> Iterable[tuple[str, str | None]]:
  class PreloadSettings (line 1321) | class PreloadSettings(BaseSettings):
  function _clear_global_settings (line 1347) | def _clear_global_settings():
  function _set_and_warn_global_settings (line 1355) | def _set_and_warn_global_settings(settings: Settings) -> None:
  function _check_file_exists (line 1369) | def _check_file_exists(file_path: (str | Path)) -> bool:
  function _read_file_content (line 1374) | def _read_file_content(file_path: (str | Path)) -> str:
  function _load_yaml_from_string (line 1380) | def _load_yaml_from_string(yaml_content: str) -> dict:
  function get_settings (line 1385) | def get_settings(config_path: str | None = None, set_global: bool = True...

FILE: src/mcp_agent/core/context.py
  class Context (line 66) | class Context(MCPContext):
    method upstream_session (line 117) | def upstream_session(self) -> ServerSession | None:  # type: ignore[ov...
    method upstream_session (line 150) | def upstream_session(self, value: ServerSession | None) -> None:
    method mcp (line 154) | def mcp(self) -> FastMCP | None:
    method fastmcp (line 158) | def fastmcp(self) -> FastMCP | None:  # type: ignore[override]
    method session (line 176) | def session(self) -> ServerSession | None:
    method logger (line 215) | def logger(self) -> "Logger":
    method name (line 235) | def name(self) -> str | None:
    method description (line 241) | def description(self) -> str | None:
    method bind_request (line 248) | def bind_request(
    method client_id (line 279) | def client_id(self) -> str | None:  # type: ignore[override]
    method request_id (line 286) | def request_id(self) -> str:  # type: ignore[override]
    method log (line 296) | async def log(
    method report_progress (line 337) | async def report_progress(
    method read_resource (line 352) | async def read_resource(self, uri: Any) -> Any:  # type: ignore[override]
  function configure_otel (line 376) | async def configure_otel(
  function configure_logger (line 393) | async def configure_logger(
  function configure_usage_telemetry (line 416) | async def configure_usage_telemetry(_config: "Settings"):
  function configure_executor (line 424) | async def configure_executor(config: "Settings"):
  function configure_workflow_registry (line 442) | async def configure_workflow_registry(config: "Settings", executor: Exec...
  function initialize_context (line 459) | async def initialize_context(
  function cleanup_context (line 522) | async def cleanup_context(shutdown_logger: bool = False):
  function get_current_context (line 549) | def get_current_context() -> Context:
  function get_current_config (line 585) | def get_current_config():

FILE: src/mcp_agent/core/context_dependent.py
  class ContextDependent (line 9) | class ContextDependent:
    method __init__ (line 15) | def __init__(self, context: Optional["Context"] = None, **kwargs):
    method context (line 20) | def context(self) -> "Context":
    method use_context (line 41) | def use_context(self, context: "Context"):

FILE: src/mcp_agent/core/exceptions.py
  class MCPAgentError (line 7) | class MCPAgentError(Exception):
    method __init__ (line 10) | def __init__(self, message: str, details: str = ""):
  class ServerConfigError (line 16) | class ServerConfigError(MCPAgentError):
    method __init__ (line 21) | def __init__(self, message: str, details: str = ""):
  class AgentConfigError (line 25) | class AgentConfigError(MCPAgentError):
    method __init__ (line 30) | def __init__(self, message: str, details: str = ""):
  class ProviderKeyError (line 34) | class ProviderKeyError(MCPAgentError):
    method __init__ (line 39) | def __init__(self, message: str, details: str = ""):
  class ServerInitializationError (line 43) | class ServerInitializationError(MCPAgentError):
    method __init__ (line 46) | def __init__(self, message: str, details: str = ""):
  class ModelConfigError (line 50) | class ModelConfigError(MCPAgentError):
    method __init__ (line 55) | def __init__(self, message: str, details: str = ""):
  class CircularDependencyError (line 59) | class CircularDependencyError(MCPAgentError):
    method __init__ (line 62) | def __init__(self, message: str, details: str = ""):
  class PromptExitError (line 66) | class PromptExitError(MCPAgentError):
    method __init__ (line 70) | def __init__(self, message: str, details: str = ""):

FILE: src/mcp_agent/core/request_context.py
  function set_current_request_context (line 19) | def set_current_request_context(ctx: Optional["Context"]) -> Token:
  function reset_current_request_context (line 24) | def reset_current_request_context(token: Token | None) -> None:
  function get_current_request_context (line 34) | def get_current_request_context() -> Optional["Context"]:

FILE: src/mcp_agent/data/examples/cloud/agent_factory/custom_tasks.py
  function knowledge_base_lookup_task (line 47) | async def knowledge_base_lookup_task(request: dict) -> List[str]:
  function _score (line 76) | def _score(query: str, entry: Dict[str, str]) -> int:

FILE: src/mcp_agent/data/examples/cloud/agent_factory/main.py
  function route_customer_request (line 28) | async def route_customer_request(
  function main (line 63) | async def main():

FILE: src/mcp_agent/data/examples/cloud/agent_factory/run_worker.py
  function main (line 14) | async def main():

FILE: src/mcp_agent/data/examples/cloud/chatgpt_app/main.py
  class CoinFlipWidget (line 24) | class CoinFlipWidget:
  function _resource_description (line 96) | def _resource_description() -> str:
  function _embedded_widget_resource (line 100) | def _embedded_widget_resource() -> types.EmbeddedResource:
  function _tool_meta (line 112) | def _tool_meta() -> Dict[str, Any]:
  function flip_coin (line 135) | async def flip_coin() -> Dict[str, str]:
  function get_widget_html (line 147) | def get_widget_html() -> str:
  function main (line 157) | async def main():

FILE: src/mcp_agent/data/examples/cloud/chatgpt_app/web/src/components/App.tsx
  function App (line 7) | function App() {

FILE: src/mcp_agent/data/examples/cloud/chatgpt_app/web/src/components/Coin.tsx
  type CoinProps (line 4) | interface CoinProps {
  function Coin (line 9) | function Coin({ flipResult, onFlipResult }: CoinProps) {

FILE: src/mcp_agent/data/examples/cloud/chatgpt_app/web/src/utils/dev-openai-global.ts
  function setupDevOpenAiGlobal (line 7) | function setupDevOpenAiGlobal(): void {

FILE: src/mcp_agent/data/examples/cloud/chatgpt_app/web/src/utils/hooks/use-openai-global.ts
  function useOpenAiGlobal (line 8) | function useOpenAiGlobal<K extends keyof OpenAiGlobals>(

FILE: src/mcp_agent/data/examples/cloud/chatgpt_app/web/src/utils/hooks/use-theme.ts
  function useTheme (line 4) | function useTheme(): Theme {

FILE: src/mcp_agent/data/examples/cloud/chatgpt_app/web/src/utils/hooks/use-widget-state.ts
  function useWidgetState (line 13) | function useWidgetState<T extends UnknownObject>(

FILE: src/mcp_agent/data/examples/cloud/chatgpt_app/web/src/utils/types.ts
  type CoinFlipWidgetState (line 1) | type CoinFlipWidgetState = {
  type OpenAiGlobals (line 5) | type OpenAiGlobals<
  type API (line 32) | type API = {
  type UnknownObject (line 41) | type UnknownObject = Record<string, unknown>;
  type Theme (line 43) | type Theme = "light" | "dark";
  type SafeAreaInsets (line 45) | type SafeAreaInsets = {
  type SafeArea (line 52) | type SafeArea = {
  type DeviceType (line 56) | type DeviceType = "mobile" | "tablet" | "desktop" | "unknown";
  type UserAgent (line 58) | type UserAgent = {
  type DisplayMode (line 67) | type DisplayMode = "pip" | "inline" | "fullscreen";
  type RequestDisplayMode (line 68) | type RequestDisplayMode = (args: { mode: DisplayMode }) => Promise<{
  type CallToolResponse (line 76) | type CallToolResponse = {
  type CallTool (line 81) | type CallTool = (
  constant SET_GLOBALS_EVENT_TYPE (line 87) | const SET_GLOBALS_EVENT_TYPE = "openai:set_globals";
  class SetGlobalsEvent (line 88) | class SetGlobalsEvent extends CustomEvent<{
  type Window (line 98) | interface Window {
  type WindowEventMap (line 102) | interface WindowEventMap {

FILE: src/mcp_agent/data/examples/cloud/hello_world/main.py
  function hello_world (line 22) | def hello_world() -> str:
  function hello_world_async (line 28) | async def hello_world_async() -> str:
  function main (line 34) | async def main():

FILE: src/mcp_agent/data/examples/cloud/mcp/main.py
  class BasicAgentWorkflow (line 59) | class BasicAgentWorkflow(Workflow[str]):
    method run (line 66) | async def run(self, input: str) -> WorkflowResult[str]:
  function grade_story (line 131) | async def grade_story(story: str, app_ctx: Optional[AppContext] = None) ...
  function grade_story_async (line 195) | async def grade_story_async(story: str, app_ctx: Optional[AppContext] = ...
  function sampling_demo (line 270) | async def sampling_demo(
  function book_table (line 304) | async def book_table(date: str, party_size: int, app_ctx: Context) -> str:
  function notify_resources (line 338) | async def notify_resources(
  function notify_progress (line 355) | async def notify_progress(
  function grade_short_story (line 374) | def grade_short_story(story: str) -> list[PromptMessage]:
  function get_example_short_story (line 388) | def get_example_short_story() -> str:
  function main (line 396) | async def main():

FILE: src/mcp_agent/data/examples/cloud/temporal/main.py
  class BasicAgentWorkflow (line 31) | class BasicAgentWorkflow(Workflow[str]):
    method run (line 38) | async def run(
  function finder_tool (line 88) | async def finder_tool(
  class PauseResumeWorkflow (line 133) | class PauseResumeWorkflow(Workflow[str]):
    method run (line 140) | async def run(
  class SamplingWorkflow (line 182) | class SamplingWorkflow(Workflow[str]):
    method run (line 186) | async def run(self, input: str = "space exploration") -> WorkflowResul...
  class ElicitationWorkflow (line 239) | class ElicitationWorkflow(Workflow[str]):
    method run (line 243) | async def run(self, input: str = "proceed") -> WorkflowResult[str]:
  class NotificationsWorkflow (line 273) | class NotificationsWorkflow(Workflow[str]):
    method run (line 277) | async def run(self, input: str = "notifications-demo") -> WorkflowResu...
  function main (line 295) | async def main():

FILE: src/mcp_agent/data/examples/cloud/temporal/temporal_worker.py
  function main (line 22) | async def main():

FILE: src/mcp_agent/data/examples/mcp_agent_server/asyncio/client.py
  function main (line 30) | async def main():
  function _tool_result_to_json (line 429) | def _tool_result_to_json(tool_result: CallToolResult):

FILE: src/mcp_agent/data/examples/mcp_agent_server/asyncio/main.py
  class BasicAgentWorkflow (line 51) | class BasicAgentWorkflow(Workflow[str]):
    method run (line 58) | async def run(self, input: str) -> WorkflowResult[str]:
  function sampling_demo (line 128) | async def sampling_demo(
  function elicitation_demo (line 173) | async def elicitation_demo(
  function notify_resources (line 212) | async def notify_resources(
  function notify_progress (line 229) | async def notify_progress(
  function grade_story (line 247) | async def grade_story(story: str, app_ctx: Optional[AppContext] = None) ...
  function grade_story_async (line 318) | async def grade_story_async(story: str, app_ctx: Optional[AppContext] = ...
  function get_workflow_token_usage (line 403) | async def get_workflow_token_usage(
  function main (line 498) | async def main():

FILE: src/mcp_agent/data/examples/mcp_agent_server/asyncio/nested_elicitation_server.py
  class Confirmation (line 8) | class Confirmation(BaseModel):
  function confirm_action (line 13) | async def confirm_action(action: str, ctx: Context | None = None) -> str:
  function main (line 31) | def main():

FILE: src/mcp_agent/data/examples/mcp_agent_server/asyncio/nested_sampling_server.py
  function get_haiku (line 8) | async def get_haiku(topic: str, ctx: Context | None = None) -> str:
  function main (line 39) | def main():

FILE: src/mcp_agent/data/examples/mcp_agent_server/elicitation/client.py
  function _make_session (line 26) | def _make_session(
  function main (line 46) | async def main() -> None:

FILE: src/mcp_agent/data/examples/mcp_agent_server/elicitation/server.py
  function confirm_action (line 33) | async def confirm_action(action: str, app_ctx: Optional[AppContext] = No...
  function main (line 75) | async def main() -> None:

FILE: src/mcp_agent/data/examples/mcp_agent_server/notifications/client.py
  function _make_session (line 24) | def _make_session(
  function main (line 44) | async def main() -> None:

FILE: src/mcp_agent/data/examples/mcp_agent_server/notifications/server.py
  function notify (line 27) | def notify(
  function notify_progress (line 47) | async def notify_progress(
  function main (line 65) | async def main() -> None:

FILE: src/mcp_agent/data/examples/mcp_agent_server/reference/client.py
  function _make_session (line 30) | def _make_session(
  function main (line 50) | async def main() -> None:

FILE: src/mcp_agent/data/examples/mcp_agent_server/reference/server.py
  function finder_tool (line 49) | async def finder_tool(request: str, app_ctx: Optional[AppContext] = None...
  function notify (line 73) | def notify(
  function confirm_action (line 93) | async def confirm_action(
  function sample_haiku (line 142) | async def sample_haiku(topic: str, app_ctx: Optional[AppContext] = None)...
  function main (line 162) | async def main() -> None:

FILE: src/mcp_agent/data/examples/mcp_agent_server/sampling/client.py
  function _make_session (line 24) | def _make_session(
  function main (line 44) | async def main() -> None:

FILE: src/mcp_agent/data/examples/mcp_agent_server/sampling/server.py
  function sample_haiku (line 31) | async def sample_haiku(
  function main (line 55) | async def main() -> None:

FILE: src/mcp_agent/data/examples/usecases/mcp_financial_analyzer/main.py
  function main (line 31) | async def main():

FILE: src/mcp_agent/data/examples/usecases/mcp_researcher/main.py
  function example_usage (line 17) | async def example_usage():

FILE: src/mcp_agent/data/examples/workflows/workflow_deep_orchestrator/main.py
  class DeepOrchestratorMonitor (line 42) | class DeepOrchestratorMonitor:
    method __init__ (line 45) | def __init__(self, orchestrator: DeepOrchestrator):
    method get_budget_table (line 49) | def get_budget_table(self) -> Table:
    method get_queue_tree (line 89) | def get_queue_tree(self) -> Tree:
    method get_plan_table (line 175) | def get_plan_table(self) -> Table:
    method get_token_stats_panel (line 213) | async def get_token_stats_panel(self) -> Panel:
    method get_memory_panel (line 261) | def get_memory_panel(self) -> Panel:
    method get_agents_table (line 283) | def get_agents_table(self) -> Table:
    method get_policy_panel (line 309) | def get_policy_panel(self) -> Panel:
    method get_status_summary (line 322) | def get_status_summary(self) -> Panel:
  function create_display_layout (line 336) | def create_display_layout() -> Layout:
  function update_display (line 364) | def update_display(layout: Layout, monitor: DeepOrchestratorMonitor):
  function main (line 400) | async def main():

FILE: src/mcp_agent/data/examples/workflows/workflow_evaluator_optimizer/main.py
  function example_usage (line 29) | async def example_usage(

FILE: src/mcp_agent/data/examples/workflows/workflow_intent_classifier/main.py
  function example_usage (line 17) | async def example_usage() -> str:

FILE: src/mcp_agent/data/examples/workflows/workflow_orchestrator_worker/main.py
  function example_usage (line 94) | async def example_usage() -> str:
  function display_node_tree (line 190) | def display_node_tree(
  function display_run_tree (line 240) | async def display_run_tree(context: Context, name: str):

FILE: src/mcp_agent/data/examples/workflows/workflow_parallel/main.py
  function example_usage (line 40) | async def example_usage():

FILE: src/mcp_agent/data/examples/workflows/workflow_router/main.py
  function print_to_console (line 15) | def print_to_console(message: str):
  function print_hello_world (line 23) | def print_hello_world():
  function example_usage (line 30) | async def example_usage():

FILE: src/mcp_agent/data/examples/workflows/workflow_swarm/main.py
  function escalate_to_agent (line 16) | def escalate_to_agent(reason=None):
  function valid_to_change_flight (line 21) | def valid_to_change_flight():
  function change_flight (line 26) | def change_flight():
  function initiate_refund (line 31) | def initiate_refund():
  function initiate_flight_credits (line 37) | def initiate_flight_credits():
  function case_resolved (line 43) | def case_resolved():
  function initiate_baggage_search (line 71) | def initiate_baggage_search():
  function transfer_to_flight_modification (line 76) | def transfer_to_flight_modification():
  function transfer_to_flight_cancel (line 81) | def transfer_to_flight_cancel():
  function transfer_to_flight_change (line 86) | def transfer_to_flight_change():
  function transfer_to_lost_baggage (line 91) | def transfer_to_lost_baggage():
  function transfer_to_triage (line 96) | def transfer_to_triage():
  function triage_instructions (line 105) | def triage_instructions(context_variables):
  function example_usage (line 203) | async def example_usage():
  function main (line 256) | async def main():

FILE: src/mcp_agent/data/templates/agent_basic.py
  function main (line 25) | async def main():

FILE: src/mcp_agent/data/templates/agent_factory.py
  function route_prompt (line 16) | async def route_prompt(
  function main (line 36) | async def main():

FILE: src/mcp_agent/data/templates/agent_factory_run_worker.py
  function main (line 18) | async def main():

FILE: src/mcp_agent/data/templates/agent_notebook.py
  class NotebookAgent (line 9) | class NotebookAgent:
    method __init__ (line 12) | def __init__(self, name="notebook_agent", model="anthropic.haiku"):
    method __aenter__ (line 27) | async def __aenter__(self):
    method __aexit__ (line 48) | async def __aexit__(self, exc_type, exc_val, exc_tb):
    method chat (line 53) | async def chat(self, message: str) -> str:
    method analyze_file (line 59) | async def analyze_file(self, filepath: str) -> str:
    method summarize_data (line 64) | async def summarize_data(self, data_description: str) -> str:

FILE: src/mcp_agent/data/templates/agent_streamlit.py
  function get_app (line 16) | def get_app():
  function generate_response (line 79) | async def generate_response():

FILE: src/mcp_agent/data/templates/basic_agent.py
  function finder_agent (line 39) | async def finder_agent(request: str, app_ctx: Optional[AppContext] = Non...
  function run_agent (line 73) | async def run_agent(
  function main (line 121) | async def main():

FILE: src/mcp_agent/data/templates/basic_agent_server.py
  class BasicAgentWorkflow (line 42) | class BasicAgentWorkflow(Workflow[str]):
    method run (line 49) | async def run(self, input: str) -> WorkflowResult[str]:
  function grade_story (line 112) | async def grade_story(story: str, app_ctx: Optional[AppContext] = None) ...
  function main (line 182) | async def main():

FILE: src/mcp_agent/data/templates/token_counter.py
  class TokenMonitor (line 28) | class TokenMonitor:
    method __init__ (line 31) | def __init__(self):
    method on_token_update (line 35) | async def on_token_update(self, node: TokenNode, usage: TokenUsage):
  function display_token_usage (line 64) | def display_token_usage(usage: TokenUsage, label: str = "Token Usage"):
  function display_token_summary (line 72) | async def display_token_summary(context: Context):
  function display_node_tree (line 111) | async def display_node_tree(
  function example_with_token_monitoring (line 153) | async def example_with_token_monitoring():

FILE: src/mcp_agent/elicitation/handler.py
  class SlashCommandResult (line 20) | class SlashCommandResult:
    method __init__ (line 21) | def __init__(self, command: str, action: str):
  function _process_slash_command (line 26) | def _process_slash_command(input_text: str) -> Optional[SlashCommandResu...
  function _print_slash_help (line 43) | def _print_slash_help() -> None:
  function _process_field_value (line 51) | def _process_field_value(field_type: str, value: str) -> Any:
  function _create_panel (line 75) | def _create_panel(request: ElicitRequestParams) -> Panel:
  function _handle_elicitation_requested_schema (line 89) | async def _handle_elicitation_requested_schema(request: ElicitRequestPar...
  function console_elicitation_callback (line 139) | async def console_elicitation_callback(request: ElicitRequestParams):

FILE: src/mcp_agent/elicitation/types.py
  class ElicitRequestFormParams (line 10) | class ElicitRequestFormParams(MCPElicitRequestFormParams):
  class ElicitRequestURLParams (line 17) | class ElicitRequestURLParams(MCPElicitRequestURLParams):
  class ElicitationCallback (line 28) | class ElicitationCallback(Protocol):
    method __call__ (line 31) | async def __call__(self, request: ElicitRequestParams) -> ElicitResult...

FILE: src/mcp_agent/executor/decorator_registry.py
  class DecoratorRegistry (line 13) | class DecoratorRegistry:
    method __init__ (line 16) | def __init__(self):
    method register_workflow_defn_decorator (line 28) | def register_workflow_defn_decorator(
    method get_workflow_defn_decorator (line 46) | def get_workflow_defn_decorator(self, executor_name: str) -> Callable[...
    method register_workflow_run_decorator (line 55) | def register_workflow_run_decorator(
    method get_workflow_run_decorator (line 73) | def get_workflow_run_decorator(
    method register_workflow_task_decorator (line 84) | def register_workflow_task_decorator(
    method get_workflow_task_decorator (line 102) | def get_workflow_task_decorator(
    method register_workflow_signal_decorator (line 113) | def register_workflow_signal_decorator(
    method get_workflow_signal_decorator (line 131) | def get_workflow_signal_decorator(
  function default_workflow_defn (line 143) | def default_workflow_defn(cls: Type, *args, **kwargs) -> Type:
  function default_workflow_run (line 148) | def default_workflow_run(fn: Callable[..., R]) -> Callable[..., R]:
  function default_workflow_task (line 157) | def default_workflow_task(fn: Callable[..., T]) -> Callable[..., T]:
  function default_workflow_signal (line 166) | def default_workflow_signal(fn: Callable[..., R]) -> Callable[..., R]:
  function register_asyncio_decorators (line 175) | def register_asyncio_decorators(decorator_registry: DecoratorRegistry):
  function register_temporal_decorators (line 189) | def register_temporal_decorators(decorator_registry: DecoratorRegistry):

FILE: src/mcp_agent/executor/errors.py
  class TemporalApplicationError (line 12) | class TemporalApplicationError(RuntimeError):
    method __init__ (line 15) | def __init__(
  class WorkflowApplicationError (line 29) | class WorkflowApplicationError(TemporalApplicationError):
    method __init__ (line 32) | def __init__(
    method workflow_details (line 74) | def workflow_details(self):
  function to_application_error (line 83) | def to_application_error(

FILE: src/mcp_agent/executor/executor.py
  class ExecutorConfig (line 43) | class ExecutorConfig(BaseModel):
  class Executor (line 53) | class Executor(ABC, ContextDependent):
    method __init__ (line 56) | def __init__(
    method execution_context (line 77) | async def execution_context(self):
    method execute (line 86) | async def execute(
    method execute_many (line 95) | async def execute_many(
    method execute_streaming (line 104) | async def execute_streaming(
    method create_human_input_request (line 113) | def create_human_input_request(
    method map (line 119) | async def map(
    method validate_task (line 152) | async def validate_task(
    method signal (line 159) | async def signal(
    method wait_for_signal (line 186) | async def wait_for_signal(
    method uuid (line 223) | def uuid(self) -> uuid.UUID:
    method random (line 232) | def random(self) -> random.Random:
  class AsyncioExecutor (line 243) | class AsyncioExecutor(Executor):
    method __init__ (line 246) | def __init__(
    method _execute_task (line 260) | async def _execute_task(
    method execute (line 293) | async def execute(
    method execute_many (line 319) | async def execute_many(
    method execute_streaming (line 350) | async def execute_streaming(
    method signal (line 390) | async def signal(
    method wait_for_signal (line 403) | async def wait_for_signal(
    method create_human_input_request (line 423) | def create_human_input_request(self, request: dict) -> HumanInputRequest:

FILE: src/mcp_agent/executor/signal_registry.py
  class SignalRegistry (line 4) | class SignalRegistry:
    method __init__ (line 7) | def __init__(self):
    method register (line 11) | def register(self, name: str, func: Callable, state: Dict[str, Any] | ...
    method get_signal (line 17) | def get_signal(self, name: str) -> Callable:
    method get_state (line 22) | def get_state(self, name: str) -> Dict[str, Any]:
    method list_signals (line 25) | def list_signals(self) -> List[str]:
    method is_registered (line 28) | def is_registered(self, name: str) -> bool:

FILE: src/mcp_agent/executor/task_registry.py
  class ActivityRegistry (line 10) | class ActivityRegistry:
    method __init__ (line 13) | def __init__(self):
    method register (line 17) | def register(
    method get_activity (line 25) | def get_activity(self, name: str) -> Callable:
    method get_metadata (line 30) | def get_metadata(self, name: str) -> Dict[str, Any]:
    method list_activities (line 33) | def list_activities(self) -> List[str]:
    method is_registered (line 36) | def is_registered(self, name: str) -> bool:

FILE: src/mcp_agent/executor/temporal/__init__.py
  class TemporalExecutorConfig (line 71) | class TemporalExecutorConfig(ExecutorConfig, TemporalSettings):
  class TemporalExecutor (line 77) | class TemporalExecutor(Executor):
    method __init__ (line 80) | def __init__(
    method wrap_as_activity (line 109) | def wrap_as_activity(
    method _execute_task_as_async (line 149) | async def _execute_task_as_async(
    method _execute_task (line 185) | async def _execute_task(
    method execute (line 240) | async def execute(
    method execute_many (line 258) | async def execute_many(
    method execute_streaming (line 279) | async def execute_streaming(
    method ensure_client (line 307) | async def ensure_client(self):
    method start_workflow (line 324) | async def start_workflow(
    method execute_workflow (line 441) | async def execute_workflow(
    method create_human_input_request (line 463) | def create_human_input_request(self, request: dict) -> HumanInputRequest:
    method terminate_workflow (line 479) | async def terminate_workflow(
    method uuid (line 500) | def uuid(self) -> "UUID":
    method random (line 509) | def random(self) -> "Random":
  function _preload_workflow_task_modules (line 525) | def _preload_workflow_task_modules(app: "MCPApp") -> None:
  function create_temporal_worker_for_app (line 580) | async def create_temporal_worker_for_app(app: "MCPApp"):

FILE: src/mcp_agent/executor/temporal/interactive_workflow.py
  class HumanResponse (line 17) | class HumanResponse:
  class InteractiveWorkflow (line 21) | class InteractiveWorkflow(Workflow[T], Generic[T]):
    method __init__ (line 41) | def __init__(self, *args, **kwargs) -> None:
    method get_human_input_request (line 48) | def get_human_input_request(self) -> str:
    method provide_human_input (line 57) | async def provide_human_input(self, input: HumanResponse) -> None:
    method create_input_callback (line 65) | def create_input_callback(self) -> callable:

FILE: src/mcp_agent/executor/temporal/interceptor.py
  class _InputWithHeaders (line 20) | class _InputWithHeaders(Protocol):
  function set_header_from_context (line 27) | def set_header_from_context(
  function context_from_header (line 40) | def context_from_header(
  class ContextPropagationInterceptor (line 58) | class ContextPropagationInterceptor(
    method __init__ (line 72) | def __init__(
    method intercept_client (line 78) | def intercept_client(
    method intercept_activity (line 85) | def intercept_activity(
    method workflow_interceptor_class (line 90) | def workflow_interceptor_class(
  class _ContextPropagationClientOutboundInterceptor (line 96) | class _ContextPropagationClientOutboundInterceptor(
    method __init__ (line 99) | def __init__(
    method start_workflow (line 107) | async def start_workflow(
    method query_workflow (line 113) | async def query_workflow(self, input: temporalio.client.QueryWorkflowI...
    method signal_workflow (line 117) | async def signal_workflow(
    method start_workflow_update (line 123) | async def start_workflow_update(
  class _ContextPropagationActivityInboundInterceptor (line 130) | class _ContextPropagationActivityInboundInterceptor(
    method execute_activity (line 133) | async def execute_activity(
  class _ContextPropagationWorkflowInboundInterceptor (line 140) | class _ContextPropagationWorkflowInboundInterceptor(
    method init (line 143) | def init(self, outbound: temporalio.worker.WorkflowOutboundInterceptor...
    method execute_workflow (line 146) | async def execute_workflow(
    method handle_signal (line 152) | async def handle_signal(self, input: temporalio.worker.HandleSignalInp...
    method handle_query (line 156) | async def handle_query(self, input: temporalio.worker.HandleQueryInput...
    method handle_update_validator (line 160) | def handle_update_validator(
    method handle_update_handler (line 166) | async def handle_update_handler(
  class _ContextPropagationWorkflowOutboundInterceptor (line 173) | class _ContextPropagationWorkflowOutboundInterceptor(
    method signal_child_workflow (line 176) | async def signal_child_workflow(
    method signal_external_workflow (line 182) | async def signal_external_workflow(
    method start_activity (line 188) | def start_activity(
    method start_child_workflow (line 194) | async def start_child_workflow(
    method start_local_activity (line 200) | def start_local_activity(

FILE: src/mcp_agent/executor/temporal/session_proxy.py
  class SessionProxy (line 30) | class SessionProxy(ServerSession):
    method __init__ (line 47) | def __init__(self, *, executor, context: Context) -> None:
    method _scoped_context (line 83) | def _scoped_context(self):
    method _ensure_identity (line 109) | def _ensure_identity(self) -> None:
    method notify (line 133) | async def notify(self, method: str, params: Dict[str, Any] | None = No...
    method request (line 165) | async def request(
    method send_notification (line 222) | async def send_notification(
    method send_request (line 244) | async def send_request(
    method send_log_message (line 269) | async def send_log_message(
    method send_progress_notification (line 314) | async def send_progress_notification(
    method send_resource_updated (line 335) | async def send_resource_updated(self, uri: types.AnyUrl) -> None:
    method send_resource_list_changed (line 339) | async def send_resource_list_changed(self) -> None:
    method send_tool_list_changed (line 343) | async def send_tool_list_changed(self) -> None:
    method send_prompt_list_changed (line 347) | async def send_prompt_list_changed(self) -> None:
    method send_ping (line 351) | async def send_ping(self) -> types.EmptyResult:
    method list_roots (line 355) | async def list_roots(self) -> types.ListRootsResult:
    method create_message (line 359) | async def create_message(
    method elicit (line 400) | async def elicit(
  function _in_workflow_runtime (line 419) | def _in_workflow_runtime() -> bool:
  class _RPC (line 427) | class _RPC:
    method __init__ (line 430) | def __init__(self, proxy: SessionProxy) -> None:
    method notify (line 433) | async def notify(self, method: str, params: Dict[str, Any] | None = No...
    method request (line 436) | async def request(

FILE: src/mcp_agent/executor/temporal/system_activities.py
  class SystemActivities (line 16) | class SystemActivities(ContextDependent):
    method forward_log (line 20) | async def forward_log(
    method request_user_input (line 41) | async def request_user_input(
    method relay_notify (line 65) | async def relay_notify(
    method relay_request (line 92) | async def relay_request(

FILE: src/mcp_agent/executor/temporal/temporal_context.py
  function set_execution_id (line 10) | def set_execution_id(execution_id: Optional[str]) -> None:
  function get_execution_id (line 15) | def get_execution_id() -> Optional[str]:

FILE: src/mcp_agent/executor/temporal/workflow_registry.py
  class TemporalWorkflowRegistry (line 22) | class TemporalWorkflowRegistry(WorkflowRegistry):
    method __init__ (line 28) | def __init__(self, executor: "TemporalExecutor"):
    method register (line 35) | async def register(
    method unregister (line 51) | async def unregister(self, run_id: str, workflow_id: str | None = None...
    method get_workflow (line 66) | async def get_workflow(
    method resume_workflow (line 79) | async def resume_workflow(
    method cancel_workflow (line 131) | async def cancel_workflow(
    method get_workflow_status (line 175) | async def get_workflow_status(
    method list_workflow_statuses (line 220) | async def list_workflow_statuses(
    method list_workflows (line 402) | async def list_workflows(self) -> List["Workflow"]:
    method _get_temporal_workflow_status (line 411) | async def _get_temporal_workflow_status(

FILE: src/mcp_agent/executor/temporal/workflow_signal.py
  class TemporalSignalHandler (line 23) | class TemporalSignalHandler(BaseSignalHandler[SignalValueT]):
    method __init__ (line 32) | def __init__(self, executor: Optional["TemporalExecutor"] = None) -> N...
    method attach_to_workflow (line 41) | def attach_to_workflow(self, wf_instance: "Workflow") -> None:
    method wait_for_signal (line 71) | async def wait_for_signal(
    method on_signal (line 129) | def on_signal(self, signal_name: str):
    method signal (line 146) | async def signal(self, signal: Signal[SignalValueT]) -> None:
    method validate_signal (line 197) | def validate_signal(self, signal):

FILE: src/mcp_agent/executor/workflow.py
  class WorkflowState (line 40) | class WorkflowState(BaseModel):
    method record_error (line 54) | def record_error(self, error: Exception) -> None:
  class WorkflowResult (line 62) | class WorkflowResult(BaseModel, Generic[T]):
  class WorkflowExecution (line 71) | class WorkflowExecution(BaseModel):
  class Workflow (line 81) | class Workflow(ABC, Generic[T], ContextDependent):
    method __init__ (line 95) | def __init__(
    method executor (line 125) | def executor(self):
    method id (line 133) | def id(self) -> str | None:
    method run_id (line 140) | def run_id(self) -> str | None:
    method create (line 148) | async def create(
    method run (line 170) | async def run(self, *args, **kwargs) -> "WorkflowResult[T]":
    method _cancel_task (line 183) | async def _cancel_task(self):
    method run_async (line 200) | async def run_async(self, *args, **kwargs) -> "WorkflowExecution":
    method resume (line 378) | async def resume(
    method cancel (line 415) | async def cancel(self) -> bool:
    method _signal_receiver (line 441) | async def _signal_receiver(self, name: str, args: Sequence[RawValue]):
    method _query_token_tree (line 471) | def _query_token_tree(self) -> str:
    method _query_token_summary (line 491) | def _query_token_summary(self) -> Dict[str, Any]:
    method get_status (line 586) | async def get_status(self) -> Dict[str, Any]:
    method update_status (line 631) | def update_status(self, status: str) -> None:
    method get_token_node (line 643) | async def get_token_node(self, return_all_matches: bool = False):
    method get_token_usage (line 673) | async def get_token_usage(self):
    method get_token_cost (line 678) | async def get_token_cost(self) -> float:
    method watch_tokens (line 683) | async def watch_tokens(
    method format_token_tree (line 702) | async def format_token_tree(self) -> str:
    method update_state (line 708) | async def update_state(self, **kwargs):
    method initialize (line 717) | async def initialize(self):
    method cleanup (line 828) | async def cleanup(self):
    method __aenter__ (line 844) | async def __aenter__(self):
    method __aexit__ (line 849) | async def __aexit__(self, exc_type, exc_val, exc_tb):

FILE: src/mcp_agent/executor/workflow_registry.py
  class WorkflowRunsPage (line 24) | class WorkflowRunsPage(BaseModel):
  class WorkflowRegistry (line 29) | class WorkflowRegistry(ABC):
    method __init__ (line 35) | def __init__(self):
    method register (line 39) | async def register(
    method unregister (line 58) | async def unregister(self, run_id: str, workflow_id: str | None = None...
    method get_workflow (line 69) | async def get_workflow(
    method resume_workflow (line 85) | async def resume_workflow(
    method cancel_workflow (line 107) | async def cancel_workflow(
    method get_workflow_status (line 123) | async def get_workflow_status(
    method list_workflow_statuses (line 139) | async def list_workflow_statuses(
    method list_workflows (line 171) | async def list_workflows(self) -> List["Workflow"]:
  class InMemoryWorkflowRegistry (line 181) | class InMemoryWorkflowRegistry(WorkflowRegistry):
    method __init__ (line 186) | def __init__(self):
    method register (line 193) | async def register(
    method unregister (line 220) | async def unregister(
    method get_workflow (line 242) | async def get_workflow(
    method resume_workflow (line 255) | async def resume_workflow(
    method cancel_workflow (line 273) | async def cancel_workflow(
    method get_workflow_status (line 287) | async def get_workflow_status(
    method list_workflow_statuses (line 301) | async def list_workflow_statuses(
    method list_workflows (line 331) | async def list_workflows(self) -> List["Workflow"]:

FILE: src/mcp_agent/executor/workflow_signal.py
  class Signal (line 15) | class Signal(BaseModel, Generic[SignalValueT]):
  class SignalRegistration (line 53) | class SignalRegistration(BaseModel):
  class SignalHandler (line 64) | class SignalHandler(Protocol, Generic[SignalValueT]):
    method signal (line 68) | async def signal(self, signal: Signal[SignalValueT]) -> None:
    method wait_for_signal (line 72) | async def wait_for_signal(
    method on_signal (line 79) | def on_signal(self, signal_name: str) -> Callable:
  class PendingSignal (line 90) | class PendingSignal(BaseModel):
  class _Record (line 101) | class _Record(Generic[SignalValueT]):
  class SignalMailbox (line 108) | class SignalMailbox(Generic[SignalValueT]):
    method __init__ (line 114) | def __init__(self) -> None:
    method push (line 117) | def push(self, name: str, value: SignalValueT) -> None:
    method version (line 130) | def version(self, name: str) -> int:
    method value (line 134) | def value(self, name: str) -> SignalValueT:
  class BaseSignalHandler (line 156) | class BaseSignalHandler(ABC, Generic[SignalValueT]):
    method __init__ (line 159) | def __init__(self):
    method cleanup (line 166) | async def cleanup(self, signal_name: str | None = None):
    method validate_signal (line 178) | def validate_signal(self, signal: Signal[SignalValueT]):
    method on_signal (line 184) | def on_signal(self, signal_name: str) -> Callable:
    method signal (line 206) | async def signal(self, signal: Signal[SignalValueT]) -> None:
    method wait_for_signal (line 210) | async def wait_for_signal(
  class ConsoleSignalHandler (line 218) | class ConsoleSignalHandler(SignalHandler[str]):
    method __init__ (line 221) | def __init__(self):
    method wait_for_signal (line 225) | async def wait_for_signal(self, signal, timeout_seconds=None):
    method on_signal (line 249) | def on_signal(self, signal_name):
    method signal (line 262) | async def signal(self, signal):
  class AsyncioSignalHandler (line 277) | class AsyncioSignalHandler(BaseSignalHandler[SignalValueT]):
    method wait_for_signal (line 282) | async def wait_for_signal(
    method on_signal (line 323) | def on_signal(self, signal_name):
    method signal (line 340) | async def signal(self, signal):
  class LocalSignalStore (line 359) | class LocalSignalStore:
    method __init__ (line 365) | def __init__(self):
    method emit (line 369) | async def emit(self, signal_name: str, payload: Any):
    method wait_for (line 377) | async def wait_for(
  class SignalWaitCallback (line 397) | class SignalWaitCallback(Protocol):
    method __call__ (line 400) | async def __call__(

FILE: src/mcp_agent/executor/workflow_task.py
  class GlobalWorkflowTaskRegistry (line 16) | class GlobalWorkflowTaskRegistry:
    method __new__ (line 19) | def __new__(cls):
    method register_task (line 25) | def register_task(self, func: Callable, metadata: Dict[str, Any]):
    method get_all_tasks (line 28) | def get_all_tasks(self) -> List[tuple]:
    method clear (line 31) | def clear(self):
  function workflow_task (line 36) | def workflow_task(

FILE: src/mcp_agent/human_input/console_handler.py
  class SlashCommandResult (line 20) | class SlashCommandResult:
    method __init__ (line 21) | def __init__(self, command: str, action: str):
  function _process_slash_command (line 26) | def _process_slash_command(input_text: str) -> Optional[SlashCommandResu...
  function _print_slash_help (line 43) | def _print_slash_help() -> None:
  function _create_panel (line 51) | def _create_panel(request: HumanInputRequest) -> Panel:
  function console_input_callback (line 68) | async def console_input_callback(request: HumanInputRequest) -> HumanInp...
  function _handle_simple_input (line 81) | async def _handle_simple_input(request: HumanInputRequest) -> str:

FILE: src/mcp_agent/human_input/elicitation_handler.py
  function _create_elicitation_message (line 10) | def _create_elicitation_message(request: HumanInputRequest) -> str:
  function _handle_elicitation_response (line 19) | def _handle_elicitation_response(
  function elicitation_input_callback (line 54) | async def elicitation_input_callback(request: HumanInputRequest) -> Huma...

FILE: src/mcp_agent/human_input/types.py
  class HumanInputRequest (line 7) | class HumanInputRequest(BaseModel):
  class HumanInputResponse (line 32) | class HumanInputResponse(BaseModel):
  class HumanInputCallback (line 45) | class HumanInputCallback(Protocol):
    method __call__ (line 48) | async def __call__(self, request: HumanInputRequest) -> HumanInputResp...

FILE: src/mcp_agent/logging/event_progress.py
  class ProgressAction (line 10) | class ProgressAction(str, Enum):
  class ProgressEvent (line 29) | class ProgressEvent:
    method __str__ (line 37) | def __str__(self) -> str:
  function convert_log_event (line 47) | def convert_log_event(event: Event) -> Optional[ProgressEvent]:

FILE: src/mcp_agent/logging/events.py
  class EventContext (line 23) | class EventContext(BaseModel):
  class Event (line 39) | class Event(BaseModel):
  class EventFilter (line 64) | class EventFilter(BaseModel):
    method matches (line 78) | def matches(self, event: Event) -> bool:
  class SamplingFilter (line 115) | class SamplingFilter(EventFilter):
    method matches (line 124) | def matches(self, event: Event) -> bool:

FILE: src/mcp_agent/logging/json_serializer.py
  class JSONSerializer (line 16) | class JSONSerializer:
    method __init__ (line 36) | def __init__(self):
    method _redact_sensitive_value (line 42) | def _redact_sensitive_value(self, value: str) -> str:
    method serialize (line 52) | def serialize(self, obj: Any) -> Any:
    method _is_sensitive_key (line 58) | def _is_sensitive_key(self, key: str) -> bool:
    method _serialize_object (line 63) | def _serialize_object(self, obj: Any, depth: int = 0) -> Any:
    method __call__ (line 167) | def __call__(self, obj: Any) -> Any:

FILE: src/mcp_agent/logging/listeners.py
  class UpstreamServerSessionProtocol (line 19) | class UpstreamServerSessionProtocol(Protocol):
    method send_log_message (line 20) | async def send_log_message(
  class EventListener (line 29) | class EventListener(ABC):
    method handle_event (line 33) | async def handle_event(self, event: Event):
  class LifecycleAwareListener (line 37) | class LifecycleAwareListener(EventListener):
    method start (line 43) | async def start(self):
    method stop (line 47) | async def stop(self):
  class FilteredListener (line 52) | class FilteredListener(LifecycleAwareListener):
    method __init__ (line 58) | def __init__(self, event_filter: EventFilter | None = None):
    method handle_event (line 66) | async def handle_event(self, event):
    method handle_matched_event (line 70) | async def handle_matched_event(self, event: Event):
  class LoggingListener (line 75) | class LoggingListener(FilteredListener):
    method __init__ (line 80) | def __init__(
    method handle_matched_event (line 93) | async def handle_matched_event(self, event):
  class ProgressListener (line 122) | class ProgressListener(LifecycleAwareListener):
    method __init__ (line 129) | def __init__(self, display=None, token_counter=None):
    method start (line 140) | async def start(self):
    method stop (line 145) | async def stop(self):
    method handle_event (line 150) | async def handle_event(self, event: Event):
  class BatchingListener (line 158) | class BatchingListener(FilteredListener):
    method __init__ (line 164) | def __init__(
    method start (line 184) | async def start(self, loop=None):
    method stop (line 189) | async def stop(self):
    method _periodic_flush (line 203) | async def _periodic_flush(self):
    method handle_matched_event (line 217) | async def handle_matched_event(self, event):
    method flush (line 222) | async def flush(self):
    method _process_batch (line 231) | async def _process_batch(self, events: List[Event]):
  class MCPUpstreamLoggingListener (line 235) | class MCPUpstreamLoggingListener(FilteredListener):
    method __init__ (line 250) | def __init__(
    method handle_matched_event (line 258) | async def handle_matched_event(self, event: Event) -> None:
    method _allows_event (line 324) | def _allows_event(cls, event_level: EventType, min_level: EventType) -...

FILE: src/mcp_agent/logging/logger.py
  class Logger (line 35) | class Logger:
    method __init__ (line 42) | def __init__(
    method _ensure_event_loop (line 53) | def _ensure_event_loop(self):
    method _emit_event (line 63) | def _emit_event(self, event: Event):
    method event (line 200) | def event(
    method debug (line 282) | def debug(
    method info (line 292) | def info(
    method warning (line 302) | def warning(
    method error (line 312) | def error(
    method progress (line 322) | def progress(
  function event_context (line 336) | def event_context(
  function async_event_context (line 364) | async def async_event_context(
  class LoggingConfig (line 389) | class LoggingConfig:
    method configure (line 409) | async def configure(
    method shutdown (line 507) | async def shutdown(cls):
    method set_min_level (line 517) | def set_min_level(cls, level: EventType | str) -> None:
    method get_event_filter (line 524) | def get_event_filter(cls) -> EventFilter | None:
    method set_session_min_level (line 528) | def set_session_min_level(
    method get_session_min_level (line 540) | def get_session_min_level(cls, session_id: str | None) -> EventType | ...
    method clear_session_min_level (line 546) | def clear_session_min_level(cls, session_id: str | None) -> None:
    method _normalize_level (line 552) | def _normalize_level(cls, level: EventType | str) -> EventType:
    method managed (line 558) | async def managed(cls, **config_kwargs):
  function get_logger (line 572) | def get_logger(namespace: str, session_id: str | None = None, context=No...
  function set_default_bound_context (line 603) | def set_default_bound_context(ctx: Any | None) -> None:

FILE: src/mcp_agent/logging/progress_display.py
  function get_progress_display (line 14) | def get_progress_display(token_counter=None) -> RichProgressDisplay:
  function create_progress_display (line 26) | def create_progress_display(token_counter=None) -> RichProgressDisplay:

FILE: src/mcp_agent/logging/rich_progress.py
  class RichProgressDisplay (line 13) | class RichProgressDisplay:
    method __init__ (line 16) | def __init__(self, console: Optional[Console] = None, token_counter=No...
    method start (line 42) | def start(self):
    method stop (line 50) | def stop(self):
    method _unwatch_async (line 57) | async def _unwatch_async(self):
    method _start_token_tracking (line 65) | def _start_token_tracking(self):
    method _try_register_watch (line 85) | def _try_register_watch(self):
    method _register_watch_async (line 95) | async def _register_watch_async(self):
    method _update_initial_token_display (line 107) | async def _update_initial_token_display(self):
    method _on_token_update (line 117) | async def _on_token_update(self, node, usage):
    method pause (line 126) | def pause(self):
    method resume (line 134) | def resume(self):
    method paused (line 143) | def paused(self):
    method _get_action_style (line 151) | def _get_action_style(self, action: ProgressAction) -> str:
    method update (line 169) | def update(self, event: ProgressEvent) -> None:

FILE: src/mcp_agent/logging/token_progress_display.py
  class TokenProgressDisplay (line 12) | class TokenProgressDisplay:
    method __init__ (line 15) | def __init__(self, token_counter: TokenCounter, console: Optional[Cons...
    method start (line 35) | def start(self):
    method _register_watch (line 48) | async def _register_watch(self):
    method _unregister_watches (line 73) | async def _unregister_watches(self):
    method stop (line 79) | def stop(self):
    method pause (line 87) | def pause(self):
    method resume (line 95) | def resume(self):
    method paused (line 104) | def paused(self):
    method _format_tokens (line 112) | def _format_tokens(self, tokens: int) -> str:
    method _format_cost (line 116) | def _format_cost(self, cost: float) -> str:
    method _on_token_update (line 120) | async def _on_token_update(self, node: TokenNode, usage: TokenUsage):
    method __enter__ (line 131) | def __enter__(self):
    method __exit__ (line 136) | def __exit__(self, exc_type, exc_val, exc_tb):

FILE: src/mcp_agent/logging/transport.py
  class EventTransport (line 30) | class EventTransport(Protocol):
    method send_event (line 36) | async def send_event(self, event: Event):
  class FilteredEventTransport (line 45) | class FilteredEventTransport(EventTransport, ABC):
    method __init__ (line 50) | def __init__(self, event_filter: EventFilter | None = None):
    method send_event (line 53) | async def send_event(self, event: Event):
    method send_matched_event (line 58) | async def send_matched_event(self, event: Event):
  class NoOpTransport (line 62) | class NoOpTransport(FilteredEventTransport):
    method send_matched_event (line 65) | async def send_matched_event(self, event):
  class ConsoleTransport (line 70) | class ConsoleTransport(FilteredEventTransport):
    method __init__ (line 73) | def __init__(self, event_filter: EventFilter | None = None):
    method send_matched_event (line 84) | async def send_matched_event(self, event: Event):
  class FileTransport (line 111) | class FileTransport(FilteredEventTransport):
    method __init__ (line 114) | def __init__(
    method send_matched_event (line 144) | async def send_matched_event(self, event: Event) -> None:
    method _write_to_file (line 181) | def _write_to_file(self, log_line: str) -> None:
    method close (line 187) | async def close(self) -> None:
    method is_closed (line 192) | def is_closed(self) -> bool:
  class HTTPTransport (line 197) | class HTTPTransport(FilteredEventTransport):
    method __init__ (line 203) | def __init__(
    method start (line 222) | async def start(self):
    method stop (line 229) | async def stop(self):
    method send_matched_event (line 237) | async def send_matched_event(self, event: Event):
    method _flush (line 244) | async def _flush(self):
  class AsyncEventBus (line 282) | class AsyncEventBus:
    method __init__ (line 290) | def __init__(self, transport: EventTransport | None = None):
    method init_queue (line 296) | def init_queue(self):
    method get (line 309) | def get(cls, transport: EventTransport | None = None) -> "AsyncEventBus":
    method reset (line 319) | def reset(cls) -> None:
    method start (line 342) | async def start(self):
    method stop (line 361) | async def stop(self):
    method emit (line 410) | async def emit(self, event: Event):
    method emit_with_stderr_transport (line 436) | def emit_with_stderr_transport(self, event: Event):
    method _send_to_transport (line 452) | async def _send_to_transport(self, event: Event):
    method add_listener (line 459) | def add_listener(self, name: str, listener: EventListener):
    method remove_listener (line 463) | def remove_listener(self, name: str):
    method _process_events (line 467) | async def _process_events(self):
  class MultiTransport (line 550) | class MultiTransport(EventTransport):
    method __init__ (line 553) | def __init__(self, transports: List[EventTransport]):
    method send_event (line 561) | async def send_event(self, event: Event):
  function get_log_filename (line 588) | def get_log_filename(settings: LoggerSettings, session_id: str | None = ...
  function create_transport (line 621) | def create_transport(

FILE: src/mcp_agent/mcp/client_proxy.py
  function _resolve_gateway_url (line 10) | def _resolve_gateway_url(
  function log_via_proxy (line 40) | async def log_via_proxy(
  function ask_via_proxy (line 82) | async def ask_via_proxy(
  function notify_via_proxy (line 119) | async def notify_via_proxy(
  function request_via_proxy (line 152) | async def request_via_proxy(

FILE: src/mcp_agent/mcp/gen_client.py
  function gen_client (line 17) | async def gen_client(
  function connect (line 52) | async def connect(
  function disconnect (line 86) | async def disconnect(

FILE: src/mcp_agent/mcp/mcp_agent_client_session.py
  class MCPAgentClientSession (line 79) | class MCPAgentClientSession(ClientSession, ContextDependent):
    method __init__ (line 90) | def __init__(
    method set_session_id_callback (line 131) | def set_session_id_callback(self, callback: Callable[[], str | None]) ...
    method get_session_id (line 142) | def get_session_id(self) -> str | None:
    method send_request (line 155) | async def send_request(
    method send_notification (line 239) | async def send_notification(
    method _send_response (line 283) | async def _send_response(
    method _received_notification (line 292) | async def _received_notification(self, notification: ReceiveNotificati...
    method send_progress_notification (line 303) | async def send_progress_notification(
    method _handle_sampling_callback (line 340) | async def _handle_sampling_callback(
    method _handle_elicitation_callback (line 366) | async def _handle_elicitation_callback(
    method _handle_list_roots_callback (line 436) | async def _handle_list_roots_callback(

FILE: src/mcp_agent/mcp/mcp_aggregator.py
  class NamespacedTool (line 52) | class NamespacedTool(BaseModel):
  class NamespacedPrompt (line 62) | class NamespacedPrompt(BaseModel):
  class NamespacedResource (line 72) | class NamespacedResource(BaseModel):
  class MCPAggregator (line 82) | class MCPAggregator(ContextDependent):
    method __aenter__ (line 97) | async def __aenter__(self):
    method __aexit__ (line 101) | async def __aexit__(self, exc_type, exc_val, exc_tb):
    method __init__ (line 104) | def __init__(
    method initialize (line 150) | async def initialize(self, force: bool = False):
    method close (line 198) | async def close(self):
    method create (line 276) | async def create(
    method load_server (line 320) | async def load_server(self, server_name: str):
    method load_servers (line 451) | async def load_servers(self, force: bool = False):
    method get_server (line 512) | async def get_server(self, server_name: str) -> Optional[ClientSession]:
    method get_capabilities (line 540) | async def get_capabilities(self, server_name: str):
    method refresh (line 609) | async def refresh(self, server_name: str | None = None):
    method list_servers (line 622) | async def list_servers(self) -> List[str]:
    method list_tools (line 636) | async def list_tools(self, server_name: str | None = None) -> ListTool...
    method list_resources (line 681) | async def list_resources(self, server_name: str | None = None):
    method read_resource (line 730) | async def read_resource(
    method call_tool (line 829) | async def call_tool(
    method list_prompts (line 958) | async def list_prompts(self, server_name: str | None = None) -> ListPr...
    method get_prompt (line 1017) | async def get_prompt(
    method _parse_capability_name (line 1169) | async def _parse_capability_name(
    method _start_server (line 1226) | async def _start_server(self, server_name: str):
    method _fetch_tools (line 1257) | async def _fetch_tools(self, client: ClientSession, server_name: str) ...
    method _fetch_prompts (line 1286) | async def _fetch_prompts(
    method _fetch_resources (line 1318) | async def _fetch_resources(
    method _fetch_capabilities (line 1350) | async def _fetch_capabilities(self, server_name: str):
  class MCPCompoundServer (line 1375) | class MCPCompoundServer(Server):
    method __init__ (line 1380) | def __init__(self, server_names: List[str], name: str = "MCPCompoundSe...
    method _list_tools (line 1392) | async def _list_tools(self) -> List[Tool]:
    method _call_tool (line 1397) | async def _call_tool(
    method _list_prompts (line 1412) | async def _list_prompts(self) -> List[Prompt]:
    method _get_prompt (line 1417) | async def _get_prompt(
    method _list_resources (line 1435) | async def _list_resources(self):
    method _read_resource (line 1440) | async def _read_resource(self, uri: str, server_name: str | None = None):
    method run_stdio_async (line 1451) | async def run_stdio_async(self) -> None:

FILE: src/mcp_agent/mcp/mcp_connection_manager.py
  function _resolve_identity_from_context (line 44) | def _resolve_identity_from_context():
  class ServerConnection (line 54) | class ServerConnection:
    method __init__ (line 61) | def __init__(
    method is_healthy (line 98) | def is_healthy(self) -> bool:
    method reset_error_state (line 102) | def reset_error_state(self) -> None:
    method request_shutdown (line 107) | def request_shutdown(self) -> None:
    method _is_shutdown_requested_flag (line 114) | def _is_shutdown_requested_flag(self) -> bool:
    method wait_for_shutdown_request (line 118) | async def wait_for_shutdown_request(self) -> None:
    method initialize_session (line 124) | async def initialize_session(self) -> None:
    method wait_for_initialized (line 141) | async def wait_for_initialized(self) -> None:
    method create_session (line 147) | def create_session(
  function _server_lifecycle_task (line 173) | async def _server_lifecycle_task(server_conn: ServerConnection) -> None:
  class MCPConnectionManager (line 232) | class MCPConnectionManager(ContextDependent):
    method __init__ (line 237) | def __init__(
    method __aenter__ (line 262) | async def __aenter__(self):
    method __aexit__ (line 272) | async def __aexit__(self, exc_type, exc_val, exc_tb):
    method close (line 286) | async def close(self, exc_type=None, exc_val=None, exc_tb=None):
    method _start_owner (line 358) | async def _start_owner(self):
    method _tg_owner (line 396) | async def _tg_owner(self):
    method launch_server (line 418) | async def launch_server(
    method get_server (line 555) | async def get_server(
    method get_server_capabilities (line 601) | async def get_server_capabilities(
    method disconnect_server (line 615) | async def disconnect_server(self, server_name: str) -> None:
    method disconnect_all (line 633) | async def disconnect_all(self) -> None:

FILE: src/mcp_agent/mcp/mcp_server_registry.py
  function _resolve_identity_from_context (line 40) | def _resolve_identity_from_context():
  class ServerRegistry (line 64) | class ServerRegistry:
    method __init__ (line 78) | def __init__(self, config: Settings | None = None, config_path: str | ...
    method load_registry_from_file (line 101) | def load_registry_from_file(
    method start_server (line 118) | async def start_server(
    method initialize_server (line 358) | async def initialize_server(
    method register_init_hook (line 420) | def register_init_hook(self, server_name: str, hook: InitHookCallable)...
    method execute_init_hook (line 434) | def execute_init_hook(self, server_name: str, session=None) -> bool:
    method get_server_config (line 450) | def get_server_config(self, server_name: str) -> MCPServerSettings | N...

FILE: src/mcp_agent/mcp/sampling_handler.py
  function _format_sampling_request_for_human (line 33) | def _format_sampling_request_for_human(params: CreateMessageRequestParam...
  function _format_sampling_response_for_human (line 82) | def _format_sampling_response_for_human(result: CreateMessageResult) -> ...
  class SamplingHandler (line 94) | class SamplingHandler(ContextDependent):
    method __init__ (line 97) | def __init__(self, context: "Context"):
    method handle_sampling (line 100) | async def handle_sampling(
    method _handle_sampling_locally (line 121) | async def _handle_sampling_locally(
    method _human_approve_request (line 145) | async def _human_approve_request(
    method _human_approve_response (line 174) | async def _human_approve_response(
    method _generate_with_llm (line 203) | async def _generate_with_llm(

FILE: src/mcp_agent/mcp/stdio_transport.py
  function _should_ignore_exception (line 34) | def _should_ignore_exception(exc: Exception) -> bool:
  function _truncate (line 66) | def _truncate(value: str, length: int = 120) -> str:
  function filtered_stdio_client (line 76) | async def filtered_stdio_client(

FILE: src/mcp_agent/oauth/access_token.py
  class MCPAccessToken (line 11) | class MCPAccessToken(AccessToken):
    method from_introspection (line 22) | def from_introspection(
    method is_expired (line 66) | def is_expired(self, *, leeway_seconds: int = 0) -> bool:
    method validate_audience (line 73) | def validate_audience(self, expected_audiences: List[str]) -> bool:
  function _extract_all_audiences (line 83) | def _extract_all_audiences(payload: Dict[str, Any]) -> List[str]:
  function _first_non_empty (line 106) | def _first_non_empty(*values: Any) -> Any | None:

FILE: src/mcp_agent/oauth/callbacks.py
  class OAuthCallbackRegistry (line 9) | class OAuthCallbackRegistry:
    method __init__ (line 12) | def __init__(self) -> None:
    method create_handle (line 19) | async def create_handle(self, flow_id: str) -> asyncio.Future[Dict[str...
    method deliver (line 29) | async def deliver(self, flow_id: str, payload: Dict[str, Any]) -> bool:
    method register_state (line 40) | async def register_state(self, flow_id: str, state: str) -> None:
    method deliver_by_state (line 47) | async def deliver_by_state(self, state: str, payload: Dict[str, Any]) ...
    method fail (line 60) | async def fail(self, flow_id: str, exc: Exception) -> bool:
    method discard (line 69) | async def discard(self, flow_id: str) -> None:

FILE: src/mcp_agent/oauth/errors.py
  class OAuthFlowError (line 4) | class OAuthFlowError(Exception):
  class AuthorizationDeclined (line 8) | class AuthorizationDeclined(OAuthFlowError):
  class CallbackTimeoutError (line 12) | class CallbackTimeoutError(OAuthFlowError):
  class TokenRefreshError (line 16) | class TokenRefreshError(OAuthFlowError):
  class MissingUserIdentityError (line 20) | class MissingUserIdentityError(OAuthFlowError):

FILE: src/mcp_agent/oauth/flow.py
  class AuthorizationFlowCoordinator (line 40) | class AuthorizationFlowCoordinator:
    method __init__ (line 43) | def __init__(self, *, http_client: httpx.AsyncClient, settings: OAuthS...
    method authorize (line 47) | async def authorize(
  function _parse_callback_params (line 300) | def _parse_callback_params(url: str) -> Dict[str, str]:
  function _send_auth_request (line 309) | async def _send_auth_request(
  function _run_loopback_flow (line 323) | async def _run_loopback_flow(

FILE: src/mcp_agent/oauth/http/auth.py
  class OAuthHttpxAuth (line 15) | class OAuthHttpxAuth(httpx.Auth):
    method __init__ (line 18) | def __init__(
    method async_auth_flow (line 35) | async def async_auth_flow(self, request: httpx.Request):

FILE: src/mcp_agent/oauth/identity.py
  class OAuthUserIdentity (line 12) | class OAuthUserIdentity:
    method cache_key (line 21) | def cache_key(self) -> str:
    method from_access_token (line 26) | def from_access_token(
  function _claim (line 43) | def _claim(token: MCPAccessToken, key: str) -> Any | None:
  function session_identity (line 59) | def session_identity(session_id: str | None) -> OAuthUserIdentity | None:

FILE: src/mcp_agent/oauth/manager.py
  class ResolvedOAuthContext (line 49) | class ResolvedOAuthContext:
  function _dedupe (line 60) | def _dedupe(sequence: Iterable[OAuthUserIdentity]) -> list[OAuthUserIden...
  function _canonicalize_url (line 74) | def _canonicalize_url(url: str) -> str:
  function _candidate_resource_metadata_urls (line 92) | def _candidate_resource_metadata_urls(parsed_resource: URL) -> list[str]:
  function _candidate_authorization_metadata_urls (line 111) | def _candidate_authorization_metadata_urls(
  class TokenManager (line 133) | class TokenManager:
    method __init__ (line 136) | def __init__(
    method store_preconfigured_token (line 159) | async def store_preconfigured_token(
    method store_user_token (line 217) | async def store_user_token(
    method get_access_token_if_present (line 300) | async def get_access_token_if_present(
    method ensure_access_token (line 415) | async def ensure_access_token(
    method invalidate (line 574) | async def invalidate(
    method _refresh_token (line 607) | async def _refresh_token(
    method _resolve_oauth_context (line 673) | async def _resolve_oauth_context(
    method _get_resource_metadata (line 720) | async def _get_resource_metadata(
    method _get_authorization_metadata (line 745) | async def _get_authorization_metadata(
    method _build_store_key (line 772) | def _build_store_key(
    method aclose (line 786) | async def aclose(self) -> None:
    method _session_identity (line 793) | def _session_identity(self, context: "Context") -> OAuthUserIdentity |...

FILE: src/mcp_agent/oauth/metadata.py
  function fetch_resource_metadata (line 16) | async def fetch_resource_metadata(
  function fetch_authorization_server_metadata (line 26) | async def fetch_authorization_server_metadata(
  function fetch_authorization_server_metadata_from_issuer (line 35) | async def fetch_authorization_server_metadata_from_issuer(
  function select_authorization_server (line 62) | def select_authorization_server(
  function normalize_resource (line 88) | def normalize_resource(resource: str | None, fallback: str | None) -> str:

FILE: src/mcp_agent/oauth/pkce.py
  function generate_code_verifier (line 10) | def generate_code_verifier(length: int = 64) -> str:
  function generate_code_challenge (line 21) | def generate_code_challenge(verifier: str) -> str:
  function generate_state (line 26) | def generate_state(length: int = 32) -> str:

FILE: src/mcp_agent/oauth/records.py
  class TokenRecord (line 11) | class TokenRecord(BaseModel):
    method is_expired (line 26) | def is_expired(self, *, leeway_seconds: int = 0) -> bool:
    method with_tokens (line 32) | def with_tokens(

FILE: src/mcp_agent/oauth/store/base.py
  class TokenStoreKey (line 12) | class TokenStoreKey:
  function scope_fingerprint (line 21) | def scope_fingerprint(scopes: Iterable[str]) -> str:
  class TokenStore (line 26) | class TokenStore(Protocol):
    method get (line 29) | async def get(self, key: TokenStoreKey) -> TokenRecord | None: ...
    method set (line 31) | async def set(self, key: TokenStoreKey, record: TokenRecord) -> None: ...
    method delete (line 33) | async def delete(self, key: TokenStoreKey) -> None: ...

FILE: src/mcp_agent/oauth/store/in_memory.py
  class InMemoryTokenStore (line 12) | class InMemoryTokenStore(TokenStore):
    method __init__ (line 13) | def __init__(self) -> None:
    method get (line 17) | async def get(self, key: TokenStoreKey) -> TokenRecord | None:
    method set (line 24) | async def set(self, key: TokenStoreKey, record: TokenRecord) -> None:
    method delete (line 28) | async def delete(self, key: TokenStoreKey) -> None:

FILE: src/mcp_agent/oauth/store/redis.py
  class RedisTokenStore (line 11) | class RedisTokenStore(TokenStore):
    method __init__ (line 14) | def __init__(
    method _make_key (line 37) | def _make_key(self, key: TokenStoreKey) -> str:
    method get (line 47) | async def get(self, key: TokenStoreKey) -> TokenRecord | None:
    method set (line 55) | async def set(self, key: TokenStoreKey, record: TokenRecord) -> None:
    method delete (line 60) | async def delete(self, key: TokenStoreKey) -> None:
    method aclose (line 64) | async def aclose(self) -> None:

FILE: src/mcp_agent/server/app_server.py
  function _clear_cached_session_refs (line 86) | def _clear_cached_session_refs(target: Any, session: Any | None) -> None:
  function _register_session (line 96) | async def _register_session(
  function _unregister_session (line 126) | async def _unregister_session(run_id: str) -> None:
  function _get_session (line 147) | async def _get_session(execution_id: str) -> Any | None:
  function _get_identity_for_execution (line 162) | def _get_identity_for_execution(execution_id: str) -> OAuthUserIdentity ...
  function _get_context_for_execution (line 166) | def _get_context_for_execution(execution_id: str) -> "Context" | None:
  function _set_current_identity (line 170) | def _set_current_identity(identity: OAuthUserIdentity | None) -> None:
  function get_current_identity (line 174) | def get_current_identity() -> OAuthUserIdentity | None:
  function _resolve_identity_for_request (line 178) | def _resolve_identity_for_request(
  function get_identity_for_session (line 213) | def get_identity_for_session(
  class ServerContext (line 234) | class ServerContext(ContextDependent):
    method __init__ (line 237) | def __init__(self, mcp: FastMCP, context: "Context", **kwargs):
    method register_workflow (line 269) | def register_workflow(self, workflow_name: str, workflow_cls: Type[Wor...
    method app (line 280) | def app(self) -> MCPApp:
    method workflows (line 285) | def workflows(self) -> Dict[str, Type[Workflow]]:
    method workflow_registry (line 290) | def workflow_registry(self) -> WorkflowRegistry:
  function _get_attached_app (line 295) | def _get_attached_app(mcp: FastMCP) -> MCPApp | None:
  function _get_registered_workflow_tools (line 300) | def _get_registered_workflow_tools(mcp: FastMCP) -> Set[str]:
  function _get_attached_server_context (line 305) | def _get_attached_server_context(mcp: FastMCP) -> ServerContext | None:
  function _enter_request_context (line 310) | def _enter_request_context(
  function _exit_request_context (line 423) | def _exit_request_context(
  function _resolve_workflows_and_context (line 475) | def _resolve_workflows_and_context(
  function _resolve_workflows_and_context_safe (line 501) | def _resolve_workflows_and_context_safe(
  function _extract_session_id_from_context (line 512) | def _extract_session_id_from_context(ctx: MCPContext) -> str | None:
  function _resolve_workflow_registry (line 558) | def _resolve_workflow_registry(ctx: MCPContext) -> WorkflowRegistry | None:
  function _get_param_source_function_from_workflow (line 577) | def _get_param_source_function_from_workflow(workflow_cls: Type["Workflo...
  function _build_run_param_tool (line 588) | def _build_run_param_tool(workflow_cls: Type["Workflow"]) -> FastTool:
  function create_mcp_server_for_app (line 642) | def create_mcp_server_for_app(app: MCPApp, **kwargs: Any) -> FastMCP:
  function create_workflow_tools (line 2374) | def create_workflow_tools(mcp: FastMCP, server_context: ServerContext):
  function _get_registered_function_tools (line 2398) | def _get_registered_function_tools(mcp: FastMCP) -> Set[str]:
  function _set_registered_function_tools (line 2402) | def _set_registered_function_tools(mcp: FastMCP, tools: Set[str]):
  function create_declared_function_tools (line 2406) | def create_declared_function_tools(mcp: FastMCP, server_context: ServerC...
  function create_workflow_specific_tools (line 2778) | def create_workflow_specific_tools(
  function _get_server_descriptions (line 2844) | def _get_server_descriptions(
  function _get_server_descriptions_as_string (line 2866) | def _get_server_descriptions_as_string(
  function _workflow_run (line 2886) | async def _workflow_run(
  function _workflow_status (line 3106) | async def _workflow_status(
  function _parse_callback_params (line 3149) | def _parse_callback_params(url: str) -> Dict[str, str]:

FILE: src/mcp_agent/server/app_server_types.py
  function create_model_from_schema (line 14) | def create_model_from_schema(json_schema: Dict[str, Any]) -> Type[BaseMo...

FILE: src/mcp_agent/server/token_verifier.py
  class MCPAgentTokenVerifier (line 22) | class MCPAgentTokenVerifier(TokenVerifier):
    method __init__ (line 25) | def __init__(self, settings: MCPAuthorizationServerSettings):
    method _ensure_introspection_endpoint (line 34) | async def _ensure_introspection_endpoint(self) -> str:
    method verify_token (line 94) | async def verify_token(self, token: str) -> AccessToken | None:  # typ...
    method _introspect (line 113) | async def _introspect(self, token: str) -> MCPAccessToken | None:
    method _extract_audiences (line 211) | def _extract_audiences(self, payload: Dict[str, Any]) -> List[str]:
    method _validate_audiences (line 235) | def _validate_audiences(self, token_audiences: List[str]) -> bool:
    method aclose (line 263) | async def aclose(self) -> None:
    method __aenter__ (line 266) | async def __aenter__(self) -> "MCPAgentTokenVerifier":
    method __aexit__ (line 269) | async def __aexit__(self, exc_type, exc, tb) -> None:

FILE: src/mcp_agent/server/tool_adapter.py
  function create_tool_adapter_signature (line 15) | def create_tool_adapter_signature(
  function validate_tool_schema (line 122) | def validate_tool_schema(fn: Callable[..., Any], tool_name: str) -> None:

FILE: src/mcp_agent/telemetry/usage_tracking.py
  function send_usage_data (line 7) | def send_usage_data():

FILE: src/mcp_agent/tools/crewai_tool.py
  function from_crewai_tool (line 8) | def from_crewai_tool(
  function _create_function_from_schema (line 86) | def _create_function_from_schema(

FILE: src/mcp_agent/tools/langchain_tool.py
  function from_langchain_tool (line 6) | def from_langchain_tool(

FILE: src/mcp_agent/tracing/file_span_exporter.py
  class FileSpanExporter (line 16) | class FileSpanExporter(SpanExporter):
    method __init__ (line 19) | def __init__(
    method _get_trace_filename (line 39) | def _get_trace_filename(self) -> str:
    method export (line 61) | def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult:
    method force_flush (line 72) | def force_flush(self, timeout_millis: int = 30000) -> bool:

FILE: src/mcp_agent/tracing/telemetry.py
  class TelemetryManager (line 24) | class TelemetryManager(ContextDependent):
    method __init__ (line 30) | def __init__(self, context: Optional["Context"] = None, **kwargs):
    method traced (line 33) | def traced(
    method _record_args (line 88) | def _record_args(self, span, args, kwargs):
  function serialize_attribute (line 96) | def serialize_attribute(key: str, value: Any) -> Dict[str, Any]:
  function serialize_attributes (line 128) | def serialize_attributes(
  function record_attribute (line 142) | def record_attribute(span: trace.Span, key, value):
  function record_attributes (line 152) | def record_attributes(span: trace.Span, attributes: Dict[str, Any], pref...
  function is_otel_serializable (line 159) | def is_otel_serializable(value: Any) -> bool:
  function get_tracer (line 171) | def get_tracer(context: "Context") -> trace.Tracer:
  function get_meter (line 178) | def get_meter(context: "Context") -> metrics.Meter:
  function annotate_span_for_call_tool_result (line 185) | def annotate_span_for_call_tool_result(span: trace.Span, result: CallToo...

FILE: src/mcp_agent/tracing/token_counter.py
  class TokenUsageBase (line 25) | class TokenUsageBase:
    method __post_init__ (line 37) | def __post_init__(self):
  class TokenUsage (line 43) | class TokenUsage(TokenUsageBase):
  class WatchConfig (line 57) | class WatchConfig:
  class TokenNode (line 95) | class TokenNode:
    method add_child (line 132) | def add_child(self, child: "TokenNode") -> None:
    method watch (line 142) | async def watch(
    method unwatch (line 167) | async def unwatch(self, watch_id: str) -> bool:
    method invalidate_cache (line 173) | def invalidate_cache(self) -> None:
    method aggregate_usage (line 180) | def aggregate_usage(self) -> TokenUsage:
    method to_dict (line 212) | def to_dict(self) -> Dict[str, Any]:
    method format_tree (line 253) | def format_tree(self) -> str:
    method get_usage (line 270) | def get_usage(self) -> TokenUsageBase:
    method get_cost (line 279) | def get_cost(self) -> float:
    method get_summary (line 285) | def get_summary(self) -> "NodeUsageDetail":
  class ModelUsageSummary (line 350) | class ModelUsageSummary:
  class ModelUsageDetail (line 370) | class ModelUsageDetail(ModelUsageSummary):
    method total_tokens (line 377) | def total_tokens(self) -> int:
    method input_tokens (line 382) | def input_tokens(self) -> int:
    method output_tokens (line 387) | def output_tokens(self) -> int:
  class TokenSummary (line 393) | class TokenSummary:
  class NodeSummary (line 410) | class NodeSummary:
  class NodeTypeUsage (line 424) | class NodeTypeUsage:
  class NodeUsageDetail (line 438) | class NodeUsageDetail:
  class TokenCounter (line 460) | class TokenCounter:
    method __init__ (line 466) | def __init__(self, execution_engine: Optional[str] = None):
    method scope (line 519) | def scope(
    method _get_stack (line 563) | def _get_stack(self) -> List[TokenNode]:
    method _set_stack (line 568) | def _set_stack(self, new_stack: List[TokenNode]) -> None:
    method _get_current_node (line 572) | def _get_current_node(self) -> Optional[TokenNode]:
    method _stack (line 578) | def _stack(self) -> List[TokenNode]:  # type: ignore[override]
    method _current (line 582) | def _current(self) -> Optional[TokenNode]:  # type: ignore[override]
    method _build_cost_lookup (line 585) | def _build_cost_lookup(self) -> Dict[Tuple[str, str], Dict[str, float]]:
    method _build_provider_lookup (line 612) | def _build_provider_lookup(self) -> Dict[str, Dict[str, ModelInfo]]:
    method find_model_info (line 622) | def find_model_info(
    method push (line 752) | async def push(
    method pop (line 785) | async def pop(self) -> Optional[TokenNode]:
    method record_usage (line 805) | async def record_usage(
    method calculate_cost (line 923) | def calculate_cost(
    method get_current_path (line 989) | async def get_current_path(self) -> List[str]:
    method get_current_node (line 995) | async def get_current_node(self) -> Optional[TokenNode]:
    method format_node_tree (line 1003) | async def format_node_tree(self, node: Optional[TokenNode] = None) -> ...
    method get_tree (line 1024) | async def get_tree(self) -> Optional[Dict[str, Any]]:
    method get_summary (line 1031) | async def get_summary(self) -> TokenSummary:
    method reset (line 1145) | async def reset(self) -> None:
    method find_node (line 1158) | async def find_node(
    method _find_node_recursive (line 1177) | def _find_node_recursive(
    method find_nodes_by_type (line 1201) | async def find_nodes_by_type(self, node_type: str) -> List[TokenNode]:
    method _find_nodes_by_type_recursive (line 1219) | def _find_nodes_by_type_recursive(
    method get_node_usage (line 1229) | async def get_node_usage(
    method get_node_cost (line 1252) | async def get_node_cost(self, name: str, node_type: Optional[str] = No...
    method _calculate_node_cost (line 1274) | def _calculate_node_cost(self, node: TokenNode) -> float:
    method get_app_usage (line 1309) | async def get_app_usage(self) -> Optional[TokenUsage]:
    method get_agent_usage (line 1316) | async def get_agent_usage(self, name: str) -> Optional[TokenUsage]:
    method get_workflow_usage (line 1320) | async def get_workflow_usage(self, name: str) -> Optional[TokenUsage]:
    method get_current_usage (line 1324) | async def get_current_usage(self) -> Optional[TokenUsage]:
    method get_node_subtree (line 1332) | async def get_node_subtree(
    method find_node_by_metadata (line 1347) | async def find_node_by_metadata(
    method _find_node_by_metadata_recursive (line 1381) | def _find_node_by_metadata_recursive(
    method get_app_node (line 1415) | async def get_app_node(self) -> Optional[TokenNode]:
    method get_workflow_node (line 1420) | async def get_workflow_node(
    method get_agent_node (line 1457) | async def get_agent_node(
    method get_llm_node (line 1476) | async def get_llm_node(
    method get_node_breakdown (line 1495) | async def get_node_breakdown(
    method get_agents_breakdown (line 1578) | async def get_agents_breakdown(self) -> Dict[str, TokenUsage]:
    method get_workflows_breakdown (line 1587) | async def get_workflows_breakdown(self) -> Dict[str, TokenUsage]:
    method get_models_breakdown (line 1596) | async def get_models_breakdown(self) -> List[ModelUsageDetail]:
    method _collect_model_nodes (line 1650) | def _collect_model_nodes(
    method watch (line 1669) | async def watch(
    method unwatch (line 1743) | async def unwatch(self, watch_id: str) -> bool:
    method _cleanup_executor (line 1769) | def _cleanup_executor(self) -> None:
    method _trigger_watches (line 1776) | def _trigger_watches(self, node: TokenNode) -> None:
    method _execute_callback (line 1859) | def _execute_callback(
    method _handle_task_exception (line 1912) | def _handle_task_exception(self, task: asyncio.Task) -> None:
    method _execute_callback_safely (line 1919) | def _execute_callback_safely(
    method _execute_async_callback_safely (line 1931) | async def _execute_async_callback_safely(
    method _watch_matches_node (line 1943) | def _watch_matches_node(self, config: WatchConfig, node: TokenNode) ->...

FILE: src/mcp_agent/tracing/token_tracking_decorator.py
  function track_tokens (line 10) | def track_tokens(

FILE: src/mcp_agent/tracing/tracer.py
  class TracingConfig (line 22) | class TracingConfig:
    method __init__ (line 30) | def __init__(self):
    method configure (line 33) | async def configure(
    method get_tracer (line 242) | def get_tracer(self, name: str):
    method flush (line 248) | async def flush(self, timeout_ms: int = 5000) -> bool:
    method shutdown (line 276) | def shutdown(self):

FILE: src/mcp_agent/utils/common.py
  function unwrap (line 16) | def unwrap(c: Callable[..., Any]) -> Callable[..., Any]:
  function typed_dict_extras (line 27) | def typed_dict_extras(d: dict, exclude: List[str]):
  function to_string (line 32) | def to_string(obj: BaseModel | dict) -> str:
  function ensure_serializable (line 42) | def ensure_serializable(data: BaseModel) -> BaseModel:

FILE: src/mcp_agent/utils/content_utils.py
  function get_text (line 19) | def get_text(
  function get_image_data (line 44) | def get_image_data(
  function get_resource_uri (line 68) | def get_resource_uri(
  function is_text_content (line 86) | def is_text_content(
  function is_image_content (line 101) | def is_image_content(
  function is_resource_content (line 116) | def is_resource_content(

FILE: src/mcp_agent/utils/mime_utils.py
  function guess_mime_type (line 41) | def guess_mime_type(file_path: str) -> str:
  function is_text_mime_type (line 49) | def is_text_mime_type(mime_type: str) -> bool:
  function is_binary_content (line 69) | def is_binary_content(mime_type: str) -> bool:
  function is_image_mime_type (line 74) | def is_image_mime_type(mime_type: str) -> bool:
  function image_url_to_mime_and_base64 (line 79) | def image_url_to_mime_and_base64(image_url: str) -> tuple[str, str]:

FILE: src/mcp_agent/utils/prompt_message_multipart.py
  class PromptMessageMultipart (line 16) | class PromptMessageMultipart(BaseModel):
    method to_multipart (line 26) | def to_multipart(
    method from_multipart (line 55) | def from_multipart(self) -> List[PromptMessage]:
    method first_text (line 62) | def first_text(self) -> str:
    method last_text (line 79) | def last_text(self) -> str:
    method all_text (line 97) | def all_text(self) -> str:
    method add_text (line 115) | def add_text(self, to_add: str) -> TextContent:
    method parse_get_prompt_result (line 121) | def parse_get_prompt_result(
    method from_get_prompt_result (line 136) | def from_get_prompt_result(

FILE: src/mcp_agent/utils/pydantic_type_serializer.py
  function is_pydantic_undefined (line 52) | def is_pydantic_undefined(obj: Any) -> bool:
  function make_serializable (line 61) | def make_serializable(value: Any) -> Any:
  class PydanticTypeSerializer (line 76) | class PydanticTypeSerializer(BaseModel):
    class Config (line 83) | class Config:
    method _get_type_origin_name (line 87) | def _get_type_origin_name(origin: Any) -> str:
    method serialize_type (line 112) | def serialize_type(typ: Any) -> Dict[str, Any]:
    method _serialize_validators (line 246) | def _serialize_validators(model_class: Type[BaseModel]) -> List[Dict[s...
    method _get_all_fields (line 319) | def _get_all_fields(model_class: Type[BaseModel]) -> Dict[str, Dict[st...
    method _serialize_fields (line 348) | def _serialize_fields(model_class: Type[BaseModel]) -> Dict[str, Dict[...
    method _serialize_config (line 437) | def _serialize_config(model_class: Type[BaseModel]) -> Dict[str, Any]:
    method deserialize_type (line 478) | def deserialize_type(serialized: Dict[str, Any]) -> Any:
    method reconstruct_model (line 626) | def reconstruct_model(serialized: Dict[str, Any]) -> Type[BaseModel]:
    method serialize_model_type (line 786) | def serialize_model_type(cls, model_class: Type[BaseModel]) -> Dict[st...
    method deserialize_model_type (line 799) | def deserialize_model_type(cls, serialized: Dict[str, Any]) -> Type[Ba...
  class PydanticTypeEncoder (line 813) | class PydanticTypeEncoder(json.JSONEncoder):
    method default (line 816) | def default(self, obj):
  function json_object_hook (line 901) | def json_object_hook(obj: Dict[str, Any]) -> Any:
  function serialize_model (line 932) | def serialize_model(model_type: Type[BaseModel]) -> str:
  function deserialize_model (line 946) | def deserialize_model(serialized_json: str) -> Type[BaseModel]:

FILE: src/mcp_agent/utils/resource_utils.py
  function find_resource_file (line 21) | def find_resource_file(resource_path: str, prompt_files: List[Path]) -> ...
  function load_resource_content (line 30) | def load_resource_content(
  function create_resource_uri (line 71) | def create_resource_uri(path: str) -> str:
  function create_resource_reference (line 76) | def create_resource_reference(uri: str, mime_type: str) -> "EmbeddedReso...
  function create_embedded_resource (line 102) | def create_embedded_resource(
  function create_image_content (line 133) | def create_image_content(data: str, mime_type: str) -> ImageContent:
  function create_blob_resource (line 142) | def create_blob_resource(
  function create_text_resource (line 156) | def create_text_resource(
  function normalize_uri (line 170) | def normalize_uri(uri_or_filename: str) -> str:
  function extract_title_from_uri (line 199) | def extract_title_from_uri(uri: AnyUrl) -> str:

FILE: src/mcp_agent/utils/tool_filter.py
  class ToolFilter (line 18) | class ToolFilter:
    method __init__ (line 30) | def __init__(
    method _extract_server_and_tool_name (line 61) | def _extract_server_and_tool_name(
    method _check_server_filters (line 93) | def _check_server_filters(self, server_name: str, tool_name: str) -> O...
    method should_include_tool (line 119) | def should_include_tool(self, tool: Tool) -> bool:
    method filter_tools (line 159) | def filter_tools(self, tools: List[Tool]) -> List[Tool]:
  function apply_tool_filter (line 172) | def apply_tool_filter(llm_instance, tool_filter: Optional[ToolFilter]):
  function get_filtered_tools (line 248) | async def get_filtered_tools(agent, tool_filter: Optional[ToolFilter]) -...

FILE: src/mcp_agent/workflows/deep_orchestrator/budget.py
  class SimpleBudget (line 18) | class SimpleBudget:
    method update_tokens (line 34) | def update_tokens(self, tokens: int) -> None:
    method is_exceeded (line 49) | def is_exceeded(self) -> Tuple[bool, Optional[str]]:
    method get_usage_pct (line 78) | def get_usage_pct(self) -> Dict[str, float]:
    method get_remaining (line 96) | def get_remaining(self) -> Dict[str, float]:
    method is_critical (line 112) | def is_critical(self, threshold: float = 0.9) -> bool:
    method get_status_summary (line 125) | def get_status_summary(self) -> str:
    method reset (line 143) | def reset(self) -> None:

FILE: src/mcp_agent/workflows/deep_orchestrator/cache.py
  class AgentCache (line 16) | class AgentCache:
    method __init__ (line 23) | def __init__(self, max_size: int = 50):
    method get_key (line 35) | def get_key(self, task_desc: str, servers: List[str]) -> Tuple[str, ...]:
    method get (line 50) | def get(self, key: Tuple[str, ...]) -> Optional[Agent]:
    method put (line 67) | def put(self, key: Tuple[str, ...], agent: Agent) -> None:

FILE: src/mcp_agent/workflows/deep_orchestrator/config.py
  class ExecutionConfig (line 16) | class ExecutionConfig(BaseModel):
  class ContextConfig (line 35) | class ContextConfig(BaseModel):
  class BudgetConfig (line 54) | class BudgetConfig(BaseModel):
  class PolicyConfig (line 70) | class PolicyConfig(BaseModel):
  class CacheConfig (line 86) | class CacheConfig(BaseModel):
  class DeepOrchestratorConfig (line 96) | class DeepOrchestratorConfig(BaseModel):
    method from_simple (line 119) | def from_simple(
    method with_strict_budget (line 152) | def with_strict_budget(
    method with_resilient_execution (line 174) | def with_resilient_execution(
    method with_minimal_context (line 196) | def with_minimal_context(

FILE: src/mcp_agent/workflows/deep_orchestrator/context_builder.py
  class ContextBuilder (line 21) | class ContextBuilder:
    method __init__ (line 24) | def __init__(
    method build_task_context (line 61) | def build_task_context(self, task: Task) -> str:
    method build_basic_task_context (line 84) | def build_basic_task_context(self, task: Task) -> str:
    method build_full_task_context (line 128) | def build_full_task_context(self, task: Task) -> str:
    method build_relevant_task_context (line 239) | def build_relevant_task_context(self, task: Task) -> str:
    method get_context_usage_stats (line 402) | def get_context_usage_stats(self) -> Dict[str, Any]:
    method _gather_context_sources (line 430) | def _gather_context_sources(self, task: Task) -> List[Dict[str, Any]]:
    method _find_task_result_by_name (line 466) | def _find_task_result_by_name(self, task_name: str) -> Optional[TaskRe...
    method _find_step_for_task (line 473) | def _find_step_for_task(self, task_name: str) -> Optional[str]:
    method _calculate_relevance (line 481) | def _calculate_relevance(
    method _format_task_result_for_context (line 533) | def _format_task_result_for_context(
    method _compress_context_source (line 553) | def _compress_context_source(self, source: Dict[str, Any]) -> Dict[str...
    method _get_prioritized_knowledge (line 583) | def _get_prioritized_knowledge(
    method _calculate_knowledge_relevance (line 616) | def _calculate_knowledge_relevance(
    method _estimate_tokens (line 635) | def _estimate_tokens(self, text: str) -> int:

FILE: src/mcp_agent/workflows/deep_orchestrator/knowledge.py
  class KnowledgeExtractor (line 29) | class KnowledgeExtractor:
    method __init__ (line 32) | def __init__(
    method extract_knowledge (line 47) | async def extract_knowledge(
    method extract_batch (line 138) | async def extract_batch(

FILE: src/mcp_agent/workflows/deep_orchestrator/memory.py
  class WorkspaceMemory (line 18) | class WorkspaceMemory:
    method __init__ (line 27) | def __init__(
    method save_artifact (line 62) | def save_artifact(
    method get_artifact (line 82) | def get_artifact(self, name: str) -> Optional[str]:
    method add_knowledge (line 94) | def add_knowledge(self, item: KnowledgeItem) -> None:
    method get_relevant_knowledge (line 108) | def get_relevant_knowledge(
    method get_knowledge_summary (line 154) | def get_knowledge_summary(self, limit: int = 10) -> str:
    method add_task_result (line 193) | def add_task_result(self, result: TaskResult) -> None:
    method estimate_context_size (line 217) | def estimate_context_size(self) -> int:
    method trim_for_context (line 243) | def trim_for_context(self, max_tokens: int = 50000) -> int:
    method get_scratchpad_path (line 284) | def get_scratchpad_path(self) -> Optional[Path]:
    method clear (line 295) | def clear(self) -> None:
    method get_stats (line 304) | def get_stats(self) -> Dict[str, int]:

FILE: src/mcp_agent/workflows/deep_orchestrator/models.py
  class TaskStatus (line 16) | class TaskStatus(str, Enum):
  class PolicyAction (line 26) | class PolicyAction(str, Enum):
  class KnowledgeItem (line 41) | class KnowledgeItem:
    method to_dict (line 51) | def to_dict(self) -> Dict[str, Any]:
  class TaskResult (line 64) | class TaskResult:
    method success (line 77) | def success(self) -> bool:
  class Task (line 87) | class Task(BaseModel):
    method get_hash_key (line 116) | def get_hash_key(self) -> Tuple[str, ...]:
  class Step (line 121) | class Step(BaseModel):
  class Plan (line 131) | class Plan(BaseModel):
  class ExtractedKnowledge (line 146) | class ExtractedKnowledge(BaseModel):
  class AgentDesign (line 159) | class AgentDesign(BaseModel):
  class PlanVerificationError (line 182) | class PlanVerificationError(BaseModel):
  class PlanVerificationResult (line 200) | class PlanVerificationResult(BaseModel):
    method add_error (line 207) | def add_error(self, category: str, message: str, **kwargs) -> None:
    method get_error_summary (line 214) | def get_error_summary(self) -> str:
  class VerificationResult (line 251) | class VerificationResult(BaseModel):

FILE: src/mcp_agent/workflows/deep_orchestrator/orchestrator.py
  class DeepOrchestrator (line 63) | class DeepOrchestrator(AugmentedLLM[MessageParamT, MessageT]):
    method __init__ (line 94) | def __init__(
    method _initialize_components (line 152) | def _initialize_components(self):
    method _initialize_execution_components (line 192) | def _initialize_execution_components(self, objective: str):
    method generate (line 225) | async def generate(
    method _execute_workflow (line 291) | async def _execute_workflow(
    method _create_full_plan (line 428) | async def _create_full_plan(self) -> Plan:
    method _verify_completion (line 555) | async def _verify_completion(self) -> tuple[bool, float]:
    method _create_final_synthesis (line 595) | async def _create_final_synthesis(self) -> List[MessageT]:
    method _emergency_completion (line 672) | async def _emergency_completion(self, error: str) -> List[MessageT]:
    method _extract_objective (line 715) | async def _extract_objective(
    method _create_simple_response (line 744) | async def _create_simple_response(self, content: str) -> List[MessageT]:
    method generate_str (line 764) | async def generate_str(
    method generate_structured (line 776) | async def generate_structured(

FILE: src/mcp_agent/workflows/deep_orchestrator/plan_verifier.py
  class PlanVerifier (line 16) | class PlanVerifier:
    method __init__ (line 19) | def __init__(
    method verify_plan (line 34) | def verify_plan(self, plan: Plan) -> PlanVerificationResult:
    method _verify_mcp_servers (line 70) | def _verify_mcp_servers(self, plan: Plan, result: PlanVerificationResu...
    method _verify_agent_names (line 91) | def _verify_agent_names(self, plan: Plan, result: PlanVerificationResu...
    method _verify_task_names (line 113) | def _verify_task_names(self, plan: Plan, result: PlanVerificationResul...
    method _verify_dependencies (line 134) | def _verify_dependencies(self, plan: Plan, result: PlanVerificationRes...
    method _verify_task_validity (line 172) | def _verify_task_validity(self, plan: Plan, result: PlanVerificationRe...

FILE: src/mcp_agent/workflows/deep_orchestrator/policy.py
  class PolicyEngine (line 17) | class PolicyEngine:
    method __init__ (line 25) | def __init__(
    method decide_action (line 56) | def decide_action(
    method record_success (line 120) | def record_success(self) -> None:
    method record_failure (line 126) | def record_failure(self) -> None:
    method get_failure_rate (line 135) | def get_failure_rate(self) -> float:
    method should_retry_task (line 147) | def should_retry_task(self, retry_count: int, max_retries: int = 3) ->...
    method get_status_summary (line 174) | def get_status_summary(self) -> str:
    method reset (line 189) | def reset(self) -> None:

FILE: src/mcp_agent/workflows/deep_orchestrator/prompts.py
  function get_planning_context (line 186) | def get_planning_context(
  function get_full_plan_prompt (line 257) | def get_full_plan_prompt(context: str) -> str:
  function get_task_context (line 271) | def get_task_context(
  function get_extraction_prompt (line 335) | def get_extraction_prompt(objective: str, task_output: str) -> str:
  function get_agent_design_prompt (line 356) | def get_agent_design_prompt(
  function build_agent_instruction (line 378) | def build_agent_instruction(design: dict) 
Condensed preview — 1132 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (8,799K chars).
[
  {
    "path": ".github/release-drafter.yml",
    "chars": 375,
    "preview": "name-template: \"v$NEXT_PATCH_VERSION\"\ntag-template: \"v$NEXT_PATCH_VERSION\"\ncategories:\n  - title: \"🚀 Features\"\n    label"
  },
  {
    "path": ".github/workflows/checks.yml",
    "chars": 1469,
    "preview": "name: Linting, formatting and other checks on codebase\n\non:\n  workflow_call:\n\njobs:\n  format:\n    runs-on: ubuntu-latest"
  },
  {
    "path": ".github/workflows/create-tag.yml",
    "chars": 1202,
    "preview": "name: Create Version Tag from pyproject.toml\n\non:\n  push:\n    branches:\n      - main\n    paths:\n      - \"pyproject.toml\""
  },
  {
    "path": ".github/workflows/main-checks.yml",
    "chars": 160,
    "preview": "name: Main Checks\n\non:\n  push:\n    branches:\n      - main\n      - \"v*.*.*\"\n    tags:\n      - \"v*.*.*\"\n\njobs:\n  checks:\n "
  },
  {
    "path": ".github/workflows/pr-checks.yml",
    "chars": 105,
    "preview": "name: Pull Request Checks\n\non:\n  pull_request:\n\njobs:\n  checks:\n    uses: ./.github/workflows/checks.yml\n"
  },
  {
    "path": ".github/workflows/publish-pypi.yml",
    "chars": 1190,
    "preview": "name: Publish Package to PyPI\n\non:\n  push:\n    tags:\n      - \"v*\" # Triggers on tags like v1.2.3\n\n  workflow_dispatch: #"
  },
  {
    "path": ".github/workflows/release-drafter.yml",
    "chars": 898,
    "preview": "name: Update Release Draft\n\non:\n  push:\n    branches:\n      - main\n\n  # pull_request event is required only for autolabe"
  },
  {
    "path": ".gitignore",
    "chars": 3732,
    "preview": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packagi"
  },
  {
    "path": ".pre-commit-config.yaml",
    "chars": 223,
    "preview": "repos:\n  - repo: https://github.com/astral-sh/ruff-pre-commit\n    # Ruff version.\n    rev: v0.8.4\n    hooks:\n      # Run"
  },
  {
    "path": ".prettierignore",
    "chars": 5,
    "preview": "/docs"
  },
  {
    "path": ".python-version",
    "chars": 5,
    "preview": "3.10\n"
  },
  {
    "path": ".vscode/extensions.json",
    "chars": 74,
    "preview": "{\n  \"recommendations\": [\"esbenp.prettier-vscode\", \"charliermarsh.ruff\"]\n}\n"
  },
  {
    "path": ".vscode/launch.json",
    "chars": 675,
    "preview": "{\n    // Use IntelliSense to learn about possible attributes.\n    // Hover to view descriptions of existing attributes.\n"
  },
  {
    "path": ".vscode/settings.json",
    "chars": 536,
    "preview": "{\n  \"editor.formatOnSave\": true,\n  \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n  \"[python]\": {\n    \"editor.defa"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 4937,
    "preview": "# Contributing\n\nWe welcome **all** kinds of contributions - bug fixes, big features, docs, examples and more. _You don't"
  },
  {
    "path": "LICENSE",
    "chars": 11357,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "LLMS.txt",
    "chars": 312823,
    "preview": "# Project Structure and Function Definitions\n\nThis file contains the project directory structure and function definition"
  },
  {
    "path": "Makefile",
    "chars": 1046,
    "preview": ".PHONY: sync\nsync:\n\tuv sync --all-extras --all-packages --group dev\n\n# Linter and Formatter\n.PHONY: format\nformat: \n\tuv "
  },
  {
    "path": "README.md",
    "chars": 35075,
    "preview": "<p align=\"center\">\n  <a href=\"https://docs.mcp-agent.com\"><img src=\"https://github.com/user-attachments/assets/c8d059e5-"
  },
  {
    "path": "SECURITY.md",
    "chars": 662,
    "preview": "# Security Policy\n\n## Supported Versions\n\nmcp-agent receives security updates for v0.2.x\n\n| Version | Supported         "
  },
  {
    "path": "docs/README.md",
    "chars": 324,
    "preview": "# mcp-agent Documentation\n\n## Development\n\nInstall the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview"
  },
  {
    "path": "docs/advanced/composition.mdx",
    "chars": 43654,
    "preview": "---\ntitle: \"Workflow Pattern Composition\"\ndescription: \"Advanced patterns for composing and orchestrating complex agent "
  },
  {
    "path": "docs/advanced/monitoring.mdx",
    "chars": 70606,
    "preview": "---\ntitle: \"Observability & Monitoring\"\ndescription: \"Comprehensive observability setup for production agent workflows w"
  },
  {
    "path": "docs/advanced/temporal.mdx",
    "chars": 41586,
    "preview": "---\ntitle: \"Temporal Integration\"\ndescription: \"Build durable, scalable agent workflows with Temporal orchestration\"\n---"
  },
  {
    "path": "docs/cloud/authentication/deployment-auth.mdx",
    "chars": 4232,
    "preview": "---\ntitle: Deployment Auth\nsidebarTitle: \"Deployment Auth\"\ndescription: \"Configure authentication for deployed MCP serve"
  },
  {
    "path": "docs/cloud/authentication/external-mcp-auth.mdx",
    "chars": 4351,
    "preview": "---\ntitle: External MCP Auth\nsidebarTitle: \"External MCP Auth\"\ndescription: \"Configure your agent to authenticate when c"
  },
  {
    "path": "docs/cloud/authentication/overview.mdx",
    "chars": 3897,
    "preview": "---\ntitle: Authentication Overview\nsidebarTitle: \"Overview\"\ndescription: \"Authentication architecture for mcp-agent clou"
  },
  {
    "path": "docs/cloud/deployment-quickstart.mdx",
    "chars": 4269,
    "preview": "---\ntitle: Cloud Quickstart\ndescription: \"Deploy an MCP application to mcp-c in a couple of commands\"\nicon: rocket\n---\n\n"
  },
  {
    "path": "docs/cloud/mcp-agent-cloud/deploy-mcp-server.mdx",
    "chars": 6608,
    "preview": "---\ntitle: \"Deploying MCP Servers\"\ndescription: \"Ship FastMCP or custom MCP servers on mcp-agent cloud infrastructure\"\n-"
  },
  {
    "path": "docs/cloud/mcp-agent-cloud/long-running-tools.mdx",
    "chars": 7114,
    "preview": "---\ntitle: Long-Running Tools\nsidebarTitle: \"Long-Running Tools\"\ndescription: \"Design synchronous tools, async tools, an"
  },
  {
    "path": "docs/cloud/mcp-agent-cloud/manage-secrets.mdx",
    "chars": 9799,
    "preview": "---\ntitle: Manage Secrets\nsidebarTitle: \"Manage Secrets\"\ndescription: \"Securely handle API keys and user-provided creden"
  },
  {
    "path": "docs/cloud/mcp-agent-cloud/overview.mdx",
    "chars": 6947,
    "preview": "---\ntitle: mcp-c\ndescription: \"[Beta] Deploy, orchestrate, and observe MCP applications on managed infrastructure\"\n---\n\n"
  },
  {
    "path": "docs/cloud/mcp-agent-cloud/use-deployed-server.mdx",
    "chars": 6201,
    "preview": "---\ntitle: Use a Deployed Server\nsidebarTitle: \"Use a Deployed Server\"\ndescription: \"Configure clients, share endpoints,"
  },
  {
    "path": "docs/cloud/observability.mdx",
    "chars": 4959,
    "preview": "---\ntitle: Observability\nsidebarTitle: \"Observability\"\ndescription: \"Stream logs, emit traces, and integrate mcp-agent c"
  },
  {
    "path": "docs/cloud/overview.mdx",
    "chars": 5217,
    "preview": "---\ntitle: Deployment Overview\nsidebarTitle: \"Overview\"\ndescription: \"Deploy mcp-agent applications to production\"\nicon:"
  },
  {
    "path": "docs/cloud/use-cases/build-chatgpt-apps.mdx",
    "chars": 6409,
    "preview": "---\ntitle: How to build a ChatGPT App\nsidebarTitle: \"Build ChatGPT Apps\"\ndescription: \"A tutorial for building and deplo"
  },
  {
    "path": "docs/cloud/use-cases/deploy-agents.mdx",
    "chars": 5948,
    "preview": "---\ntitle: Deploy Agents\nsidebarTitle: \"Deploy Agents\"\ndescription: \"Ship full mcp-agent applications with workflows, mu"
  },
  {
    "path": "docs/cloud/use-cases/deploy-chatgpt-apps.mdx",
    "chars": 5581,
    "preview": "---\ntitle: Deploy ChatGPT Apps\nsidebarTitle: \"Deploy ChatGPT Apps\"\ndescription: \"Expose mcp-agent servers as OpenAI Chat"
  },
  {
    "path": "docs/cloud/use-cases/deploy-mcp-servers.mdx",
    "chars": 3003,
    "preview": "---\ntitle: Deploy MCP Servers\nsidebarTitle: \"Deploy MCP Servers\"\ndescription: \"Host standalone MCP servers—FastMCP, cust"
  },
  {
    "path": "docs/concepts/agents.mdx",
    "chars": 8860,
    "preview": "---\ntitle: Agents\ndescription: \"Understanding agents and how to use them in the mcp-agent framework.\"\n---\n\n\n## What is a"
  },
  {
    "path": "docs/concepts/augmented-llms.mdx",
    "chars": 13552,
    "preview": "---\ntitle: \"Augmented LLMs\"\ndescription: \"Understanding augmented LLMs in mcp-agent - enhanced language models with tool"
  },
  {
    "path": "docs/concepts/elicitation.mdx",
    "chars": 4057,
    "preview": "---\ntitle: \"Elicitation\"\ndescription: \"Allows MCP servers to request additional information from users.\"\n---\n\nElicitatio"
  },
  {
    "path": "docs/concepts/execution-engines.mdx",
    "chars": 5052,
    "preview": "---\ntitle: Execution Engines\ndescription: \"Understanding execution engines and executors in mcp-agent\"\n---\n\n## Overview\n"
  },
  {
    "path": "docs/concepts/mcp-primitives.mdx",
    "chars": 10730,
    "preview": "---\ntitle: \"MCP Primitives\"\ndescription: \"Learn how to use MCP server primitives like tools, resources, prompts, roots, "
  },
  {
    "path": "docs/concepts/mcp-servers.mdx",
    "chars": 12617,
    "preview": "---\ntitle: \"MCP Servers\"\ndescription: \"Understanding MCP servers and how to create, configure, and use them with mcp-age"
  },
  {
    "path": "docs/concepts/workflows.mdx",
    "chars": 16116,
    "preview": "---\ntitle: Workflows and Decorators\ndescription: \"Understanding the Workflow class and decorator-based tool definition i"
  },
  {
    "path": "docs/configuration.mdx",
    "chars": 32903,
    "preview": "# Configuration\n\nLearn how to configure mcp-agent using configuration files to control logging, execution, model provide"
  },
  {
    "path": "docs/css/style.css",
    "chars": 499,
    "preview": "/* Logo sizing */\nimg.nav-logo {\n  max-width: 200px;\n}\n\n/* Inline code highlighting - Blue theme for mcp-agent */\np code"
  },
  {
    "path": "docs/css/version-badge.css",
    "chars": 637,
    "preview": ".version-badge {\n  display: inline-block;\n  font-size: 1em;\n  padding: 6px 20px;\n  font-family: \"Inter\", sans-serif;\n  c"
  },
  {
    "path": "docs/docs.json",
    "chars": 6717,
    "preview": "{\n  \"$schema\": \"https://mintlify.com/docs.json\",\n  \"name\": \"mcp-agent\",\n  \"logo\": {\n    \"light\": \"/logo/phetch.gif\",\n   "
  },
  {
    "path": "docs/get-started/cloud.mdx",
    "chars": 6479,
    "preview": "---\ntitle: \"MCP-Cloud (mcp-c)\"\nsidebarTitle: \"Cloud\"\ndescription: \"Deploy and host your mcp-agents and apps on the cloud"
  },
  {
    "path": "docs/get-started/install.mdx",
    "chars": 3267,
    "preview": "---\ntitle: Installation\nsidebarTitle: \"Installation\"\ndescription: \"Set up mcp-agent, the CLI, and optional provider extr"
  },
  {
    "path": "docs/get-started/quickstart.mdx",
    "chars": 4930,
    "preview": "---\ntitle: Quickstart\nsidebarTitle: \"Quickstart\"\ndescription: \"Copy, paste, and run your first mcp-agent in minutes.\"\nic"
  },
  {
    "path": "docs/get-started/welcome.mdx",
    "chars": 3473,
    "preview": "---\ntitle: \"Welcome to mcp-agent\"\nsidebarTitle: \"Welcome\"\ndescription: Build effective agents with Model Context Protoco"
  },
  {
    "path": "docs/mcp/overview.mdx",
    "chars": 5969,
    "preview": "---\ntitle: MCP Capabilities\ndescription: \"How mcp-agent works with the Model Context Protocol (MCP)\"\n---\n\n## What is MCP"
  },
  {
    "path": "docs/mcp-agent-sdk/advanced/authentication.mdx",
    "chars": 5061,
    "preview": "---\ntitle: \"Authentication\"\nsidebarTitle: \"Authentication\"\ndescription: \"Secure outbound MCP server access and protect y"
  },
  {
    "path": "docs/mcp-agent-sdk/advanced/composition.mdx",
    "chars": 43654,
    "preview": "---\ntitle: \"Workflow Pattern Composition\"\ndescription: \"Advanced patterns for composing and orchestrating complex agent "
  },
  {
    "path": "docs/mcp-agent-sdk/advanced/durable-agents.mdx",
    "chars": 11302,
    "preview": "---\ntitle: \"Durable Agents (Temporal)\"\nsidebarTitle: \"Durable Agents\"\ndescription: \"Run long-lived MCP workflows with Te"
  },
  {
    "path": "docs/mcp-agent-sdk/advanced/logging.mdx",
    "chars": 5131,
    "preview": "---\ntitle: \"Logging\"\nsidebarTitle: \"Logging\"\ndescription: \"Configure structured logging pipelines for mcp-agent\"\nicon: f"
  },
  {
    "path": "docs/mcp-agent-sdk/advanced/observability.mdx",
    "chars": 8026,
    "preview": "---\ntitle: \"Observability\"\nsidebarTitle: \"Observability\"\ndescription: \"Collect traces, metrics, and token usage from mcp"
  },
  {
    "path": "docs/mcp-agent-sdk/advanced/pause-and-resume.mdx",
    "chars": 583,
    "preview": "---\ntitle: Pause and Resume\nsidebarTitle: \"Pause and Resume\"\ndescription: \"Pause and resume workflows with human-in-the-"
  },
  {
    "path": "docs/mcp-agent-sdk/core-components/agents.mdx",
    "chars": 10351,
    "preview": "---\ntitle: Agents\nsidebarTitle: Agents\ndescription: \"Understanding agents and how to use them in the mcp-agent framework"
  },
  {
    "path": "docs/mcp-agent-sdk/core-components/augmented-llm.mdx",
    "chars": 13564,
    "preview": "---\ntitle: \"Augmented LLMs\"\ndescription: \"Understanding augmented LLMs in mcp-agent - enhanced language models with tool"
  },
  {
    "path": "docs/mcp-agent-sdk/core-components/configuring-your-application.mdx",
    "chars": 8767,
    "preview": "---\ntitle: Configuring Your Application\nsidebarTitle: \"Configuring Your Application\"\ndescription: \"Learn how to configur"
  },
  {
    "path": "docs/mcp-agent-sdk/core-components/connecting-to-mcp-servers.mdx",
    "chars": 7105,
    "preview": "---\ntitle: Connecting to MCP Servers\nsidebarTitle: \"Connecting to MCP Servers\"\ndescription: \"Learn how to connect to MCP"
  },
  {
    "path": "docs/mcp-agent-sdk/core-components/execution-engine.mdx",
    "chars": 6291,
    "preview": "---\ntitle: Execution Engines\ndescription: \"Understanding execution engines and executors in mcp-agent\"\nicon: engine\n---\n"
  },
  {
    "path": "docs/mcp-agent-sdk/core-components/mcp-servers.mdx",
    "chars": 12630,
    "preview": "---\ntitle: \"MCP Servers\"\ndescription: \"Understanding MCP servers and how to create, configure, and use them with mcp-age"
  },
  {
    "path": "docs/mcp-agent-sdk/core-components/mcpapp.mdx",
    "chars": 8579,
    "preview": "---\ntitle: MCPApp\nsidebarTitle: \"MCPApp\"\ndescription: \"The central application context for mcp-agent\"\nicon: cube\n---\n\n##"
  },
  {
    "path": "docs/mcp-agent-sdk/core-components/specify-secrets.mdx",
    "chars": 4812,
    "preview": "---\ntitle: Specify Secrets\nsidebarTitle: \"Specify Secrets\"\ndescription: \"Manage API keys and sensitive credentials secur"
  },
  {
    "path": "docs/mcp-agent-sdk/core-components/workflows.mdx",
    "chars": 14738,
    "preview": "---\ntitle: Workflows and Decorators\ndescription: \"Understanding the Workflow class and decorator-based tool definition i"
  },
  {
    "path": "docs/mcp-agent-sdk/effective-patterns/build-your-own.mdx",
    "chars": 8364,
    "preview": "---\ntitle: \"Build Your Own Pattern\"\ndescription: \"Compose custom agent workflows from the core building blocks\"\nicon: wa"
  },
  {
    "path": "docs/mcp-agent-sdk/effective-patterns/deep-research.mdx",
    "chars": 9624,
    "preview": "---\ntitle: \"Deep Research\"\ndescription: \"Adaptive research workflows with knowledge extraction and policy checks\"\nicon: "
  },
  {
    "path": "docs/mcp-agent-sdk/effective-patterns/evaluator-optimizer.mdx",
    "chars": 6106,
    "preview": "---\ntitle: \"Evaluator-Optimizer\"\ndescription: \"Iteratively refine LLM outputs with an evaluator loop\"\nicon: arrows-rotat"
  },
  {
    "path": "docs/mcp-agent-sdk/effective-patterns/intent-classifier.mdx",
    "chars": 6007,
    "preview": "---\ntitle: \"Intent Classifier\"\ndescription: \"Classify free-form requests into discrete intents using LLMs or embeddings\""
  },
  {
    "path": "docs/mcp-agent-sdk/effective-patterns/map-reduce.mdx",
    "chars": 6333,
    "preview": "---\ntitle: \"Parallel (Map-Reduce)\"\ndescription: \"Fan-out/fan-in workflows that let multiple specialists work in parallel"
  },
  {
    "path": "docs/mcp-agent-sdk/effective-patterns/overview.mdx",
    "chars": 5841,
    "preview": "---\ntitle: \"Overview\"\ndescription: \"Choose the right workflow pattern for your mcp-agent build\"\nicon: stars\n---\n\nmcp-age"
  },
  {
    "path": "docs/mcp-agent-sdk/effective-patterns/planner.mdx",
    "chars": 6606,
    "preview": "---\ntitle: \"Planner (Orchestrator)\"\ndescription: \"Break complex objectives into coordinated steps\"\nicon: list-check\n---\n"
  },
  {
    "path": "docs/mcp-agent-sdk/effective-patterns/router.mdx",
    "chars": 6000,
    "preview": "---\ntitle: \"Router\"\ndescription: \"Intelligently dispatch requests to the best agent, MCP server, or function\"\nicon: rout"
  },
  {
    "path": "docs/mcp-agent-sdk/effective-patterns/swarm.mdx",
    "chars": 14787,
    "preview": "---\ntitle: \"Swarm\"\ndescription: \"OpenAI Swarm-compatible multi-agent handoffs with context preservation.\"\nicon: circle-n"
  },
  {
    "path": "docs/mcp-agent-sdk/mcp/agent-as-mcp-server.mdx",
    "chars": 7458,
    "preview": "---\ntitle: Agent Servers\ndescription: \"Expose an mcp-agent application as an MCP server\"\nicon: server\n---\n\n## Why turn a"
  },
  {
    "path": "docs/mcp-agent-sdk/mcp/overview.mdx",
    "chars": 10365,
    "preview": "---\ntitle: MCP Capabilities\ndescription: \"How mcp-agent integrates with the Model Context Protocol\"\nicon: plug\n---\n\nmcp-"
  },
  {
    "path": "docs/mcp-agent-sdk/mcp/server-authentication.mdx",
    "chars": 7452,
    "preview": "---\ntitle: Server Authentication\nsidebarTitle: \"Server Authentication\"\ndescription: \"Configure API keys and OAuth when c"
  },
  {
    "path": "docs/mcp-agent-sdk/overview.mdx",
    "chars": 8951,
    "preview": "---\ntitle: MCP Agent SDK Overview\nsidebarTitle: \"Overview\"\ndescription: \"Understanding the core components and patterns "
  },
  {
    "path": "docs/oauth_support_design.md",
    "chars": 7218,
    "preview": "# MCP Agent OAuth Support\n\n## Goals\n- Protect MCP Agent Cloud servers using OAuth 2.1 so MCP clients obtain tokens via s"
  },
  {
    "path": "docs/openai/deploy.mdx",
    "chars": 4080,
    "preview": "---\ntitle: Deploy and host a ChatGPT App\ndescription: \"Deploy and host your ChatGPT App (MCP server) so anyone can use i"
  },
  {
    "path": "docs/reference/cli.mdx",
    "chars": 13939,
    "preview": "---\ntitle: CLI Reference\ndescription: \"Work with mcp-agent projects and MCP Agent Cloud from the command line.\"\n---\n\nThe"
  },
  {
    "path": "docs/reference/configuration.mdx",
    "chars": 12936,
    "preview": "---\ntitle: Configuration\ndescription: \"Understand how mcp-agent loads settings, manages secrets, and connects to provide"
  },
  {
    "path": "docs/reference/decorators.mdx",
    "chars": 8329,
    "preview": "---\ntitle: Decorators Reference\nsidebarTitle: Decorators\ndescription: \"Author tools and workflows with MCPApp decorators"
  },
  {
    "path": "docs/roadmap.mdx",
    "chars": 8233,
    "preview": "---\ntitle: Roadmap\ndescription: \"Development roadmap for mcp-agent framework and MCP Agent Cloud\"\n---\n\n# Roadmap\n\nThis r"
  },
  {
    "path": "docs/snippets/version-badge.mdx",
    "chars": 147,
    "preview": "export const VersionBadge = ({ version }) => {\n  return (\n    <span className=\"version-badge\">\n      New in version: {ve"
  },
  {
    "path": "docs/streaming_guide.md",
    "chars": 13170,
    "preview": "# Streaming Support Guide\n\nThis guide explains how to use real-time streaming with mcp-agent to display LLM responses as"
  },
  {
    "path": "docs/test-evaluate/agent-evaluation.mdx",
    "chars": 4022,
    "preview": "---\ntitle: Agent Evaluation\nsidebarTitle: \"Agent Evaluation\"\ndescription: \"Evaluate agent performance and reliability\"\ni"
  },
  {
    "path": "docs/test-evaluate/mcp-eval.mdx",
    "chars": 5651,
    "preview": "---\ntitle: mcp-eval\nsidebarTitle: \"mcp-eval\"\ndescription: \"Comprehensive evaluation platform for MCP\"\nicon: chart-simple"
  },
  {
    "path": "docs/test-evaluate/server-evaluation.mdx",
    "chars": 3337,
    "preview": "---\ntitle: MCP Server Evaluation\nsidebarTitle: \"MCP Server Evaluation\"\ndescription: \"Test MCP server compatibility and f"
  },
  {
    "path": "docs/workflows/deep-orchestrator.mdx",
    "chars": 19528,
    "preview": "---\ntitle: Deep Orchestrator\ndescription: \"An adaptive multi-agent system with dynamic planning, knowledge extraction, a"
  },
  {
    "path": "docs/workflows/evaluator-optimizer.mdx",
    "chars": 4308,
    "preview": "---\ntitle: \"Evaluator-Optimizer\"\ndescription: \"Quality control with LLM-as-judge evaluation and iterative response refin"
  },
  {
    "path": "docs/workflows/intent-classifier.mdx",
    "chars": 3059,
    "preview": "---\ntitle: \"Intent Classifier\"\ndescription: \"Advanced intent recognition with confidence scoring and classification.\"\n--"
  },
  {
    "path": "docs/workflows/orchestrator.mdx",
    "chars": 13296,
    "preview": "---\ntitle: \"Orchestrator\"\ndescription: \"Complex multi-step workflows with dependency management and state coordination.\""
  },
  {
    "path": "docs/workflows/overview.mdx",
    "chars": 1826,
    "preview": "---\ntitle: \"Overview\"\ndescription: \"Complete implementation of industry-standard agent patterns - model-agnostic, compos"
  },
  {
    "path": "docs/workflows/parallel.mdx",
    "chars": 7550,
    "preview": "---\ntitle: \"Parallel\"\ndescription: \"Execute multiple tasks simultaneously with intelligent result aggregation and confli"
  },
  {
    "path": "docs/workflows/router.mdx",
    "chars": 11027,
    "preview": "---\ntitle: \"Router\"\ndescription: \"Intelligent task routing based on content analysis, user intent, and dynamic condition"
  },
  {
    "path": "docs/workflows/swarm.mdx",
    "chars": 14768,
    "preview": "---\ntitle: \"Swarm\"\ndescription: \"OpenAI Swarm-compatible multi-agent handoffs with context preservation.\"\n---\n\n\n![Swarm "
  },
  {
    "path": "examples/basic/agent_factory/README.md",
    "chars": 14439,
    "preview": "# Agent Factory\n\nThis folder shows how to define agents and compose powerful LLM workflows using the helpers in [`mcp_ag"
  },
  {
    "path": "examples/basic/agent_factory/agents.yaml",
    "chars": 359,
    "preview": "agents:\n  - name: finder\n    instruction: You can read files and fetch URLs\n    server_names: [filesystem, fetch]\n    # "
  },
  {
    "path": "examples/basic/agent_factory/auto_loaded_subagents.py",
    "chars": 1121,
    "preview": "import asyncio\n\nfrom mcp_agent.app import MCPApp\nfrom mcp_agent.workflows.factory import create_router_llm\n\n\nasync def m"
  },
  {
    "path": "examples/basic/agent_factory/load_and_route.py",
    "chars": 946,
    "preview": "import asyncio\n\nfrom pathlib import Path\n\nfrom mcp_agent.app import MCPApp\nfrom mcp_agent.workflows.factory import (\n   "
  },
  {
    "path": "examples/basic/agent_factory/main.py",
    "chars": 1185,
    "preview": "import asyncio\nfrom pathlib import Path\n\nfrom mcp_agent.core.context import Context\n\nfrom mcp_agent.app import MCPApp\nfr"
  },
  {
    "path": "examples/basic/agent_factory/mcp_agent.config.yaml",
    "chars": 1365,
    "preview": "$schema: ../../../schema/mcp-agent.config.schema.json\n\nexecution_engine: asyncio\n\nlogger:\n  type: console\n  level: debug"
  },
  {
    "path": "examples/basic/agent_factory/mcp_agent.secrets.yaml.example",
    "chars": 283,
    "preview": "# Copy to mcp_agent.secrets.yaml and fill in your API keys. Do not commit the secrets file.\n\nopenai:\n  api_key: \"sk-...\""
  },
  {
    "path": "examples/basic/agent_factory/orchestrator_demo.py",
    "chars": 1273,
    "preview": "import asyncio\n\nfrom pathlib import Path\n\nfrom mcp_agent.app import MCPApp\nfrom mcp_agent.workflows.factory import (\n   "
  },
  {
    "path": "examples/basic/agent_factory/parallel_demo.py",
    "chars": 1439,
    "preview": "import asyncio\n\nfrom mcp_agent.app import MCPApp\nfrom mcp_agent.workflows.factory import (\n    AgentSpec,\n    create_llm"
  },
  {
    "path": "examples/basic/agent_factory/requirements.txt",
    "chars": 169,
    "preview": "# Core framework dependency\nmcp-agent @ file://../../../  # Link to the local mcp-agent project root\n\n# Additional depen"
  },
  {
    "path": "examples/basic/agent_factory/run_worker.py",
    "chars": 489,
    "preview": "\"\"\"Run a Temporal worker for the agent factory demo.\"\"\"\n\nimport asyncio\nimport logging\n\nfrom mcp_agent.executor.temporal"
  },
  {
    "path": "examples/basic/functions/README.md",
    "chars": 2790,
    "preview": "# MCP Functions Agent Example\n\nThis example shows a \"math\" Agent using manually-defined functions to compute simple math"
  },
  {
    "path": "examples/basic/functions/main.py",
    "chars": 1971,
    "preview": "import asyncio\nimport time\nfrom typing import Optional\n\nfrom mcp_agent.core.context import Context\nfrom mcp_agent.app im"
  },
  {
    "path": "examples/basic/functions/mcp_agent.config.yaml",
    "chars": 501,
    "preview": "$schema: ../../../schema/mcp-agent.config.schema.json\n\nexecution_engine: asyncio\nlogger:\n  transports: [console, file]\n "
  },
  {
    "path": "examples/basic/functions/mcp_agent.secrets.yaml.example",
    "chars": 89,
    "preview": "$schema: ../../../schema/mcp-agent.config.schema.json\n\nopenai:\n  api_key: openai_api_key\n"
  },
  {
    "path": "examples/basic/functions/requirements.txt",
    "chars": 116,
    "preview": "# Core framework dependency\nmcp-agent @ file://../../../\n\n# Additional dependencies specific to this example\nopenai\n"
  },
  {
    "path": "examples/basic/mcp_basic_agent/README.md",
    "chars": 3842,
    "preview": "# Basic MCP Agent example\n\nThis MCP Agent app shows a \"finder\" Agent which has access to the [fetch](https://github.com/"
  },
  {
    "path": "examples/basic/mcp_basic_agent/main.py",
    "chars": 6222,
    "preview": "import asyncio\nimport os\nimport time\n\nfrom mcp_agent.app import MCPApp\nfrom mcp_agent.config import (\n    Settings,\n    "
  },
  {
    "path": "examples/basic/mcp_basic_agent/mcp_agent.config.yaml",
    "chars": 699,
    "preview": "$schema: ../../../schema/mcp-agent.config.schema.json\n\nexecution_engine: asyncio\nlogger:\n  transports: [console, file]\n "
  },
  {
    "path": "examples/basic/mcp_basic_agent/mcp_agent.secrets.yaml.example",
    "chars": 675,
    "preview": "$schema: ../../../schema/mcp-agent.config.schema.json\n\n# Copy this file to mcp_agent.secrets.yaml and fill in your API k"
  },
  {
    "path": "examples/basic/mcp_basic_agent/requirements.txt",
    "chars": 169,
    "preview": "# Core framework dependency\nmcp-agent @ file://../../../  # Link to the local mcp-agent project root\n\n# Additional depen"
  },
  {
    "path": "examples/basic/mcp_hello_world/README.md",
    "chars": 1411,
    "preview": "# Simplest Usage of MCP Agent - Hello World!\n\nThis MCP Agent app uses a client to connect to the [fetch server](https://"
  },
  {
    "path": "examples/basic/mcp_hello_world/main.py",
    "chars": 2696,
    "preview": "import asyncio\n\nfrom mcp_agent.app import MCPApp\nfrom mcp_agent.mcp.gen_client import gen_client\nfrom mcp_agent.mcp.mcp_"
  },
  {
    "path": "examples/basic/mcp_hello_world/mcp_agent.config.yaml",
    "chars": 331,
    "preview": "$schema: ../../../schema/mcp-agent.config.schema.json\n\nexecution_engine: asyncio\nlogger:\n  type: console\n  level: info\n "
  },
  {
    "path": "examples/basic/mcp_hello_world/mcp_agent.secrets.yaml.example",
    "chars": 130,
    "preview": "$schema: ../../../schema/mcp-agent.config.schema.json\n\nopenai:\n  api_key: openai_api_key\n\nanthropic:\n  api_key: anthropi"
  },
  {
    "path": "examples/basic/mcp_hello_world/requirements.txt",
    "chars": 152,
    "preview": "# Core framework dependency\nmcp-agent @ file://../../../  # Link to the local mcp-agent project root\n\n# Additional depen"
  },
  {
    "path": "examples/basic/mcp_model_selector/README.md",
    "chars": 3106,
    "preview": "# LLM Selector example\n\nThis example shows using MCP's ModelPreferences type to select a model (LLM) based on speed, cos"
  },
  {
    "path": "examples/basic/mcp_model_selector/interactive.py",
    "chars": 10308,
    "preview": "import asyncio\nfrom typing import Optional\nimport typer\nfrom rich.console import Console\nfrom rich.prompt import FloatPr"
  },
  {
    "path": "examples/basic/mcp_model_selector/main.py",
    "chars": 8160,
    "preview": "import asyncio\n\nfrom mcp.types import ModelHint, ModelPreferences\n\nfrom mcp_agent.app import MCPApp\nfrom mcp_agent.loggi"
  },
  {
    "path": "examples/basic/mcp_model_selector/mcp_agent.config.yaml",
    "chars": 301,
    "preview": "$schema: ../../../schema/mcp-agent.config.schema.json\n\nexecution_engine: asyncio\nlogger:\n  type: console\n  level: debug\n"
  },
  {
    "path": "examples/basic/mcp_model_selector/requirements.txt",
    "chars": 163,
    "preview": "# Core framework dependency\nmcp-agent @ file://../../../  # Link to the local mcp-agent project root\n\n# Additional depen"
  },
  {
    "path": "examples/basic/mcp_server_aggregator/README.md",
    "chars": 2695,
    "preview": "# MCP aggregator example\n\nThis example shows connecting to multiple MCP servers via the MCPAggregator interface. An MCP "
  },
  {
    "path": "examples/basic/mcp_server_aggregator/main.py",
    "chars": 5188,
    "preview": "import asyncio\nfrom pathlib import Path\n\nfrom mcp_agent.app import MCPApp\nfrom mcp_agent.logging.logger import get_logge"
  },
  {
    "path": "examples/basic/mcp_server_aggregator/mcp_agent.config.yaml",
    "chars": 306,
    "preview": "$schema: ../../../schema/mcp-agent.config.schema.json\n\nexecution_engine: asyncio\nlogger:\n  type: console\n  level: debug\n"
  },
  {
    "path": "examples/basic/mcp_server_aggregator/requirements.txt",
    "chars": 152,
    "preview": "# Core framework dependency\nmcp-agent @ file://../../../  # Link to the local mcp-agent project root\n\n# Additional depen"
  },
  {
    "path": "examples/basic/mcp_tool_filter/README.md",
    "chars": 3322,
    "preview": "# MCP Tool Filter Example\n\nThis example demonstrates a **non-invasive** approach to filtering MCP tools without modifyin"
  },
  {
    "path": "examples/basic/mcp_tool_filter/main.py",
    "chars": 7730,
    "preview": "\"\"\"\nMCP Tool Filter Example\n\nThis example demonstrates how to filter MCP tools without modifying any core code.\n\"\"\"\n\nimp"
  },
  {
    "path": "examples/basic/mcp_tool_filter/mcp_agent.config.yaml",
    "chars": 650,
    "preview": "$schema: ../../../schema/mcp-agent.config.schema.json\n\nexecution_engine: asyncio\nlogger:\n  transports: [console, file]\n "
  },
  {
    "path": "examples/basic/mcp_tool_filter/mcp_agent.secrets.yaml.example",
    "chars": 160,
    "preview": "# Copy this file to mcp_agent.secrets.yaml and add your API keys\n\nopenai:\n  api_key: \"sk-your-openai-api-key\"\n\nanthropic"
  },
  {
    "path": "examples/basic/mcp_tool_filter/quickstart.py",
    "chars": 1531,
    "preview": "#!/usr/bin/env python3\n\"\"\"\nQuickstart example for MCP Tool Filter\n\nThis is the minimal code needed to use tool filtering"
  },
  {
    "path": "examples/basic/mcp_tool_filter/requirements.txt",
    "chars": 169,
    "preview": "# Core framework dependency\nmcp-agent @ file://../../../  # Link to the local mcp-agent project root\n\n# Additional depen"
  },
  {
    "path": "examples/basic/oauth_basic_agent/README.md",
    "chars": 1272,
    "preview": "# OAuth Basic MCP Agent example (client-only loopback)\n\nThis example mirrors `mcp_basic_agent` but adds GitHub MCP with "
  },
  {
    "path": "examples/basic/oauth_basic_agent/main.py",
    "chars": 5218,
    "preview": "import asyncio\nimport inspect\nimport os\nimport time\n\nfrom mcp_agent.app import MCPApp\nfrom mcp_agent.config import get_s"
  },
  {
    "path": "examples/basic/oauth_basic_agent/mcp_agent.config.yaml",
    "chars": 904,
    "preview": "$schema: ../../../schema/mcp-agent.config.schema.json\n\nexecution_engine: asyncio\nlogger:\n  transports: [console, file]\n "
  },
  {
    "path": "examples/basic/oauth_basic_agent/mcp_agent.secrets.yaml.example",
    "chars": 366,
    "preview": "$schema: ../../../schema/mcp-agent.config.schema.json\n\n# Copy to mcp_agent.secrets.yaml and fill in API keys and GitHub "
  },
  {
    "path": "examples/basic/oauth_basic_agent/requirements.txt",
    "chars": 13,
    "preview": "-e ../../..\n\n"
  },
  {
    "path": "examples/basic/streaming_demo/README.md",
    "chars": 5115,
    "preview": "# Streaming Demo\n\nThis example demonstrates the **real-time streaming capabilities** of mcp-agent, showing how to stream"
  },
  {
    "path": "examples/basic/streaming_demo/main.py",
    "chars": 9886,
    "preview": "\"\"\"\nStreaming Demo - Real-time LLM Response Streaming\n\nThis example demonstrates the streaming capabilities of mcp-agent"
  },
  {
    "path": "examples/basic/streaming_demo/mcp_agent.config.yaml",
    "chars": 332,
    "preview": "# Streaming Demo Configuration\n\n# Default LLM model to use\ndefault_model: claude-3-5-sonnet-20241022\n\n# Optional: Config"
  },
  {
    "path": "examples/basic/streaming_demo/mcp_agent.secrets.yaml.example",
    "chars": 286,
    "preview": "# Copy this file to mcp_agent.secrets.yaml and add your API keys\n\nanthropic:\n  api_key: your-anthropic-api-key-here\n\n# O"
  },
  {
    "path": "examples/basic/streaming_demo/requirements.txt",
    "chars": 103,
    "preview": "# Core dependencies\n-e ../../../  # mcp-agent\n\n# UI dependencies for rich terminal output\nrich>=13.0.0\n"
  },
  {
    "path": "examples/basic/token_counter/README.md",
    "chars": 5034,
    "preview": "# Token Counter Example\n\nThis example demonstrates the MCP Agent's token counting capabilities with custom monitoring an"
  },
  {
    "path": "examples/basic/token_counter/main.py",
    "chars": 9043,
    "preview": "#!/usr/bin/env python3\n\"\"\"\nTokenCounter Example with Custom Watchers\n\nThis example demonstrates:\n1. Using TokenProgressD"
  },
  {
    "path": "examples/basic/token_counter/mcp_agent.config.yaml",
    "chars": 739,
    "preview": "$schema: ../../../schema/mcp-agent.config.schema.json\n\nexecution_engine: asyncio\nlogger:\n  transports: [console, file]\n "
  },
  {
    "path": "examples/basic/token_counter/mcp_agent.secrets.yaml.example",
    "chars": 130,
    "preview": "$schema: ../../../schema/mcp-agent.config.schema.json\n\nopenai:\n  api_key: openai_api_key\n\nanthropic:\n  api_key: anthropi"
  },
  {
    "path": "examples/basic/token_counter/requirements.txt",
    "chars": 169,
    "preview": "# Core framework dependency\nmcp-agent @ file://../../../  # Link to the local mcp-agent project root\n\n# Additional depen"
  },
  {
    "path": "examples/cloud/README.md",
    "chars": 171,
    "preview": "# mcp-agent Cloud Examples\n\nThe examples in this directory are all ready to be deployed to mcp-agent cloud, where\nthey c"
  },
  {
    "path": "examples/cloud/agent_factory/README.md",
    "chars": 2749,
    "preview": "# Cloud Agent Factory (Temporal + Custom Workflow Tasks)\n\nThis example routes customer-facing questions to specialized a"
  },
  {
    "path": "examples/cloud/agent_factory/agents.yaml",
    "chars": 786,
    "preview": "agents:\n  - name: support_specialist\n    instruction: |\n      You are a customer support specialist. Provide empathetic "
  },
  {
    "path": "examples/cloud/agent_factory/custom_tasks.py",
    "chars": 2705,
    "preview": "\"\"\"Custom workflow tasks for the cloud agent factory demo.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Di"
  },
  {
    "path": "examples/cloud/agent_factory/main.py",
    "chars": 2355,
    "preview": "\"\"\"Temporal cloud agent factory example with custom workflow tasks.\"\"\"\n\nfrom __future__ import annotations\n\nimport async"
  },
  {
    "path": "examples/cloud/agent_factory/mcp_agent.config.yaml",
    "chars": 1027,
    "preview": "# Temporal configuration for the cloud agent factory demo\n$schema: ../../schema/mcp-agent.config.schema.json\n\nexecution_"
  },
  {
    "path": "examples/cloud/agent_factory/mcp_agent.secrets.yaml.example",
    "chars": 41,
    "preview": "openai:\n  api_key: \"your-openai-api-key\"\n"
  },
  {
    "path": "examples/cloud/agent_factory/requirements.txt",
    "chars": 109,
    "preview": "# Core framework dependency\nmcp-agent @ file://../../../\n\n# LLM providers used in this demo\nopenai\nanthropic\n"
  },
  {
    "path": "examples/cloud/agent_factory/run_worker.py",
    "chars": 497,
    "preview": "\"\"\"Temporal worker for the cloud agent factory example.\"\"\"\n\nimport asyncio\nimport logging\n\nfrom mcp_agent.executor.tempo"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/README.md",
    "chars": 7726,
    "preview": "# ChatGPT App Example\n\nThis example demonstrates how to create an MCP Agent application with interactive UI widgets for "
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/main.py",
    "chars": 6192,
    "preview": "\"\"\"Basic MCP mcp-agent app integration with OpenAI Apps SDK.\n\nThe server exposes widget-backed tools that render the UI "
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/mcp_agent.config.yaml",
    "chars": 51,
    "preview": "name: openai_coinflip_ui\nexecution_engine: asyncio\n"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/requirements.txt",
    "chars": 104,
    "preview": "# Core framework dependency\nmcp-agent @ file://../../../../  # Link to the local mcp-agent project root\n"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/web/.gitignore",
    "chars": 310,
    "preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pn"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/web/README.md",
    "chars": 369,
    "preview": "A basic coin flip component initialized with create-react-app.\n\n## Setup\n\n### Install dependencies\n\n```bash\nyarn install"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/web/package.json",
    "chars": 936,
    "preview": "{\n  \"name\": \"coinflip\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"dependencies\": {\n    \"@testing-library/dom\": \"^10.4."
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/web/public/index.html",
    "chars": 472,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-w"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/web/src/components/App.css",
    "chars": 1105,
    "preview": ".App {\n  text-align: center;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/web/src/components/App.tsx",
    "chars": 953,
    "preview": "import { useTheme } from \"src/utils/hooks/use-theme\";\nimport \"./App.css\";\nimport { Coin } from \"./Coin\";\nimport { useWid"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/web/src/components/Coin.css",
    "chars": 1089,
    "preview": ".coin-container {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  padding: 2rem;\n}\n\n.coin {\n  width"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/web/src/components/Coin.tsx",
    "chars": 846,
    "preview": "import { useState } from \"react\";\nimport \"./Coin.css\";\n\ninterface CoinProps {\n  flipResult: \"heads\" | \"tails\";\n  onFlipR"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/web/src/index.css",
    "chars": 366,
    "preview": "body {\n  margin: 0;\n  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n    'Ubuntu', 'Can"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/web/src/index.tsx",
    "chars": 447,
    "preview": "import React from \"react\";\nimport ReactDOM from \"react-dom/client\";\nimport \"./index.css\";\nimport App from \"./components/"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/web/src/utils/dev-openai-global.ts",
    "chars": 1805,
    "preview": "import type { OpenAiGlobals } from \"./types\";\n\n/**\n * Setup mock window.openai global for development.\n * In production,"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/web/src/utils/hooks/use-openai-global.ts",
    "chars": 882,
    "preview": "import { useSyncExternalStore } from \"react\";\nimport {\n  SET_GLOBALS_EVENT_TYPE,\n  SetGlobalsEvent,\n  type OpenAiGlobals"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/web/src/utils/hooks/use-theme.ts",
    "chars": 174,
    "preview": "import { Theme } from \"../types\";\nimport { useOpenAiGlobal } from \"./use-openai-global\";\n\nexport function useTheme(): Th"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/web/src/utils/hooks/use-widget-state.ts",
    "chars": 1460,
    "preview": "import { useCallback, useEffect, useState, type SetStateAction } from \"react\";\nimport { useOpenAiGlobal } from \"./use-op"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/web/src/utils/types.ts",
    "chars": 2338,
    "preview": "export type CoinFlipWidgetState = {\n  flipResult: \"heads\" | \"tails\";\n};\n\nexport type OpenAiGlobals<\n  ToolInput = Unknow"
  },
  {
    "path": "examples/cloud/chatgpt_apps/basic_app/web/tsconfig.json",
    "chars": 523,
    "preview": "{\n  \"compilerOptions\": {\n    \"target\": \"es5\",\n    \"lib\": [\"dom\", \"dom.iterable\", \"esnext\"],\n    \"allowJs\": true,\n    \"sk"
  },
  {
    "path": "examples/cloud/chatgpt_apps/timer/README.md",
    "chars": 7519,
    "preview": "# Timer App - ChatGPT App Example\n\n![timer-app](https://github.com/user-attachments/assets/7a526501-84c8-4ef5-b784-4b394"
  },
  {
    "path": "examples/cloud/chatgpt_apps/timer/main.py",
    "chars": 10899,
    "preview": "\"\"\"Basic MCP mcp-agent app integration with OpenAI Apps SDK.\n\nThe server exposes widget-backed tools that render the UI "
  },
  {
    "path": "examples/cloud/chatgpt_apps/timer/mcp_agent.config.yaml",
    "chars": 49,
    "preview": "name: openai-timer-app\nexecution_engine: asyncio\n"
  },
  {
    "path": "examples/cloud/chatgpt_apps/timer/requirements.txt",
    "chars": 37,
    "preview": "# Core framework dependency\nmcp-agent"
  },
  {
    "path": "examples/cloud/chatgpt_apps/timer/web/.gitignore",
    "chars": 310,
    "preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pn"
  },
  {
    "path": "examples/cloud/chatgpt_apps/timer/web/README.md",
    "chars": 369,
    "preview": "A basic coin flip component initialized with create-react-app.\n\n## Setup\n\n### Install dependencies\n\n```bash\nyarn install"
  },
  {
    "path": "examples/cloud/chatgpt_apps/timer/web/package.json",
    "chars": 933,
    "preview": "{\n  \"name\": \"timer\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"dependencies\": {\n    \"@testing-library/dom\": \"^10.4.1\","
  },
  {
    "path": "examples/cloud/chatgpt_apps/timer/web/public/index.html",
    "chars": 466,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-w"
  },
  {
    "path": "examples/cloud/chatgpt_apps/timer/web/src/components/App.css",
    "chars": 1105,
    "preview": ".App {\n  text-align: center;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center"
  },
  {
    "path": "examples/cloud/chatgpt_apps/timer/web/src/components/App.tsx",
    "chars": 1648,
    "preview": "import { useTheme } from \"src/utils/hooks/use-theme\";\nimport \"./App.css\";\nimport { Timer } from \"./Timer\";\nimport { useW"
  },
  {
    "path": "examples/cloud/chatgpt_apps/timer/web/src/components/Timer.css",
    "chars": 2092,
    "preview": ".timer-wrapper {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 1rem;\n  padding: 1.5rem;\n}\n\n.t"
  },
  {
    "path": "examples/cloud/chatgpt_apps/timer/web/src/components/Timer.tsx",
    "chars": 5624,
    "preview": "import { useState, useEffect, useRef } from \"react\";\nimport { Card, CardHeader, CardContent } from \"./ui/card\";\nimport {"
  },
  {
    "path": "examples/cloud/chatgpt_apps/timer/web/src/components/ui/button.tsx",
    "chars": 1527,
    "preview": "import * as React from \"react\"\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n  v"
  }
]

// ... and 932 more files (download for full content)

About this extraction

This page contains the full source code of the lastmile-ai/mcp-agent GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1132 files (8.0 MB), approximately 2.2M tokens, and a symbol index with 4889 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!