1. Registry
  2. Packages
  3. Mongodbatlas Provider
  4. API Docs
  5. getMcpConfigSecrets
Viewing docs for MongoDB Atlas v4.16.0
published on Thursday, Sep 17, 2026 by Pulumi
mongodbatlas logo mongodbatlas logo
Viewing docs for MongoDB Atlas v4.16.0
published on Thursday, Sep 17, 2026 by Pulumi

    mongodbatlas.getMcpConfigSecrets returns all ingress secrets for an Organization Remote MCP Configuration. Secret values are never returned. Only masked metadata is available.

    Example Usage

    S

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const _this = mongodbatlas.getMcpConfigSecrets({
        orgId: orgId,
        mcpConfigId: thisMongodbatlasMcpConfig.mcpConfigId,
    });
    export const mcpConfigSecretsResults = _this.then(_this => _this.results);
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    this = mongodbatlas.get_mcp_config_secrets(org_id=org_id,
        mcp_config_id=this_mongodbatlas_mcp_config["mcpConfigId"])
    pulumi.export("mcpConfigSecretsResults", this.results)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		this, err := mongodbatlas.GetMcpConfigSecrets(ctx, &mongodbatlas.LookupMcpConfigSecretsArgs{
    			OrgId:       orgId,
    			McpConfigId: thisMongodbatlasMcpConfig.McpConfigId,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("mcpConfigSecretsResults", this.Results)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = Mongodbatlas.GetMcpConfigSecrets.Invoke(new()
        {
            OrgId = orgId,
            McpConfigId = thisMongodbatlasMcpConfig.McpConfigId,
        });
    
        return new Dictionary<string, object?>
        {
            ["mcpConfigSecretsResults"] = @this.Apply(@this => @this.Apply(getMcpConfigSecretsResult => getMcpConfigSecretsResult.Results)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.MongodbatlasFunctions;
    import com.pulumi.mongodbatlas.inputs.GetMcpConfigSecretsArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var this = MongodbatlasFunctions.getMcpConfigSecrets(GetMcpConfigSecretsArgs.builder()
                .orgId(orgId)
                .mcpConfigId(thisMongodbatlasMcpConfig.mcpConfigId())
                .build());
    
            ctx.export("mcpConfigSecretsResults", this_.results());
        }
    }
    
    variables:
      this:
        fn::invoke:
          function: mongodbatlas:getMcpConfigSecrets
          arguments:
            orgId: ${orgId}
            mcpConfigId: ${thisMongodbatlasMcpConfig.mcpConfigId}
    outputs:
      mcpConfigSecretsResults: ${this.results}
    
    pulumi {
      required_providers {
        mongodbatlas = {
          source = "pulumi/mongodbatlas"
        }
      }
    }
    
    data "mongodbatlas_getmcpconfigsecrets" "this" {
      org_id        = orgId
      mcp_config_id = thisMongodbatlasMcpConfig.mcpConfigId
    }
    
    output "mcpConfigSecretsResults" {
      value = data.mongodbatlas_getmcpconfigsecrets.this.results
    }
    

    Using getMcpConfigSecrets

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getMcpConfigSecrets(args: GetMcpConfigSecretsArgs, opts?: InvokeOptions): Promise<GetMcpConfigSecretsResult>
    function getMcpConfigSecretsOutput(args: GetMcpConfigSecretsOutputArgs, opts?: InvokeOutputOptions): Output<GetMcpConfigSecretsResult>
    def get_mcp_config_secrets(mcp_config_id: Optional[str] = None,
                               org_id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetMcpConfigSecretsResult
    def get_mcp_config_secrets_output(mcp_config_id: pulumi.Input[Optional[str]] = None,
                               org_id: pulumi.Input[Optional[str]] = None,
                               opts: Optional[InvokeOutputOptions] = None) -> Output[GetMcpConfigSecretsResult]
    func LookupMcpConfigSecrets(ctx *Context, args *LookupMcpConfigSecretsArgs, opts ...InvokeOption) (*LookupMcpConfigSecretsResult, error)
    func LookupMcpConfigSecretsOutput(ctx *Context, args *LookupMcpConfigSecretsOutputArgs, opts ...InvokeOption) LookupMcpConfigSecretsResultOutput

    > Note: This function is named LookupMcpConfigSecrets in the Go SDK.

    public static class GetMcpConfigSecrets 
    {
        public static Task<GetMcpConfigSecretsResult> InvokeAsync(GetMcpConfigSecretsArgs args, InvokeOptions? opts = null)
        public static Output<GetMcpConfigSecretsResult> Invoke(GetMcpConfigSecretsInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetMcpConfigSecretsResult> Invoke(GetMcpConfigSecretsInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetMcpConfigSecretsResult> getMcpConfigSecrets(GetMcpConfigSecretsArgs args, InvokeOptions options)
    public static Output<GetMcpConfigSecretsResult> getMcpConfigSecrets(GetMcpConfigSecretsArgs args, InvokeOptions options)
    public static Output<GetMcpConfigSecretsResult> getMcpConfigSecrets(GetMcpConfigSecretsArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: mongodbatlas:index/getMcpConfigSecrets:getMcpConfigSecrets
      arguments:
        # arguments dictionary
    data "mongodbatlas_get_mcp_config_secrets" "name" {
        # arguments
    }

    The following arguments are supported:

    McpConfigId string
    Unique identifier of the MCP configuration.
    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    McpConfigId string
    Unique identifier of the MCP configuration.
    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    mcp_config_id string
    Unique identifier of the MCP configuration.
    org_id string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    mcpConfigId String
    Unique identifier of the MCP configuration.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    mcpConfigId string
    Unique identifier of the MCP configuration.
    orgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    mcp_config_id str
    Unique identifier of the MCP configuration.
    org_id str
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    mcpConfigId String
    Unique identifier of the MCP configuration.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.

    getMcpConfigSecrets Result

    The following output properties are available:

    McpConfigId string
    Unique identifier of the MCP configuration.
    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    Results List<GetMcpConfigSecretsResult>
    List of returned documents that MongoDB Cloud provides when completing this request.
    McpConfigId string
    Unique identifier of the MCP configuration.
    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    Results []GetMcpConfigSecretsResult
    List of returned documents that MongoDB Cloud provides when completing this request.
    mcp_config_id string
    Unique identifier of the MCP configuration.
    org_id string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    results list(object)
    List of returned documents that MongoDB Cloud provides when completing this request.
    mcpConfigId String
    Unique identifier of the MCP configuration.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    results List<GetMcpConfigSecretsResult>
    List of returned documents that MongoDB Cloud provides when completing this request.
    mcpConfigId string
    Unique identifier of the MCP configuration.
    orgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    results GetMcpConfigSecretsResult[]
    List of returned documents that MongoDB Cloud provides when completing this request.
    mcp_config_id str
    Unique identifier of the MCP configuration.
    org_id str
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    results Sequence[GetMcpConfigSecretsResult]
    List of returned documents that MongoDB Cloud provides when completing this request.
    mcpConfigId String
    Unique identifier of the MCP configuration.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    results List<Property Map>
    List of returned documents that MongoDB Cloud provides when completing this request.

    Supporting Types

    GetMcpConfigSecretsResult

    CreatedAt string
    The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    ExpiresAt string
    The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    Id string
    Unique 24-hexadecimal digit string that identifies the secret.
    LastUsedAt string
    The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    MaskedSecretValue string
    The masked Service Account secret.
    CreatedAt string
    The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    ExpiresAt string
    The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    Id string
    Unique 24-hexadecimal digit string that identifies the secret.
    LastUsedAt string
    The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    MaskedSecretValue string
    The masked Service Account secret.
    created_at string
    The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    expires_at string
    The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    id string
    Unique 24-hexadecimal digit string that identifies the secret.
    last_used_at string
    The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    masked_secret_value string
    The masked Service Account secret.
    createdAt String
    The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    expiresAt String
    The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    id String
    Unique 24-hexadecimal digit string that identifies the secret.
    lastUsedAt String
    The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    maskedSecretValue String
    The masked Service Account secret.
    createdAt string
    The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    expiresAt string
    The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    id string
    Unique 24-hexadecimal digit string that identifies the secret.
    lastUsedAt string
    The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    maskedSecretValue string
    The masked Service Account secret.
    created_at str
    The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    expires_at str
    The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    id str
    Unique 24-hexadecimal digit string that identifies the secret.
    last_used_at str
    The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    masked_secret_value str
    The masked Service Account secret.
    createdAt String
    The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    expiresAt String
    The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    id String
    Unique 24-hexadecimal digit string that identifies the secret.
    lastUsedAt String
    The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    maskedSecretValue String
    The masked Service Account secret.

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo mongodbatlas logo
    Viewing docs for MongoDB Atlas v4.16.0
    published on Thursday, Sep 17, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial