Logo van Memory MCP Server (Go)

Memory MCP Server (Go)

Community
okooo5km

A Model Context Protocol server that provides knowledge graph management capabilities.

Uitgeverokooo5km
Repositorymemory-mcp-server-go
TaalGo
Forks
10
Sterren
93
Beschikbare tools
0
Transporttypestdio
Categorieën
Links
  • Koppel tools aan AI-workflows

    Memory MCP Server (Go) biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    93 sterren en 10 forks in de gekoppelde repository.

Memory MCP Server (Go)

A Model Context Protocol server that provides knowledge graph management capabilities. This server enables LLMs to create, read, update, and delete entities and relations in a persistent knowledge graph, helping AI assistants maintain memory across conversations. This is a Go implementation of the official TypeScript Memory MCP Server.

Go Platform License

Features

  • High-Performance Storage: SQLite backend with WAL mode, read/write connection separation for concurrent access
  • Knowledge Graph Management: Persistent graph of entities, relationships, and observations
  • Advanced Search: FTS5 full-text search with BM25 ranking, synonym expansion, and time-decay scoring
  • Graph Traversal: Search results include 1-hop related entities for richer context
  • Entity Management: Merge duplicate entities, update types, modify observations, detect conflicts
  • Observation Metadata: Track source, confidence, and tags for each observation
  • MCP Resources & Prompts: AI clients can passively load graph summaries and use guided memory workflows
  • Flexible Transport: Supports stdio, SSE, and Streamable HTTP with optional Bearer or OAuth 2.1 authentication
  • Seamless Migration: Automatic upgrade from JSONL to SQLite with zero intervention
  • Cross-Platform: Pure Go SQLite (no CGO required), works on Linux, macOS, and Windows

Available Tools

Core CRUD

ToolDescription
create_entitiesCreate new entities with name, type, and observations
create_relationsCreate relations between entities (active voice)
add_observationsAdd observations to existing entities
delete_entitiesDelete entities and their associated relations
delete_relationsDelete specific relations
delete_observationsDelete specific observations from entities

Query

ToolDescription
search_nodesSearch entities by keyword with FTS5, synonym expansion, and graph traversal. Returns lightweight results with snippets and related entities
open_nodesGet full details of specific entities by exact name
read_graphGet graph overview (summary mode) or full export (full mode)

Entity Management

ToolDescription
merge_entitiesMerge two entities: migrate observations and relations from source to target, then delete source
update_entitiesChange an entity's type
update_observationsReplace an observation's content
detect_conflictsFind potential duplicates and contradictions within an entity's observations

MCP Resources

URIDescription
memory://graph/summaryGraph statistics and entity type distribution
memory://graph/recentRecently accessed entities
memory://graph/typesAll entity and relation type enumerations
memory://entities/{name}Full details of a specific entity

MCP Prompts

PromptDescription
memory-recallRecall relevant memories by topic
memory-saveAnalyze conversation text and suggest what to save
memory-reviewGenerate a comprehensive review of an entity's memories

Installation

Homebrew (macOS/Linux)

bash
brew install okooo5km/tap/mms

Quick Install Script (macOS/Linux)

bash
curl -fsSL https://raw.githubusercontent.com/okooo5km/memory-mcp-server-go/main/scripts/install.sh | bash

Options: -v v0.2.3 for a specific version, -d /usr/local/bin for a custom directory.

Pre-built Binaries

Download from GitHub Releases. Available for macOS (arm64/amd64), Linux (arm64/amd64), and Windows (arm64/amd64).

bash
# Example: macOS Apple Silicon
curl -L https://github.com/okooo5km/memory-mcp-server-go/releases/latest/download/mms_VERSION_darwin_arm64.tar.gz | tar xz
chmod +x mms && mv mms ~/.local/bin/

Build from Source

bash
git clone https://github.com/okooo5km/memory-mcp-server-go.git
cd memory-mcp-server-go
make build        # binary in .build/

Make sure ~/.local/bin (or your chosen directory) is in your PATH.

Command Line Arguments

