Skip to content

Give Gemini 3 Pro Access To Your MemPalace

Previously I have written about how you can run Gemma 4 NVFP4 locally in ComfyUI, run local agentic AI and how to add MemPalace to your local AI. The theme of running things locally with access to a long-term memory continues, and today we’ll go through how to give Gemini 3 Pro access to your MemPalace, using your web app subscription.

Prerequisites

  • A local terminal setup (Linux/WSL) with Node.js installed.
  • A Google Cloud Platform account
  • Google Workspace domain account, or a personal gmail account
  • The Gemini CLI initialized locally via npx @google/gemini-cli.
  • MemPalace installed locally.

Enable the Backend API Engine

First, you need a project container on Google Cloud with the core machine learning backend turned on. Go to Google Cloud Console and create a new project by clicking at the project picker in the upper left corner.

New project

In the window that opens, click New Project, name your project and save your Project ID.

Google cloud project

Make sure you currently have your new project selected in the project picker, open Google Cloud Shell using the >_ icon in the upper right corner.

google cloud shell

Run the following command, replacing YOUR_PROJECT_ID with your actual Project ID, inside Google Cloud Shell to activate the core engine:

gcloud services enable aiplatform.googleapis.com --project=YOUR_PROJECT_ID

Enable Gemini 3 Pro Preview

At this point you will have access to Gemini 2.5 Pro, Gemini 2.5 Flash, Gemini 2.5 Flash Lite, Gemma 4 31b it and Gemma 4 26b A4B it.

Select Gemini model

To enable Gemini 3 Pro Preview you will have to enable preview versions in Google Cloud. Open the following link in your browser, replacing YOUR_PROJECT_ID with your actual Project ID.

Independent research like this is self-funded. If this guide saved you hours of troubleshooting, consider fueling the lab.

Support the Project

https://console.cloud.google.com/gemini-admin/settings?project=YOUR_PROJECT_ID

If prompted by a gray banner, click the blue Enable Required APIs button and wait a few seconds for the page to refresh.

Gemini admin settings

Scroll down to the section titled Release channels for Gemini Code Assist in local IDEs. Change the selection from Generally available to Preview and save your settings. Leave the settings for development tools logging empty.

Gemini code Assist

Link Your WSL Environment to Your Project

Open your PowerShell in admin mode and enter wsl and hit ENTER to launch your WSL. In your WSL terminal open your bash profile with the command nano ~/.bashrc

If you are unfamilliar with nano, it will open up a simple text editor inside your WSL terminal, and it will look like this.

nano editor

Use your keyboards Down Arrow ⬇️ until you are all the way at the bottom of the editor, and then paste the following text, again replacing YOUR_PROJECT_ID with your actual Project ID.

export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"

Make sure you don’t change or delete any other text, and click Ctrl + O and ENTER to save your changes and finally Ctrl + X to exit nano editor.

Finally, use the command source ~/.bashrc to reload your new configurations in your current terminal window.

Creepybits Displate Art

Configure Your Gemini CLI Mappings

The final step is telling the CLI exactly which model string to request. You can open your global Gemini CLI configuration file using nano with the command:

nano ~/.gemini/settings.json

You can also navigate to settings.json using your file explorer (replacing USER with your wsl username): Ubuntu -> home -> USER -> .gemini.

wsl2 ubuntu

Whichever method you decide to use, paste the following settings in the settings.json file and save it.

{
  "security": {
    "auth": {
      "selectedType": "oauth-personal"
    },
    "enablePermanentToolApproval": true,
    "autoAddToPolicyByDefault": true
  },
  "model": {
    "name": "gemini-3.1-pro-preview"
  },
  "context": {
    "loadMemoryFromIncludeDirectories": true
  },
  "tools": {
    "sandboxNetworkAccess": true
  },
  "experimental": {
    "voiceMode": true,
    "modelSteering": true,
    "directWebFetch": true
  }
}

Before launching CLI, we need to make sure that it knows where to find your MemPalace folder. In your WSL terminal window type the following command, replacing USER with your WSL username.

npx @google/gemini-cli mcp add mempalace /home/USER/MemPalace-Server/venv/bin/mempalace-mcp

If you installed MemPalace at another location, you need to provide the path to the mempalace-mcp file in the code above.

Launch and Verify

If you want to use a specific system prompt, create a new text file in the same directory as you have the settings.json file. Enter your system prompt in the text file, and save it as GEMINI.md.

Sample system prompt:

# Core Persona Definition
You are a highly intelligent and proactive partner. Maintain a natural, engaging conversational tone, like speaking to a colleague or close friend. 

# Operational Framework
- You are connected to a local MemPalace MCP server with 29 tools.
- When asked to analyze logs or project files, automatically call the relevant `mcp\_mempalace` tools to retrieve the local context before answering.
- Prioritize accuracy and technical integrity above all else. If data is missing from the local logs, state it directly.

Start the CLI in your WSL terminal window using npx @google/gemini-cli

If you followed this guide and did everything correctly, you will see this.

Gemini cli

You should now have Gemini 3.1 Pro Preview set as your default model.

You also have access to more models and can switch between models by using the /model command directly in the CLI chat.

Gemini cli models

You can see that your GEMINI.md is loaded and that your MCP server is running, as well as the current model you are using is Gemini 3.1 Pro Preview.

gemini.md and mcp

In my next post I plan to discuss different ways this can be used, such as directing a second model and have Gemini execute real tasks locally and online. To make sure you don’t miss it, sign up on my newsletter below.

All the AI related work I do, I do on my spare time and most of it I share with the world completely free of charge. It does take up a lot of my time, as well as the cost for running this website. I’m grateful for every bit of support I can get from users like you.

Published inAIGeminiLocal Agentic AITech