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 Stitch’s serverless environment, making it easy to create secure APIs or to build integrations with microservices and server-side logic. Enables integration with popular cloud services such as Twilio, enriching your apps with a single Stitch method call.

Submit an expense claim to the database, and send a text notification to the approver – all with a single method call from the client application.

Stitch Triggers

Real-time notifications that launch functions in response to changes in the database. The functions can make further database changes, push data to other places, or interact with users – such as through push notifications, text messages, or emails.

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

Stitch Mobile Sync (Coming soon)

Automatically synchronizes data between documents held locally in MongoDB Mobile and the backend database. MongoDB Mobile allows mobile developers to use the full power of MongoDB locally. Stitch Mobile Sync ensures that data is kept up to date across phones and all other clients in real time.

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

Makes development easy

Write less code and build apps faster by leveraging intuitive SDK's

Connect to MongoDB

View Docs

Here we show you how to point Stitch to a MongoDB collection. Then we show an anonymous login, document insert, and find operation.

Access Rules

View Docs

Here we show you what a simple rule and a more complex rule look 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.

// 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 a new application.


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


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

Mobile sync (Coming soon)

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 aggregations while maintaining data privacy.


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

Logging & debugging

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

Export/import CLI

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

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.