MCP Datastore Server MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS}" -e "GOOGLE_CLOUD_PROJECT=${GOOGLE_CLOUD_PROJECT}" gcp-datastore -- node "<FULL_PATH_TO_MCP_GCP_DATASTORE>/dist/index.js"

Replace <FULL_PATH_TO_MCP_GCP_DATASTORE>/dist/index.js with the actual folder you prepared in step 1.

Required:GOOGLE_APPLICATION_CREDENTIALSGOOGLE_CLOUD_PROJECT
README.md

Access Google Firestore in Datastore mode via MCP

MCP Datastore Server

A Model Context Protocol (MCP) server that provides access to Google Firestore in Datastore mode.

Features

This MCP server exposes the following tools for interacting with Google Cloud Datastore:

Entity Operations

  • datastore_get: Get an entity by kind and key
  • datastore_insert: Insert a new entity
  • datastore_update: Update an existing entity
  • datastore_upsert: Insert or update an entity
  • datastore_delete: Delete an entity by kind and key

Query Operations

  • datastore_query: Query entities with filters and ordering
  • datastore_runAggregationQuery: Run aggregation queries (count, sum, avg)
  • datastore_listKinds: List all entity kinds (types) in the Datastore

Key Operations

  • datastore_allocateIds: Allocate IDs for incomplete keys
  • datastore_createKey: Create a complete or incomplete key

Transaction Operations

  • datastore_runInTransaction: Execute multiple operations in a transaction

Setup

Prerequisites

  1. A Google Cloud project with Datastore API enabled
  2. Service account credentials with appropriate Datastore permissions

Installation

npm install
npm run build

Configuration

Set the following environment variables:

# Path to your service account JSON key file
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json

# Your Google Cloud project ID
export GOOGLE_CLOUD_PROJECT=your-project-id

Or you can provide them when running the server:

GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json GOOGLE_CLOUD_PROJECT=your-project-id npm start

Usage

Running the Server

npm start

Using with Claude Desktop

Add this to your Claude Desktop configuration file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "datastore": {
      "command": "node",
      "args": [
        "d:\\projects\\mcp-datastore\\build\\index.js"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "C:\\path\\to\\service-account-key.json",
        "GOOGLE_CLOUD_PROJECT": "your-project-id"
      }
    }
  }
}

Tool Examples

Get an Entity

{
  "kind": "User",
  "keyId": "12345"
}

Insert an Entity

{
  "kind": "User",
  "data": {
    "name": "John Doe",
    "email": "john@example.com",
    "age": 30
  }
}

Query Entities

{
  "kind": "User",
  "filters": [
    {
      "property": "age",
      "operator": ">",
      "value": 25
    }
  ],
  "orderBy": [
    {
      "property": "name",
      "descending": false
    }
  ],
  "limit": 10
}

Run Aggregation Query

{
  "kind": "Order",
  "aggregations": [
    {
      "type": "count",
      "alias": "total_orders"
    },
    {
      "type": "sum",
      "property": "amount",
      "alias": "total_amount"
    }
  ]
}

List Entity Kinds

{
  "namespace": "optional-namespace"  // Optional: specify namespace to list kinds from
}

This returns all entity kinds (types) in your Datastore, including both user-defined kinds and system metadata kinds (prefixed with __Stat_).

License

MIT

Tools (11)

datastore_getGet an entity by kind and key
datastore_insertInsert a new entity
datastore_updateUpdate an existing entity
datastore_upsertInsert or update an entity
datastore_deleteDelete an entity by kind and key
datastore_queryQuery entities with filters and ordering
datastore_runAggregationQueryRun aggregation queries (count, sum, avg)
datastore_listKindsList all entity kinds (types) in the Datastore
datastore_allocateIdsAllocate IDs for incomplete keys
datastore_createKeyCreate a complete or incomplete key
datastore_runInTransactionExecute multiple operations in a transaction

Environment Variables

GOOGLE_APPLICATION_CREDENTIALSrequiredPath to your service account JSON key file
GOOGLE_CLOUD_PROJECTrequiredYour Google Cloud project ID

Configuration

claude_desktop_config.json
{"mcpServers": {"datastore": {"command": "node", "args": ["d:\\projects\\mcp-datastore\\build\\index.js"], "env": {"GOOGLE_APPLICATION_CREDENTIALS": "C:\\path\\to\\service-account-key.json", "GOOGLE_CLOUD_PROJECT": "your-project-id"}}}}

Try it

List all the entity kinds currently stored in my Google Datastore.
Find all users in the 'User' kind who are older than 25 and sort them by name.
Insert a new entity into the 'User' kind with name 'John Doe' and age 30.
Calculate the total count and sum of the 'amount' property for all entities in the 'Order' kind.
Get the details for the user entity with ID 12345.

Frequently Asked Questions

What are the key features of MCP Datastore Server?

CRUD operations for Datastore entities. Support for complex filtering and ordering in queries. Aggregation queries including count, sum, and average. Transaction support for atomic operations. Ability to list and inspect entity kinds.

What can I use MCP Datastore Server for?

Managing application user data directly from the Claude interface. Performing ad-hoc data analysis on Datastore entities using natural language. Automating database maintenance tasks like cleaning up or updating records. Quickly verifying data state during development or debugging.

How do I install MCP Datastore Server?

Install MCP Datastore Server by running: npm install && npm run build

What MCP clients work with MCP Datastore Server?

MCP Datastore Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep MCP Datastore Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare