इसे छोड़कर कंटेंट पर जाएं
Docs Try Aspire
Docs Try

aspire agent mcp command

यह कंटेंट अभी तक आपकी भाषा में उपलब्ध नहीं है।

aspire agent mcp - Start the MCP (Model Context Protocol) server.

Aspire CLI
aspire agent mcp [options]

The aspire agent mcp command starts the MCP (Model Context Protocol) server, which enables AI assistants and development tools to interact with your Aspire AppHost. The MCP server provides a standardized interface for resource management, diagnostics, and observability operations.

When the server is running, MCP-compatible clients can connect to it to:

  • List and manage Aspire resources
  • View structured logs and traces
  • Execute resource commands (start, stop, restart)
  • Query integration information

By default, the server discovers running AppHosts from the current workspace. You can also connect directly to a standalone Aspire Dashboard (one not managed by an AppHost) by providing --dashboard-url. In this dashboard-only mode, only the three telemetry tools (list_structured_logs, list_traces, list_trace_structured_logs) are exposed; AppHost-specific tools are not available.

The following options are available:

  • --dashboard-url <dashboard-url>

    The URL of a standalone Aspire Dashboard to connect to instead of discovering one from an AppHost. Accepts a base URL (for example, http://localhost:18888) or a full login URL including a browser token (for example, http://localhost:18888/login?t=<token>). When a login URL is provided, the token is automatically exchanged for an API key.

  • --api-key <api-key>

    The API key used to authenticate with the dashboard’s Telemetry API. Only required when --dashboard-url is specified and the dashboard is configured with ApiKey authentication and no login URL is provided.

  • -?, -h, --help

    Prints help and usage documentation for the available commands and options.

  • -l, --log-level <Critical|Debug|Error|Information|None|Trace|Warning>

    Set the minimum log level for console output. Use this option to increase diagnostics while troubleshooting or reduce output in scripted runs.

  • --non-interactive

    Run the command in non-interactive mode, disabling all interactive prompts and spinners.

  • --nologo

    Suppress the startup banner and telemetry notice.

  • --banner

    Display the animated Aspire CLI welcome banner.

  • --wait-for-debugger

    Wait for a debugger to attach before running a command.

  • Start the MCP server:

    Aspire CLI
    aspire agent mcp
  • Start the MCP server in dashboard-only mode using a login URL:

    Aspire CLI
    aspire agent mcp --dashboard-url "http://localhost:18888/login?t=<token>"
  • Start the MCP server in dashboard-only mode with an API key:

    Aspire CLI
    aspire agent mcp --dashboard-url "http://localhost:18888" --api-key "<your-api-key>"