---
title: "Stack"
description: "Stack"
url: "https://www.contentstack.com/docs/developers/sdks/datasync-sdk-mongodb/typescript/reference/stack"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-09-23"
---

# Stack

## Stack

The [Stack](/docs/headless-cms/about-stack) instance serves as the primary interface for interacting with your Contentstack data stored in MongoDB. It provides methods to query [entries](/docs/headless-cms/about-entries), [assets](/docs/headless-cms/about-assets), and [content type](/docs/headless-cms/about-content-types) schemas.

**Example:**

```
const Stack = Contentstack.Stack(config);
```

Name of the MongoDB database. Defaults to 'contentstack-db'.

MongoDB connection URI. Defaults to 'mongodb://localhost:27017'.

MongoDB connection options. Refer to [MongoClient](https://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html) Options for details.