Back to Litellm

generated by https://github.com/hashicorp/terraform-plugin-docs

terraform/provider/docs/data-sources/mcp_servers.md

1.101.0-dev.11.3 KB
Original Source

litellm_mcp_servers (Data Source)

Lists MCP servers via /v1/mcp/server. Secret material is never exposed.

Example Usage

terraform
data "litellm_mcp_servers" "all" {}

data "litellm_mcp_servers" "team_scoped" {
  team_id = litellm_team.ml.id
}

output "mcp_server_urls" {
  value = [for s in data.litellm_mcp_servers.all.mcp_servers : s.url]
}

Argument Reference

The following arguments are supported:

  • team_id - (Optional) Filter to servers this team can access plus globally available (allow_all_keys) servers.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • ids - IDs of the returned MCP servers.
  • mcp_servers - List of MCP server objects. Each entry exports:
    • server_id - Unique identifier of the MCP server.
    • server_name - Name of the MCP server.
    • alias - Alias for the MCP server.
    • description - Description of the MCP server.
    • url - URL of the MCP server.
    • transport - Transport type (http, sse, stdio).
    • spec_version - MCP specification version.
    • auth_type - Authentication type.
    • allow_all_keys - Whether all keys can access the server.
    • status - Health status (healthy, unhealthy, unknown).
    • created_at - Creation timestamp.
    • updated_at - Last update timestamp.