mms [options]
  -t, --transport string   Transport type: stdio, sse, or http (default "stdio")
  -m, --memory string      Memory file path (auto-detected if not specified)
  -p, --port int           Port for SSE/HTTP transport (default 8080)
  --host string            Host/IP to bind for SSE/HTTP transports (env: MMS_HOST, default all interfaces)
  -v, --version            Show version

  Storage:
  --storage string         Force storage type: sqlite or jsonl (auto-detected)
  --auto-migrate           Auto-migrate JSONL to SQLite (default true)

  Migration:
  --migrate string         Source JSONL file for manual migration
  --migrate-to string      Destination SQLite file
  --dry-run                Dry run migration
  --force                  Overwrite destination

  Streamable HTTP:
  --http-endpoint string   HTTP endpoint path (default "/mcp")
  --http-heartbeat string  Heartbeat interval (default "30s")
  --http-stateless         Stateless HTTP mode

  Auth:
  --auth-bearer string     Require Bearer token for SSE/HTTP

  OAuth 2.1 (mutually exclusive with --auth-bearer):
  --oauth-user string      OAuth login username (env: OAUTH_USER)
  --oauth-pass string      OAuth login password (env: OAUTH_PASS)
  --oauth-issuer string    OAuth issuer URL (auto-detect if empty, env: OAUTH_ISSUER)
  --oauth-store string     SQLite path for durable OAuth clients and tokens (env: OAUTH_STORE_PATH)
  --oauth-refresh-replay-grace string
                           Duration to accept replay of a rotated refresh token (env: OAUTH_REFRESH_REPLAY_GRACE, default 75m)

  CORS:
  --cors-origin string     Allowed CORS origins: '*' for all, or comma-separated list (default "*")

Examples:

bash
mms                                          # stdio, auto-detect storage
mms --memory /path/to/memory.json            # custom path, auto-migrates to SQLite
mms --transport sse --port 9000              # SSE transport
mms --transport http --auth-bearer mytoken   # Streamable HTTP with Bearer auth
mms --transport http --host 127.0.0.1 --oauth-user admin --oauth-pass secret --oauth-store /var/lib/mms/oauth.db  # OAuth 2.1 auth
mms --transport http --cors-origin "https://app.example.com,https://admin.example.com"  # CORS whitelist

Configuration

Claude Desktop / Claude.app

json
"mcpServers": {
  "memory": {
    "command": "mms",
    "env": {
      "MEMORY_FILE_PATH": "/path/to/memory.json"
    }
  }
}

Claude Desktop Connectors (OAuth)

For remote deployment with OAuth 2.1 authentication, compatible with Claude Desktop's Custom Connectors:

bash
# Start server with OAuth
mms --transport http --host 127.0.0.1 --oauth-user admin --oauth-pass secret --oauth-store /var/lib/mms/oauth.db --port 8080

# Or with environment variables and explicit issuer
OAUTH_USER=admin OAUTH_PASS=secret OAUTH_STORE_PATH=/var/lib/mms/oauth.db \
  OAUTH_REFRESH_REPLAY_GRACE=24h \
  mms --transport http --oauth-issuer https://mcp.example.com

