mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
* feat(terraform): close key/team schema gaps, fix team read envelope, add import support * feat(terraform): add fallback resource/data source and key/team block resources * feat(terraform): add access group and unified access group resources and data sources * feat(terraform): add guardrail and prompt resources and data sources * feat(terraform): add agent and search tool resources and data sources * feat(terraform): add user and budget resources and data sources * feat(terraform): add tag and project resources and data sources * docs(terraform): changelog and readme for parity additions * feat(terraform): add data sources for keys, teams, models, organizations, and mcp servers * fix(terraform): key update 400 on empty budget_duration, key info envelope, config-supplied key * fix(terraform): hash raw keys to SHA-256 tokens in key lookup URLs and block resource IDs
2.1 KiB
2.1 KiB
| page_title | subcategory | description |
|---|---|---|
| litellm_mcp_server Data Source - terraform-provider-litellm | Retrieves information about an existing LiteLLM MCP server. |
litellm_mcp_server (Data Source)
Retrieves information about an existing MCP server via /v1/mcp/server/{server_id}. Secret material (environment variables, credentials, and static header values) is never exposed.
Example Usage
data "litellm_mcp_server" "github" {
server_id = "srv-1234"
}
output "github_mcp_url" {
value = data.litellm_mcp_server.github.url
}
Argument Reference
The following arguments are supported:
server_id- (Required) Unique identifier of the MCP server to retrieve.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
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 (none,bearer,basic, ...).mcp_access_groups- Access groups for the MCP server.allowed_tools- Tools allowed on this server.extra_headers- Names of request headers forwarded to the MCP server.command- Command for stdio transport.args- Arguments for the command (stdio transport).allow_all_keys- Whether all keys can access the server.status- Health status (healthy,unhealthy,unknown).last_health_check- Timestamp of the last health check.health_check_error- Error message from the last health check, if any.created_at- Timestamp when the server was created.created_by- User who created the server.updated_at- Timestamp when the server was last updated.updated_by- User who last updated the server.
Security Note
For security reasons, env, credentials, and static_headers are not exposed through this data source since they may hold secrets.