fast-agent-mcp 0.2.28__tar.gz → 0.2.29__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/.gitignore +1 -1
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/PKG-INFO +11 -8
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/README.md +5 -3
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/pyproject.toml +6 -6
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/app.py +1 -1
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/commands/url_parser.py +7 -1
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/context.py +5 -3
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/interactive_prompt.py +2 -2
- fast_agent_mcp-0.2.29/src/mcp_agent/llm/providers/augmented_llm_deepseek.py +79 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/google_converter.py +4 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/common.py +2 -2
- fast_agent_mcp-0.2.29/src/mcp_agent/mcp/hf_auth.py +87 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/mcp_agent_client_session.py +16 -40
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp_server_registry.py +10 -3
- fast_agent_mcp-0.2.28/src/mcp_agent/llm/providers/augmented_llm_deepseek.py +0 -30
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/LICENSE +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/azure-openai/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/data-analysis/analysis-campaign.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/data-analysis/analysis.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/data-analysis/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/mcp/state-transfer/agent_one.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/mcp/state-transfer/agent_two.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/mcp/vision-examples/example1.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/mcp/vision-examples/example2.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/mcp/vision-examples/example3.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/mcp/vision-examples/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/otel/agent.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/otel/agent2.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/otel/docker-compose.yaml +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/otel/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/researcher/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/researcher/researcher-eval.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/researcher/researcher-imp.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/researcher/researcher.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/tensorzero/README.md +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/tensorzero/agent.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/tensorzero/docker-compose.yml +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/tensorzero/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/tensorzero/image_demo.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/tensorzero/mcp_server/mcp_server.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/tensorzero/simple_agent.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/workflows/chaining.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/workflows/evaluator.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/workflows/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/workflows/graded_report.md +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/workflows/human_input.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/workflows/orchestrator.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/workflows/parallel.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/workflows/router.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/workflows/short_story.md +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/workflows/short_story.txt +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/__init__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/__init__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/agent.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/base_agent.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/workflow/__init__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/workflow/chain_agent.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/workflow/evaluator_optimizer.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/workflow/orchestrator_agent.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/workflow/orchestrator_models.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/workflow/orchestrator_prompts.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/workflow/parallel_agent.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/agents/workflow/router_agent.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/__init__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/__main__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/commands/check_config.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/commands/go.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/commands/quickstart.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/commands/setup.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/main.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/cli/terminal.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/config.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/console.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/context_dependent.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/__init__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/agent_app.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/agent_types.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/direct_decorators.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/direct_factory.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/enhanced_prompt.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/error_handling.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/exceptions.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/fastagent.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/mcp_content.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/prompt.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/request_params.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/core/validation.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/event_progress.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/executor/__init__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/executor/executor.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/executor/task_registry.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/executor/workflow_signal.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/human_input/__init__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/human_input/handler.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/human_input/types.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/__init__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/augmented_llm.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/augmented_llm_passthrough.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/augmented_llm_playback.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/augmented_llm_slow.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/memory.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/model_factory.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/prompt_utils.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/provider_key_manager.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/provider_types.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/__init__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/anthropic_utils.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/augmented_llm_anthropic.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/augmented_llm_azure.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/augmented_llm_generic.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/augmented_llm_google_native.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/augmented_llm_google_oai.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/augmented_llm_openai.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/augmented_llm_openrouter.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/augmented_llm_tensorzero.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/multipart_converter_anthropic.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/multipart_converter_openai.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/multipart_converter_tensorzero.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/openai_multipart.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/openai_utils.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/sampling_converter_anthropic.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/sampling_converter_openai.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/sampling_converter.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/sampling_format_converter.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/logging/__init__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/logging/events.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/logging/json_serializer.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/logging/listeners.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/logging/logger.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/logging/rich_progress.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/logging/transport.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/__init__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/gen_client.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/helpers/__init__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/helpers/content_helpers.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/helpers/server_config_helpers.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/interfaces.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/logger_textio.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/mcp_aggregator.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/mcp_connection_manager.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/mime_utils.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompt_message_multipart.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompt_render.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompt_serialization.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompts/__init__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompts/__main__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompts/prompt_constants.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompts/prompt_helpers.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompts/prompt_load.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompts/prompt_server.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/prompts/prompt_template.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/resource_utils.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/sampling.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp_server/__init__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp_server/agent_server.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/progress_display.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/data-analysis/analysis-campaign.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/data-analysis/analysis.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/data-analysis/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/in_dev/agent_build.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/in_dev/css-LICENSE.txt +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/in_dev/slides.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/agent.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/history_transfer.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/job.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/prompt_category.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/prompt_sizing.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/simple.txt +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/sizer.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/internal/social.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/mcp/state-transfer/agent_one.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/mcp/state-transfer/agent_two.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/prompting/__init__.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/prompting/agent.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/prompting/delimited_prompt.txt +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/prompting/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/prompting/image_server.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/prompting/prompt1.txt +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/prompting/work_with_image.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/researcher/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/researcher/researcher-eval.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/researcher/researcher-imp.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/researcher/researcher.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/workflows/chaining.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/workflows/evaluator.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/workflows/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/workflows/human_input.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/workflows/orchestrator.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/workflows/parallel.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/workflows/router.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/resources/examples/workflows/short_story.txt +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/tools/tool_definition.py +0 -0
- {fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/ui/console_display.py +0 -0
@@ -168,7 +168,7 @@ examples/mcp_root_test/test_data/*.png
|
|
168
168
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
169
169
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
170
170
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
171
|
-
|
171
|
+
.idea/
|
172
172
|
uv.lock
|
173
173
|
|
174
174
|
# File generated from promptify script (to create an LLM-friendly prompt for the repo)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: fast-agent-mcp
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.29
|
4
4
|
Summary: Define, Prompt and Test MCP enabled Agents and Workflows
|
5
5
|
Author-email: Shaun Smith <fastagent@llmindset.co.uk>
|
6
6
|
License: Apache License
|
@@ -213,16 +213,17 @@ Requires-Dist: a2a-types>=0.1.0
|
|
213
213
|
Requires-Dist: aiohttp>=3.11.13
|
214
214
|
Requires-Dist: anthropic>=0.49.0
|
215
215
|
Requires-Dist: azure-identity>=1.14.0
|
216
|
+
Requires-Dist: deprecated>=1.2.18
|
216
217
|
Requires-Dist: fastapi>=0.115.6
|
217
218
|
Requires-Dist: google-genai
|
218
|
-
Requires-Dist: mcp==1.9.
|
219
|
+
Requires-Dist: mcp==1.9.3
|
219
220
|
Requires-Dist: openai>=1.63.2
|
220
221
|
Requires-Dist: opentelemetry-distro>=0.50b0
|
221
222
|
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.29.0
|
222
|
-
Requires-Dist: opentelemetry-instrumentation-anthropic>=0.
|
223
|
+
Requires-Dist: opentelemetry-instrumentation-anthropic>=0.40.7; python_version >= '3.10' and python_version < '4.0'
|
223
224
|
Requires-Dist: opentelemetry-instrumentation-google-genai>=0.2b0
|
224
|
-
Requires-Dist: opentelemetry-instrumentation-mcp>=0.40.
|
225
|
-
Requires-Dist: opentelemetry-instrumentation-openai>=0.
|
225
|
+
Requires-Dist: opentelemetry-instrumentation-mcp>=0.40.7; python_version >= '3.10' and python_version < '4.0'
|
226
|
+
Requires-Dist: opentelemetry-instrumentation-openai>=0.0.40.7; python_version >= '3.10' and python_version < '4.0'
|
226
227
|
Requires-Dist: prompt-toolkit>=3.0.50
|
227
228
|
Requires-Dist: pydantic-settings>=2.7.0
|
228
229
|
Requires-Dist: pydantic>=2.10.4
|
@@ -286,11 +287,13 @@ Start by installing the [uv package manager](https://docs.astral.sh/uv/) for Pyt
|
|
286
287
|
|
287
288
|
```bash
|
288
289
|
uv pip install fast-agent-mcp # install fast-agent!
|
289
|
-
|
290
|
-
|
290
|
+
fast-agent go # start an interactive session
|
291
|
+
fast-agent go https://hf.co/mcp # with a remote MCP
|
292
|
+
fast-agent go --model=generic.qwen2.5 # use ollama qwen 2.5
|
293
|
+
fast-agent setup # create an example agent and config files
|
291
294
|
uv run agent.py # run your first agent
|
292
295
|
uv run agent.py --model=o3-mini.low # specify a model
|
293
|
-
|
296
|
+
fast-agent quickstart workflow # create "building effective agents" examples
|
294
297
|
```
|
295
298
|
|
296
299
|
Other quickstart examples include a Researcher Agent (with Evaluator-Optimizer workflow) and Data Analysis Agent (similar to the ChatGPT experience), demonstrating MCP Roots support.
|
@@ -38,11 +38,13 @@ Start by installing the [uv package manager](https://docs.astral.sh/uv/) for Pyt
|
|
38
38
|
|
39
39
|
```bash
|
40
40
|
uv pip install fast-agent-mcp # install fast-agent!
|
41
|
-
|
42
|
-
|
41
|
+
fast-agent go # start an interactive session
|
42
|
+
fast-agent go https://hf.co/mcp # with a remote MCP
|
43
|
+
fast-agent go --model=generic.qwen2.5 # use ollama qwen 2.5
|
44
|
+
fast-agent setup # create an example agent and config files
|
43
45
|
uv run agent.py # run your first agent
|
44
46
|
uv run agent.py --model=o3-mini.low # specify a model
|
45
|
-
|
47
|
+
fast-agent quickstart workflow # create "building effective agents" examples
|
46
48
|
```
|
47
49
|
|
48
50
|
Other quickstart examples include a Researcher Agent (with Evaluator-Optimizer workflow) and Data Analysis Agent (similar to the ChatGPT experience), demonstrating MCP Roots support.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "fast-agent-mcp"
|
3
|
-
version = "0.2.
|
3
|
+
version = "0.2.29"
|
4
4
|
description = "Define, Prompt and Test MCP enabled Agents and Workflows"
|
5
5
|
readme = "README.md"
|
6
6
|
license = { file = "LICENSE" }
|
@@ -15,7 +15,7 @@ classifiers = [
|
|
15
15
|
requires-python = ">=3.10"
|
16
16
|
dependencies = [
|
17
17
|
"fastapi>=0.115.6",
|
18
|
-
"mcp==1.9.
|
18
|
+
"mcp==1.9.3",
|
19
19
|
"opentelemetry-distro>=0.50b0",
|
20
20
|
"opentelemetry-exporter-otlp-proto-http>=1.29.0",
|
21
21
|
"pydantic-settings>=2.7.0",
|
@@ -29,14 +29,14 @@ dependencies = [
|
|
29
29
|
"prompt-toolkit>=3.0.50",
|
30
30
|
"aiohttp>=3.11.13",
|
31
31
|
"a2a-types>=0.1.0",
|
32
|
-
"opentelemetry-instrumentation-openai>=0.
|
33
|
-
"opentelemetry-instrumentation-anthropic>=0.
|
34
|
-
"opentelemetry-instrumentation-mcp>=0.40.
|
32
|
+
"opentelemetry-instrumentation-openai>=0.0.40.7; python_version >= '3.10' and python_version < '4.0'",
|
33
|
+
"opentelemetry-instrumentation-anthropic>=0.40.7; python_version >= '3.10' and python_version < '4.0'",
|
34
|
+
"opentelemetry-instrumentation-mcp>=0.40.7; python_version >= '3.10' and python_version < '4.0'",
|
35
35
|
"google-genai",
|
36
36
|
"opentelemetry-instrumentation-google-genai>=0.2b0",
|
37
37
|
"tensorzero>=2025.4.7",
|
38
|
-
"google-genai",
|
39
38
|
"opentelemetry-instrumentation-google-genai>=0.2b0",
|
39
|
+
"deprecated>=1.2.18",
|
40
40
|
]
|
41
41
|
|
42
42
|
[project.optional-dependencies]
|
@@ -119,7 +119,7 @@ class MCPApp:
|
|
119
119
|
if self._initialized:
|
120
120
|
return
|
121
121
|
|
122
|
-
self._context = await initialize_context(self._config_or_path)
|
122
|
+
self._context = await initialize_context(self._config_or_path, store_globally=True)
|
123
123
|
|
124
124
|
# Set the properties that were passed in the constructor
|
125
125
|
self._context.human_input_handler = self._human_input_callback
|
@@ -8,6 +8,8 @@ import re
|
|
8
8
|
from typing import Dict, List, Literal, Tuple
|
9
9
|
from urllib.parse import urlparse
|
10
10
|
|
11
|
+
from mcp_agent.mcp.hf_auth import add_hf_auth_header
|
12
|
+
|
11
13
|
|
12
14
|
def parse_server_url(
|
13
15
|
url: str,
|
@@ -131,7 +133,11 @@ def parse_server_urls(
|
|
131
133
|
result = []
|
132
134
|
for url in url_list:
|
133
135
|
server_name, transport_type, parsed_url = parse_server_url(url)
|
134
|
-
|
136
|
+
|
137
|
+
# Apply HuggingFace authentication if appropriate
|
138
|
+
final_headers = add_hf_auth_header(parsed_url, headers)
|
139
|
+
|
140
|
+
result.append((server_name, transport_type, parsed_url, final_headers))
|
135
141
|
|
136
142
|
return result
|
137
143
|
|
@@ -12,7 +12,8 @@ from opentelemetry import trace
|
|
12
12
|
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
|
13
13
|
from opentelemetry.instrumentation.anthropic import AnthropicInstrumentor
|
14
14
|
from opentelemetry.instrumentation.google_genai import GoogleGenAiSdkInstrumentor
|
15
|
-
|
15
|
+
|
16
|
+
# from opentelemetry.instrumentation.mcp import McpInstrumentor
|
16
17
|
from opentelemetry.instrumentation.openai import OpenAIInstrumentor
|
17
18
|
from opentelemetry.propagate import set_global_textmap
|
18
19
|
from opentelemetry.sdk.resources import Resource
|
@@ -114,7 +115,9 @@ async def configure_otel(config: "Settings") -> None:
|
|
114
115
|
AnthropicInstrumentor().instrument()
|
115
116
|
OpenAIInstrumentor().instrument()
|
116
117
|
GoogleGenAiSdkInstrumentor().instrument()
|
117
|
-
|
118
|
+
|
119
|
+
|
120
|
+
# McpInstrumentor().instrument()
|
118
121
|
|
119
122
|
|
120
123
|
async def configure_logger(config: "Settings") -> None:
|
@@ -198,7 +201,6 @@ _global_context: Context | None = None
|
|
198
201
|
def get_current_context() -> Context:
|
199
202
|
"""
|
200
203
|
Synchronous initializer/getter for global application context.
|
201
|
-
For async usage, use aget_current_context instead.
|
202
204
|
"""
|
203
205
|
global _global_context
|
204
206
|
if _global_context is None:
|
@@ -351,7 +351,7 @@ class InteractivePrompt:
|
|
351
351
|
for prompt in prompts:
|
352
352
|
# Get basic prompt info
|
353
353
|
prompt_name = getattr(prompt, "name", "Unknown")
|
354
|
-
|
354
|
+
prompt_description = getattr(prompt, "description", "No description")
|
355
355
|
|
356
356
|
# Extract argument information
|
357
357
|
arg_names = []
|
@@ -387,7 +387,7 @@ class InteractivePrompt:
|
|
387
387
|
"server": server_name,
|
388
388
|
"name": prompt_name,
|
389
389
|
"namespaced_name": namespaced_name,
|
390
|
-
"description":
|
390
|
+
"description": prompt_description,
|
391
391
|
"arg_count": len(arg_names),
|
392
392
|
"arg_names": arg_names,
|
393
393
|
"required_args": required_args,
|
@@ -0,0 +1,79 @@
|
|
1
|
+
from typing import List, Tuple, Type
|
2
|
+
|
3
|
+
from mcp_agent.core.request_params import RequestParams
|
4
|
+
from mcp_agent.llm.provider_types import Provider
|
5
|
+
from mcp_agent.llm.providers.augmented_llm_openai import OpenAIAugmentedLLM
|
6
|
+
from mcp_agent.mcp.interfaces import ModelT
|
7
|
+
from mcp_agent.mcp.prompt_message_multipart import PromptMessageMultipart
|
8
|
+
|
9
|
+
DEEPSEEK_BASE_URL = "https://api.deepseek.com"
|
10
|
+
DEFAULT_DEEPSEEK_MODEL = "deepseekchat" # current Deepseek only has two type models
|
11
|
+
|
12
|
+
|
13
|
+
class DeepSeekAugmentedLLM(OpenAIAugmentedLLM):
|
14
|
+
def __init__(self, *args, **kwargs) -> None:
|
15
|
+
super().__init__(*args, provider=Provider.DEEPSEEK, **kwargs)
|
16
|
+
|
17
|
+
def _initialize_default_params(self, kwargs: dict) -> RequestParams:
|
18
|
+
"""Initialize Deepseek-specific default parameters"""
|
19
|
+
chosen_model = kwargs.get("model", DEFAULT_DEEPSEEK_MODEL)
|
20
|
+
|
21
|
+
return RequestParams(
|
22
|
+
model=chosen_model,
|
23
|
+
systemPrompt=self.instruction,
|
24
|
+
parallel_tool_calls=True,
|
25
|
+
max_iterations=10,
|
26
|
+
use_history=True,
|
27
|
+
)
|
28
|
+
|
29
|
+
def _base_url(self) -> str:
|
30
|
+
base_url = None
|
31
|
+
if self.context.config and self.context.config.deepseek:
|
32
|
+
base_url = self.context.config.deepseek.base_url
|
33
|
+
|
34
|
+
return base_url if base_url else DEEPSEEK_BASE_URL
|
35
|
+
|
36
|
+
async def _apply_prompt_provider_specific_structured(
|
37
|
+
self,
|
38
|
+
multipart_messages: List[PromptMessageMultipart],
|
39
|
+
model: Type[ModelT],
|
40
|
+
request_params: RequestParams | None = None,
|
41
|
+
) -> Tuple[ModelT | None, PromptMessageMultipart]: # noqa: F821
|
42
|
+
request_params = self.get_request_params(request_params)
|
43
|
+
|
44
|
+
request_params.response_format = {"type": "json_object"}
|
45
|
+
|
46
|
+
# Get the full schema and extract just the properties
|
47
|
+
full_schema = model.model_json_schema()
|
48
|
+
properties = full_schema.get("properties", {})
|
49
|
+
required_fields = full_schema.get("required", [])
|
50
|
+
|
51
|
+
# Create a cleaner format description
|
52
|
+
format_description = "{\n"
|
53
|
+
for field_name, field_info in properties.items():
|
54
|
+
field_type = field_info.get("type", "string")
|
55
|
+
description = field_info.get("description", "")
|
56
|
+
format_description += f' "{field_name}": "{field_type}"'
|
57
|
+
if description:
|
58
|
+
format_description += f" // {description}"
|
59
|
+
if field_name in required_fields:
|
60
|
+
format_description += " // REQUIRED"
|
61
|
+
format_description += "\n"
|
62
|
+
format_description += "}"
|
63
|
+
|
64
|
+
multipart_messages[-1].add_text(
|
65
|
+
f"""YOU MUST RESPOND WITH A JSON OBJECT IN EXACTLY THIS FORMAT:
|
66
|
+
{format_description}
|
67
|
+
|
68
|
+
IMPORTANT RULES:
|
69
|
+
- Respond ONLY with the JSON object, no other text
|
70
|
+
- Do NOT include "properties" or "schema" wrappers
|
71
|
+
- Do NOT use code fences or markdown
|
72
|
+
- The response must be valid JSON that matches the format above
|
73
|
+
- All required fields must be included"""
|
74
|
+
)
|
75
|
+
|
76
|
+
result: PromptMessageMultipart = await self._apply_prompt_provider_specific(
|
77
|
+
multipart_messages, request_params
|
78
|
+
)
|
79
|
+
return self._structured_from_multipart(result, model)
|
{fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/llm/providers/google_converter.py
RENAMED
@@ -166,6 +166,10 @@ class GoogleConverter:
|
|
166
166
|
fast_agent_parts: List[
|
167
167
|
TextContent | ImageContent | EmbeddedResource | CallToolRequestParams
|
168
168
|
] = []
|
169
|
+
|
170
|
+
if content is None or not hasattr(content, 'parts') or content.parts is None:
|
171
|
+
return [] # Google API response 'content' object is None. Cannot extract parts.
|
172
|
+
|
169
173
|
for part in content.parts:
|
170
174
|
if part.text:
|
171
175
|
fast_agent_parts.append(TextContent(type="text", text=part.text))
|
@@ -8,9 +8,9 @@ SEP = "-"
|
|
8
8
|
|
9
9
|
def create_namespaced_name(server_name: str, resource_name: str) -> str:
|
10
10
|
"""Create a namespaced resource name from server and resource names"""
|
11
|
-
return f"{server_name}{SEP}{resource_name}"
|
11
|
+
return f"{server_name}{SEP}{resource_name}"[:64]
|
12
12
|
|
13
13
|
|
14
14
|
def is_namespaced_name(name: str) -> bool:
|
15
15
|
"""Check if a name is already namespaced"""
|
16
|
-
return SEP in name
|
16
|
+
return SEP in name
|
@@ -0,0 +1,87 @@
|
|
1
|
+
"""HuggingFace authentication utilities for MCP connections."""
|
2
|
+
|
3
|
+
import os
|
4
|
+
from typing import Dict, Optional
|
5
|
+
from urllib.parse import urlparse
|
6
|
+
|
7
|
+
|
8
|
+
def is_huggingface_url(url: str) -> bool:
|
9
|
+
"""
|
10
|
+
Check if a URL is a HuggingFace URL that should receive HF_TOKEN authentication.
|
11
|
+
|
12
|
+
Args:
|
13
|
+
url: The URL to check
|
14
|
+
|
15
|
+
Returns:
|
16
|
+
True if the URL is a HuggingFace URL, False otherwise
|
17
|
+
"""
|
18
|
+
try:
|
19
|
+
parsed = urlparse(url)
|
20
|
+
hostname = parsed.hostname
|
21
|
+
if hostname is None:
|
22
|
+
return False
|
23
|
+
|
24
|
+
# Check for HuggingFace domains
|
25
|
+
return hostname in {"hf.co", "huggingface.co"}
|
26
|
+
except Exception:
|
27
|
+
return False
|
28
|
+
|
29
|
+
|
30
|
+
def get_hf_token_from_env() -> Optional[str]:
|
31
|
+
"""
|
32
|
+
Get the HuggingFace token from the HF_TOKEN environment variable.
|
33
|
+
|
34
|
+
Returns:
|
35
|
+
The HF_TOKEN value if set, None otherwise
|
36
|
+
"""
|
37
|
+
return os.environ.get("HF_TOKEN")
|
38
|
+
|
39
|
+
|
40
|
+
def should_add_hf_auth(url: str, existing_headers: Optional[Dict[str, str]]) -> bool:
|
41
|
+
"""
|
42
|
+
Determine if HuggingFace authentication should be added to the headers.
|
43
|
+
|
44
|
+
Args:
|
45
|
+
url: The URL to check
|
46
|
+
existing_headers: Existing headers dictionary (may be None)
|
47
|
+
|
48
|
+
Returns:
|
49
|
+
True if HF auth should be added, False otherwise
|
50
|
+
"""
|
51
|
+
# Only add HF auth if:
|
52
|
+
# 1. URL is a HuggingFace URL
|
53
|
+
# 2. No existing Authorization header is set
|
54
|
+
# 3. HF_TOKEN environment variable is available
|
55
|
+
|
56
|
+
if not is_huggingface_url(url):
|
57
|
+
return False
|
58
|
+
|
59
|
+
if existing_headers and "Authorization" in existing_headers:
|
60
|
+
return False
|
61
|
+
|
62
|
+
return get_hf_token_from_env() is not None
|
63
|
+
|
64
|
+
|
65
|
+
def add_hf_auth_header(url: str, headers: Optional[Dict[str, str]]) -> Optional[Dict[str, str]]:
|
66
|
+
"""
|
67
|
+
Add HuggingFace authentication header if appropriate.
|
68
|
+
|
69
|
+
Args:
|
70
|
+
url: The URL to check
|
71
|
+
headers: Existing headers dictionary (may be None)
|
72
|
+
|
73
|
+
Returns:
|
74
|
+
Updated headers dictionary with HF auth if appropriate, or original headers
|
75
|
+
"""
|
76
|
+
if not should_add_hf_auth(url, headers):
|
77
|
+
return headers
|
78
|
+
|
79
|
+
hf_token = get_hf_token_from_env()
|
80
|
+
if hf_token is None:
|
81
|
+
return headers
|
82
|
+
|
83
|
+
# Create new headers dict or copy existing one
|
84
|
+
result_headers = dict(headers) if headers else {}
|
85
|
+
result_headers["Authorization"] = f"Bearer {hf_token}"
|
86
|
+
|
87
|
+
return result_headers
|
{fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/src/mcp_agent/mcp/mcp_agent_client_session.py
RENAMED
@@ -7,15 +7,13 @@ from datetime import timedelta
|
|
7
7
|
from typing import TYPE_CHECKING
|
8
8
|
|
9
9
|
from mcp import ClientSession, ServerNotification
|
10
|
+
from mcp.shared.message import MessageMetadata
|
10
11
|
from mcp.shared.session import (
|
11
12
|
ProgressFnT,
|
12
13
|
ReceiveResultT,
|
13
|
-
RequestId,
|
14
|
-
SendNotificationT,
|
15
14
|
SendRequestT,
|
16
|
-
SendResultT,
|
17
15
|
)
|
18
|
-
from mcp.types import
|
16
|
+
from mcp.types import Implementation, ListRootsResult, Root, ToolListChangedNotification
|
19
17
|
from pydantic import FileUrl
|
20
18
|
|
21
19
|
from mcp_agent.context_dependent import ContextDependent
|
@@ -76,12 +74,16 @@ class MCPAgentClientSession(ClientSession, ContextDependent):
|
|
76
74
|
|
77
75
|
# Only register callbacks if the server_config has the relevant settings
|
78
76
|
list_roots_cb = list_roots if (self.server_config and self.server_config.roots) else None
|
79
|
-
|
77
|
+
|
80
78
|
# Register sampling callback if either:
|
81
79
|
# 1. Sampling is explicitly configured, OR
|
82
80
|
# 2. Application-level auto_sampling is enabled
|
83
81
|
sampling_cb = None
|
84
|
-
if
|
82
|
+
if (
|
83
|
+
self.server_config
|
84
|
+
and hasattr(self.server_config, "sampling")
|
85
|
+
and self.server_config.sampling
|
86
|
+
):
|
85
87
|
# Explicit sampling configuration
|
86
88
|
sampling_cb = sample
|
87
89
|
elif self._should_enable_auto_sampling():
|
@@ -100,9 +102,10 @@ class MCPAgentClientSession(ClientSession, ContextDependent):
|
|
100
102
|
"""Check if auto_sampling is enabled at the application level."""
|
101
103
|
try:
|
102
104
|
from mcp_agent.context import get_current_context
|
105
|
+
|
103
106
|
context = get_current_context()
|
104
107
|
if context and context.config:
|
105
|
-
return getattr(context.config,
|
108
|
+
return getattr(context.config, "auto_sampling", True)
|
106
109
|
except Exception:
|
107
110
|
pass
|
108
111
|
return True # Default to True if can't access config
|
@@ -112,6 +115,7 @@ class MCPAgentClientSession(ClientSession, ContextDependent):
|
|
112
115
|
request: SendRequestT,
|
113
116
|
result_type: type[ReceiveResultT],
|
114
117
|
request_read_timeout_seconds: timedelta | None = None,
|
118
|
+
metadata: MessageMetadata | None = None,
|
115
119
|
progress_callback: ProgressFnT | None = None,
|
116
120
|
) -> ReceiveResultT:
|
117
121
|
logger.debug("send_request: request=", data=request.model_dump())
|
@@ -120,32 +124,18 @@ class MCPAgentClientSession(ClientSession, ContextDependent):
|
|
120
124
|
request=request,
|
121
125
|
result_type=result_type,
|
122
126
|
request_read_timeout_seconds=request_read_timeout_seconds,
|
127
|
+
metadata=metadata,
|
123
128
|
progress_callback=progress_callback,
|
124
|
-
metadata=None,
|
125
129
|
)
|
126
|
-
logger.debug(
|
130
|
+
logger.debug(
|
131
|
+
"send_request: response=",
|
132
|
+
data=result.model_dump() if result is not None else "no response returned",
|
133
|
+
)
|
127
134
|
return result
|
128
135
|
except Exception as e:
|
129
136
|
logger.error(f"send_request failed: {str(e)}")
|
130
137
|
raise
|
131
138
|
|
132
|
-
async def send_notification(self, notification: SendNotificationT) -> None:
|
133
|
-
logger.debug("send_notification:", data=notification.model_dump())
|
134
|
-
try:
|
135
|
-
return await super().send_notification(notification)
|
136
|
-
except Exception as e:
|
137
|
-
logger.error("send_notification failed", data=e)
|
138
|
-
raise
|
139
|
-
|
140
|
-
async def _send_response(
|
141
|
-
self, request_id: RequestId, response: SendResultT | ErrorData
|
142
|
-
) -> None:
|
143
|
-
logger.debug(
|
144
|
-
f"send_response: request_id={request_id}, response=",
|
145
|
-
data=response.model_dump(),
|
146
|
-
)
|
147
|
-
return await super()._send_response(request_id, response)
|
148
|
-
|
149
139
|
async def _received_notification(self, notification: ServerNotification) -> None:
|
150
140
|
"""
|
151
141
|
Can be overridden by subclasses to handle a notification without needing
|
@@ -189,17 +179,3 @@ class MCPAgentClientSession(ClientSession, ContextDependent):
|
|
189
179
|
await self._tool_list_changed_callback(server_name)
|
190
180
|
except Exception as e:
|
191
181
|
logger.error(f"Error in tool list changed callback: {e}")
|
192
|
-
|
193
|
-
async def send_progress_notification(
|
194
|
-
self, progress_token: str | int, progress: float, total: float | None = None
|
195
|
-
) -> None:
|
196
|
-
"""
|
197
|
-
Sends a progress notification for a request that is currently being
|
198
|
-
processed.
|
199
|
-
"""
|
200
|
-
logger.debug(
|
201
|
-
"send_progress_notification: progress_token={progress_token}, progress={progress}, total={total}"
|
202
|
-
)
|
203
|
-
return await super().send_progress_notification(
|
204
|
-
progress_token=progress_token, progress=progress, total=total
|
205
|
-
)
|
@@ -27,6 +27,7 @@ from mcp_agent.config import (
|
|
27
27
|
get_settings,
|
28
28
|
)
|
29
29
|
from mcp_agent.logging.logger import get_logger
|
30
|
+
from mcp_agent.mcp.hf_auth import add_hf_auth_header
|
30
31
|
from mcp_agent.mcp.logger_textio import get_stderr_handler
|
31
32
|
from mcp_agent.mcp.mcp_connection_manager import (
|
32
33
|
MCPConnectionManager,
|
@@ -176,11 +177,14 @@ class ServerRegistry:
|
|
176
177
|
if not config.url:
|
177
178
|
raise ValueError(f"URL is required for SSE transport: {server_name}")
|
178
179
|
|
180
|
+
# Apply HuggingFace authentication if appropriate
|
181
|
+
headers = add_hf_auth_header(config.url, config.headers)
|
182
|
+
|
179
183
|
# Use sse_client to get the read and write streams
|
180
184
|
async with _add_none_to_context(
|
181
185
|
sse_client(
|
182
186
|
config.url,
|
183
|
-
|
187
|
+
headers,
|
184
188
|
sse_read_timeout=config.read_transport_sse_timeout_seconds,
|
185
189
|
)
|
186
190
|
) as (read_stream, write_stream, _):
|
@@ -198,9 +202,12 @@ class ServerRegistry:
|
|
198
202
|
logger.debug(f"{server_name}: Closed session to server")
|
199
203
|
elif config.transport == "http":
|
200
204
|
if not config.url:
|
201
|
-
raise ValueError(f"URL is required for
|
205
|
+
raise ValueError(f"URL is required for HTTP transport: {server_name}")
|
206
|
+
|
207
|
+
# Apply HuggingFace authentication if appropriate
|
208
|
+
headers = add_hf_auth_header(config.url, config.headers)
|
202
209
|
|
203
|
-
async with streamablehttp_client(config.url,
|
210
|
+
async with streamablehttp_client(config.url, headers) as (
|
204
211
|
read_stream,
|
205
212
|
write_stream,
|
206
213
|
_,
|
@@ -1,30 +0,0 @@
|
|
1
|
-
from mcp_agent.core.request_params import RequestParams
|
2
|
-
from mcp_agent.llm.provider_types import Provider
|
3
|
-
from mcp_agent.llm.providers.augmented_llm_openai import OpenAIAugmentedLLM
|
4
|
-
|
5
|
-
DEEPSEEK_BASE_URL = "https://api.deepseek.com"
|
6
|
-
DEFAULT_DEEPSEEK_MODEL = "deepseekchat" # current Deepseek only has two type models
|
7
|
-
|
8
|
-
|
9
|
-
class DeepSeekAugmentedLLM(OpenAIAugmentedLLM):
|
10
|
-
def __init__(self, *args, **kwargs) -> None:
|
11
|
-
super().__init__(*args, provider=Provider.DEEPSEEK, **kwargs)
|
12
|
-
|
13
|
-
def _initialize_default_params(self, kwargs: dict) -> RequestParams:
|
14
|
-
"""Initialize Deepseek-specific default parameters"""
|
15
|
-
chosen_model = kwargs.get("model", DEFAULT_DEEPSEEK_MODEL)
|
16
|
-
|
17
|
-
return RequestParams(
|
18
|
-
model=chosen_model,
|
19
|
-
systemPrompt=self.instruction,
|
20
|
-
parallel_tool_calls=True,
|
21
|
-
max_iterations=10,
|
22
|
-
use_history=True,
|
23
|
-
)
|
24
|
-
|
25
|
-
def _base_url(self) -> str:
|
26
|
-
base_url = None
|
27
|
-
if self.context.config and self.context.config.deepseek:
|
28
|
-
base_url = self.context.config.deepseek.base_url
|
29
|
-
|
30
|
-
return base_url if base_url else DEEPSEEK_BASE_URL
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/data-analysis/fastagent.config.yaml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/mcp/state-transfer/fastagent.config.yaml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/mcp/vision-examples/fastagent.config.yaml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fast_agent_mcp-0.2.28 → fast_agent_mcp-0.2.29}/examples/tensorzero/mcp_server/mcp_server.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|