Then in Claude Desktop: Settings → Connectors → Add Custom Connector → enter your server URL (e.g., https://mcp.example.com/mcp). Claude will automatically discover the OAuth endpoints and prompt you to log in.

Cursor

Add to Cursor Settings > mcp.json:

json
{
  "mcpServers": {
    "memory": {
      "command": "mms",
      "env": {
        "MEMORY_FILE_PATH": "/path/to/memory.json"
      }
    }
  }
}

Example System Prompt

text
You have access to a Knowledge Graph memory system that persists across conversations.

Saving memories:
- create_entities: Add new people, places, concepts (check search_nodes first to avoid duplicates)
- create_relations: Record how entities relate to each other
- add_observations: Add facts to existing entities

Retrieving memories:
- search_nodes: Find relevant entities by keyword (supports synonyms like JS→JavaScript)
- open_nodes: Get full details of specific entities
- read_graph: Get an overview of all stored knowledge (use "summary" mode first)

Managing memories:
- merge_entities: Combine duplicate entities
- detect_conflicts: Find contradictory observations
- update_entities / update_observations: Fix incorrect data

Always check your memory before answering questions that might require past context.

Streamable HTTP Usage

The Streamable HTTP endpoint accepts JSON-RPC requests, notifications, and responses. Client responses such as replies to server ping messages are acknowledged with 202 Accepted and no body, per the MCP transport spec.

bash
# 1. Initialize session
curl -i -X POST http://localhost:8080/mcp \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer mytoken' \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{}}}'

# 2. Listen for server messages
curl -N http://localhost:8080/mcp \
  -H 'Authorization: Bearer mytoken' \
  -H 'Mcp-Session-Id: <session-id>'

# 3. Call a tool
curl -s http://localhost:8080/mcp \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer mytoken' \
  -H 'Mcp-Session-Id: <session-id>' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search_nodes","arguments":{"query":"idea"}}}'

# 4. Terminate session
curl -X DELETE http://localhost:8080/mcp \
  -H 'Authorization: Bearer mytoken' \
  -H 'Mcp-Session-Id: <session-id>'

Security & Deployment

  • Deploy behind TLS (Nginx/Caddy/Traefik), bind server to localhost
  • Simple auth: Use --auth-bearer $(openssl rand -hex 32) for programmatic clients
  • OAuth 2.1: Use --oauth-user/--oauth-pass for browser-based login (Claude Desktop Connectors). Set --oauth-store in production so registered clients and tokens survive restarts, and run the service with a restrictive umask such as systemd UMask=0077 to protect SQLite WAL/SHM files. Supports PKCE (S256), dynamic client registration, durable token storage, and refresh token rotation with a replay grace window for concurrent or multi-worker clients. Use --oauth-refresh-replay-grace for clients that keep stale refresh tokens in multiple processes
  • Forward Authorization header from reverse proxy to backend; set --oauth-issuer to the public URL when behind a proxy
  • Run as non-root, open only required ports, enable rate limiting for untrusted clients

Storage System

Storage Types

SQLite (Recommended)JSONL (Legacy)
Read/Search1.9x fasterBaseline
Memory1.9x more efficientBaseline
File SizeLarger3x smaller
StartupSlower55x faster
FeaturesFTS5, ACID, WAL, concurrent readsHuman-readable
Best For>100 entities<50 entities

Migration

bash
# Automatic (default): just use your existing JSONL path
mms --memory /path/to/memory.json  # auto-migrates to .db

# Manual migration
mms --migrate /path/to/memory.json --migrate-to /path/to/memory.db

# Dry run
mms --migrate /path/to/memory.json --dry-run

Knowledge Graph Structure

  • Entities: Nodes with a name, type, and list of observations (each with optional metadata: source, confidence, tags)
  • Relations: Directed edges between entities with a relation type in active voice
  • Observations: Atomic facts associated with entities, supporting time-decay ranking based on access patterns

Usage Examples

Creating Entities

json
{
  "entities": [
    {
      "name": "John Smith",
      "entityType": "person",
      "observations": ["Software engineer", "Lives in San Francisco", "Enjoys hiking"]
    },
    {
      "name": "Acme Corp",
      "entityType": "company",
      "observations": ["Founded in 2010", "Tech startup"]
    }
  ]
}

Creating Relations

json
{
  "relations": [
    { "from": "John Smith", "to": "Acme Corp", "relationType": "works at" }
  ]
}

Searching with Graph Traversal

Search for "John" returns:

  • Direct hits: Entities matching "John" with observation snippets
  • Related entities: Entities connected to "John" via relations (e.g., "Acme Corp" via "works at")

Merging Duplicate Entities

json
{
  "sourceName": "React.js",
  "targetName": "React"
}

Merges all observations and relations from "React.js" into "React", then deletes "React.js".

Detecting Conflicts

json
{
  "entityName": "John Smith"
}

Returns potential duplicates (>60% prefix overlap) and contradictions (antonym keyword pairs like "likes/dislikes").

Development

bash
make fmt          # Format code
make check        # Static analysis (gofmt + go vet)
go test ./...     # Run tests
make build        # Build binary

# Full verification
make fmt && make check && go test ./... && make build

Requirements

  • Go 1.24+
  • github.com/mark3labs/mcp-go v0.19.0+
  • modernc.org/sqlite (pure Go SQLite, no CGO)

Versioning

Version is managed via the VERSION file. Override with make build VERSION=1.2.3 or go build -ldflags "-X main.version=1.2.3".

License

MIT License. See LICENSE for details.

Installatie

TypingMind
{
  "mcpServers": {
    "memory-mcp-server-go": {
      "command": "memory-mcp-server-go",
      "args": []
    }
  }
}

Gebruik Memory MCP Server (Go) MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra Memory MCP Server (Go) is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg Memory MCP Server (Go) toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van Memory MCP Server (Go).
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "memory-mcp-server-go": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van Memory MCP Server (Go) in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van Memory MCP Server (Go) in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je Memory MCP Server (Go) gebruiken om me hiermee te helpen?
Memory MCP Server (Go)
Zeker. Ik heb het gelezen.
Dit vond ik met Memory MCP Server (Go).

Veelgestelde vragen

Waarvoor wordt de MCP-server Memory MCP Server (Go) gebruikt?

Memory MCP Server (Go) is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik Memory MCP Server (Go) MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je Memory MCP Server (Go) gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom Memory MCP Server (Go) MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als Memory MCP Server (Go) verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik Memory MCP Server (Go) MCP met TypingMind?

Memory MCP Server (Go) werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt Memory MCP Server (Go) MCP in TypingMind?

Memory MCP Server (Go) biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om Memory MCP Server (Go) MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als Memory MCP Server (Go) authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