MongoDB Stitch

The serverless platform from MongoDB

Build better apps, faster with MongoDB Stitch services

Stitch QueryAnywhere

Exposes the full power of working with documents in MongoDB and the MongoDB query language, directly from your web and mobile application frontend code. A powerful rules engine lets developers declare fine-grained security policies.

Allow a doctor to read medical records for just their patients and administrators to find which services are keeping patients waiting longest.

Stitch Functions

Allows developers to run simple JavaScript functions in the Stitch serverless platform, making it easy to implement application logic, securely integrate with cloud services and microservices, and build APIs.

Update inventory levels, send a delivery request to your warehouse system, and record the order in the customer's profile – all with a single method call from the client application.

Stitch Triggers

Executes functions in real time in response to changes in the database or user authentication events.

Send a text message or email to notify a customer that their balance has fallen below their threshold.

Stitch Mobile Sync (Beta)

Automatically synchronizes data between documents held locally in MongoDB Mobile and the backend database.

Push gate changes to a mobile airline app, as they happen. Copy offline meal choices to the backend when connectivity is restored.

Makes development easy

Write less code and build apps faster using authentication, access rules, MongoDB queries, services, and functions – all through the intuitive Stitch SDK.

Connect to MongoDB

View Docs

An app user is authenticated before being able to store and retrieve data using the MongoDB query language.

Access Rules

View Docs

Your rules for accessing data, services, and functions can be as simple or sophisticated as you like.


View Docs

Third-party services, such as Twilio can easily be referenced in the client. Each service comes with pre-built actions which can be sent to Stitch for execution.


View Docs

Service calls and database actions can be composed with each other inside functions. Here we use data from MongoDB to decide which users to send a text to.

Mobile Sync (Beta)

View Docs

Changes to a document are synchronized between MongoDB Mobile and your backend database.

// Install with npm:// npm install mongodb-stitch
// Then simply add the Stitch SDK to your application
import {
} from 'mongodb-stitch-browser-sdk'
// 1. Connect to MongoDB
// It’s simple to point Stitch to a MongoDB collection
const stitchClient = Stitch.initializeDefaultAppClient('myApp');
// Connect to a MongoDB Atlas database
const db = stitchClient
  .getServiceClient(RemoteMongoClient.factory, 'mongodb-atlas')
 // Anonymously authenticate, then add and retrieve documents.
stitchClient.auth.loginWithCredential(new AnonymousCredential())
  .then(() =>
      number: 42}
  ).then(() =>
  ).then(docs =>
    docs.forEach((doc, index) =>
      console.log(`${index}: ${JSON.stringify(doc)}`)

The features your application needs

All of MongoDB

Get the full power and scalability of MongoDB – whether using your existing database or starting from scratch. Retain direct access to the database; safely expose existing data to new applications.


Run your JavaScript code server-side, within the Stitch serverless backend. Stitch transparently scales to meet your usage.


React to database changes and authentication events as they happen. Make further data changes, invoke services, and run custom logic.

Mobile sync (Beta)

Automatically synchronize changes between MongoDB Mobile and your backend database. Resolve conflicts, even after a device has been offline.


Declaratively control which fields a user can access by defining simple JSON rules or JavaScript functions. Grant others access to approved views of the data while maintaining data privacy.

MongoDB wire protocol

Access Stitch and its connected Atlas clusters using existing MongoDB drivers and tools.


The easiest way to work with MongoDB and other backend services. Client SDKs for JavaScript, React Native, Android, and iOS enable cross-platform client support.

Export/import CLI

Build your app through the Stitch API, then export to your local machine to customize, add to source control, and deploy using import command.

Logging & debugging

Test and debug your Stitch functions and view logs for all requests through the Stitch UI.

Service Integrations

Simple pricing. Pay only for what you use.

MongoDB Stitch calculates usage based on the data that you send to external services and the compute your requests consume – Learn more.

GB downloaded per month


Total cost per month


Data: $0.00 Compute: $0.00

Get started free

No credit card required

Already have an account? Sign in.

Frequently Asked Questions

Can I use my existing MongoDB database with MongoDB Stitch?

Yes, MongoDB Stitch works with any MongoDB Atlas cluster using version 3.4+. If you want to open up data that you hold in an existing MongoDB Atlas database, then you can define security rules to selectively expose portions of the data to other applications through Stitch.

What scale does MongoDB Stitch support?

MongoDB Stitch intelligently provisions and manages compute across tens of thousands of applications making it simple for us to transparently scale to your workload at any point in time. Stitch scales automatically to cope with any workload that you throw at it.

See more frequently asked questions >

Safe harbor

The development, release, and timing of any features or functionality described for our products remains at our sole discretion. This information is merely intended to outline our general product direction and it should not be relied on in making a purchasing decision nor is this a commitment, promise or legal obligation to deliver any material, code, or functionality.