Skip to main content
Glama
GennoBou

GNB MemoryMCP

by GennoBou

GNB MemoryMCP

A vendor-independent personal memory layer (MCP server) that can be commonly referenced and updated by multiple LLMs and AI agents (ChatGPT, Claude, Claude Code, Gemini, Antigravity, etc.).

This project is implemented in Go and is designed to seamlessly switch between local environment (SQLite) and production environment (AWS Lambda + Turso / libSQL).


Features

  • Memory sharing across multiple LLMs: Without being locked into a specific vendor, you can carry over your settings, project context, and knowledge to all AI agents.

  • Two types of local connections supported:

    1. HTTP server mode: Start with a specified port and access from multiple clients. Authentication uses Authorization: Bearer <API_KEY>.

    2. Standard input/output (stdio) mode: The binary is executed and communicates directly with MCP clients such as Claude Desktop, without opening a port.

  • Full-text search (FTS5): Supports fast and lightweight full-text search using SQLite's FTS5.

  • Schema persistence: Since tags and metadata are stored as JSON, internal implementations such as vector search and batch summarization can be evolved in the future without changing the API specification.


Directory Structure

  • cmd/gnb-memorymcp/: Entry point for the local integrated binary (server / stdio mode)

  • cmd/lambda/: Entry point for AWS Lambda startup

  • pkg/auth/: Bearer authentication, JWT verification, and CIMD client ID determination

  • pkg/domain/: Memory model and database store interface definitions

  • pkg/infra/sqlite/: SQLite / libSQL DB storage, full-text search (FTS5), and trigger synchronization implementation

  • pkg/mcp/: MCP tool execution handler compliant with JSON-RPC 2.0


Installation Methods

# バケットの追加
scoop bucket add gnb-bucket https://github.com/GennoBou/scoop-bucket

# インストール
scoop install gnb-memorymcp

Building from Source

# 全部入りバイナリ(ローカル用)のビルド
go build -o bin/gnb-memorymcp.exe ./cmd/gnb-memorymcp/main.go

Usage

1. Configuration Example for Standard Input/Output (stdio) Mode

This is the easiest way to run MCP locally. Register the binary directly in the configuration file of the connecting client (Claude Desktop, Antigravity, OpenCode, etc.). By explicitly passing stdio as the first argument, it starts in standard input/output mode.

A. For Claude Desktop

Configuration file: AppData\Roaming\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "gnb-memorymcp": {
      "command": "gnb-memorymcp.exe",
      "args": ["stdio", "--db-url", "file:D:/Data/Projects/GitHub/gnb-memorymcp/data/local_v2.db"]
    }
  }
}

B. For Antigravity

Configuration file: ~/.gemini/antigravity-cli/settings.json (for Windows: C:\Users\<ユーザー名>\.gemini\antigravity-cli\settings.json)

{
  "mcpServers": {
    "gnb-memorymcp": {
      "command": "gnb-memorymcp.exe",
      "args": ["stdio", "--db-url", "file:D:/Data/Projects/GitHub/gnb-memorymcp/data/local_v2.db"]
    }
  }
}

C. For OpenCode

Configuration file: ~/.config/opencode/opencode.jsonc

{
  "mcp": {
    "gnb-memorymcp": {
      "type": "local",
      "enabled": true,
      "command": [
        "gnb-memorymcp.exe",
        "stdio",
        "--db-url",
        "file:D:/Data/Projects/GitHub/gnb-memorymcp/data/local_v2.db"
      ]
    }
  }
}

After applying the configuration, restart the target client, and the memory tools (such as memory_create) will be automatically loaded and ready to use.


2. HTTP Server Mode (Local SQLite)

Start as an HTTP server on your local machine or another device, referencing a local SQLite database. Pass server as the first argument to start. For security, it binds to localhost (127.0.0.1) by default.

Startup Method (PowerShell)

  • Method 1: Start with command-line arguments

    # ローカルホストからのみ接続可能として起動 (APIキーが未指定の場合は自動的に 'dev-key' が使われます)
    ./bin/gnb-memorymcp.exe server --port 8080 --db-url "file:data/local_v2.db"
    
    # 外部ネットワークに公開して起動 (--host 0.0.0.0 指定時は、安全な独自の --api-key 設定が必須)
    ./bin/gnb-memorymcp.exe server --host 0.0.0.0 --port 8080 --api-key "your-secure-secret-key" --db-url "file:data/local_v2.db"
  • Method 2: Start with environment variables

    $env:HOST="127.0.0.1"
    $env:API_KEY="your-secret-key"
    $env:PORT="8080"
    $env:DB_URL="file:data/local_v2.db"
    ./bin/gnb-memorymcp.exe server

How to Make Requests from a Client

  • URL: http://localhost:8080/

  • Method: POST

  • Required header: Authorization: Bearer your-secret-key

  • Request body (JSON-RPC 2.0):

    {
      "jsonrpc": "2.0",
      "method": "tools/list",
      "id": 1
    }

3. Local HTTP + Turso Mode (Cloud DB Integration)

Start an HTTP server locally and have it reference a remote Turso (libSQL) database only.

Startup Method (PowerShell)

  • Method 1: Start with command-line arguments ※ It is recommended to set DB_TOKEN as an environment variable for security.

    $env:DB_TOKEN="your-turso-auth-token"
    ./bin/gnb-memorymcp.exe server --port 8080 --api-key "your-secret-key" --db-url "libsql://your-database-name-username.turso.io"
  • Method 2: Start with environment variables

    $env:API_KEY="your-secret-key"
    $env:PORT="8080"
    $env:DB_URL="libsql://your-database-name-username.turso.io"
    $env:DB_TOKEN="your-turso-auth-token"
    ./bin/gnb-memorymcp.exe server

4. AWS Lambda + Turso Mode (Production Cloud Operation)

A serverless deployment on AWS Lambda, operating in conjunction with Turso.

  • Entry point: cmd/lambda/main.go

  • Supports one-command build and deploy script (npm run build-and-deploy-lambda) and SAM template (template.yaml).

For detailed deployment steps, refer to the AWS Lambda + Turso Deployment Guide.


Provided MCP Tool Specifications

GNB MemoryMCP provides the following 10 tools.

Tool Name

Description

Main Arguments

memory_create

Saves a new memory (max 10,000 characters, max 10 tags, importance 0–10).

content, source_tool, tags, importance, metadata

memory_search

Hybrid recall using Japanese FTS5 trigram and LIKE. Re-ranked by importance and freshness.

query, top_k (max 50)

memory_list

Retrieves a list of memories. Supports sorting and pagination.

source_tool, tag, limit (max 100), offset, sort_by, order

memory_get

Retrieves a single memory by ID.

id

memory_update

Diff update of an existing memory (supports clearing by empty value and optimistic locking).

id, content, source_tool, tags, importance, metadata

memory_delete

Physically deletes an unwanted memory by ID.

id

memory_status

Checks the total number of records in the database and whether cleanup is needed.

none

memory_consolidate

Lightweight extraction of potentially duplicate or contradictory memory pairs (fast similarity scan).

limit (max 50), offset

memory_cleanup_complete

Records the completion of cleanup and updates the last cleanup date/time.

none

tags_list

Retrieves a list of unique tags registered so far.

none

-
license - not tested
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.

  • Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.

  • Person-owned, portable AI memory as a remote MCP server, readable and writable by any MCP client.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GennoBou/gnb-memorymcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server