TT

timescale/tiger-memory-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

30 stars 1 forks 质量 72 趋势 19Apache-2.0

一个简单的内存实现

概览

一个简单的内存系统,设计用于允许大型语言模型存储和检索信息。这为大型语言模型提供了一些针对性的工具,通过模型上下文协议。 所有方法都以MCP工具和REST API端点的形式公开。 运行 npm i 来安装依赖并构建项目。使用 npm 运行监视来重建更改。 基于 .env.sample 文件创建一个 .env 文件。 创建/编辑文件 ~/Library/Application Support/Claude/claude_desktop_config.json 添加类似这样的条目,确保使用你本地 tiger-memory-mcp-server 项目的绝对路径和真实数据库凭证。 我们使用 Helm 图表部署到 Kubernetes。详情请参见图表/目录。 该服务通过 DNS 名称 tiger-memory-mcp-server.savannah-system.svc.cluster.local 访问集群中的其他服务。 运行以下操作以创建必要的密封秘密。务必填写正确的数值。

概述(AI 翻译)

一个简单的内存系统,设计用于允许大型语言模型存储和检索信息。这为大型语言模型提供了一些针对性的工具,通过模型上下文协议。

API

所有方法都以MCP工具和REST API端点的形式公开。

发展

克隆并本地运行服务器。

建筑

运行npm i安装依赖并构建项目。使用npm run watch来重建变更。

基于.env.sample文件创建一个.env文件。

测试

MCP检查员非常实用。

字段 值
运输类型 STDIO
指挥 node
论点 dist/index.js

在 Claude Desktop 上测试

创建/编辑文件 ~/Library/Application Support/Claude/claude_desktop_config.json 添加如下条目,确保使用你本地 tiger-memory-mcp-server 项目的绝对路径和真实数据库凭证。

部署

我们使用 Helm 图表部署到 Kubernetes。详情请参见 chart/ 目录。

该服务通过 DNS 名称 tiger-memory-mcp-server.savannah-system.svc.cluster.local 对集群中的其他服务开放。

数据库设置

创建数据库用户:

本页由 AI 翻译,技术细节请以原文为准。

README

Tiger Memory MCP Server

A simple memory system designed to allow LLMs to store and retrieve information. This provides some focused tools to LLMs via the Model Context Protocol.

API

All methods are exposed as MCP tools and REST API endpoints.

Development

Cloning and running the server locally.

git clone [email protected]:timescale/tiger-memory-mcp-server.git

Building

Run npm i to install dependencies and build the project. Use npm run watch to rebuild on changes.

Create a .env file based on the .env.sample file.

cp .env.sample .env

Testing

The MCP Inspector is very handy.

npm run inspector
Field Value
Transport Type STDIO
Command node
Arguments dist/index.js

Testing in Claude Desktop

Create/edit the file ~/Library/Application Support/Claude/claude_desktop_config.json to add an entry like the following, making sure to use the absolute path to your local tiger-memory-mcp-server project, and real database credentials.

{
  "mcpServers": {
    "tiger-memory": {
      "command": "node",
      "args": [
        "/absolute/path/to/tiger-memory-mcp-server/dist/index.js",
        "stdio"
      ],
      "env": {
        "PGHOST": "x.y.tsdb.cloud.timescale.com",
        "PGDATABASE": "tsdb",
        "PGPORT": "32467",
        "PGUSER": "readonly_mcp_user",
        "PGPASSWORD": "abc123"
      }
    }
  }
}

Deployment

We use a Helm chart to deploy to Kubernetes. See the chart/ directory for details.

The service is accessible to other services in the cluster via the DNS name tiger-memory-mcp-server.savannah-system.svc.cluster.local.

Database setup

Creating the database user:

CREATE USER tiger_memory WITH PASSWORD 'secret';
GRANT CREATE ON DATABASE tsdb TO tiger_memory;

Secrets

Run the following to create the necessary sealed secrets. Be sure to fill in the correct values.

kubectl -n savannah-system create secret generic tiger-memory-mcp-server-database \
  --dry-run=client \
  --from-literal=user="tiger_memory" \
  --from-literal=password="secret" \
  --from-literal=database="tsdb" \
  --from-literal=host="x.y.tsdb.cloud.timescale.com" \
  --from-literal=port="32467" \
  -o yaml | kubeseal -o yaml

# https://logfire-us.pydantic.dev/tigerdata/tigerdata/settings/write-tokens
kubectl -n savannah-system create secret generic tiger-memory-mcp-server-logfire \
  --dry-run=client \
  --from-literal=token="pylf_v1_us_" \
  -o yaml | kubeseal -o yaml

# https://login.tailscale.com/admin/settings/keys
kubectl -n savannah-system create secret generic tiger-memory-mcp-server-tailscale \
  --dry-run=client \
  --from-literal=authkey="tskey-auth-" \
  -o yaml | kubeseal -o yaml

Update ./chart/values/dev.yaml with the output.

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "tiger-memory": { "command": "node", "args": [ "/absolute/path/to/tiger-memory-mcp-server/dist/index.js", "stdio" ], "env": { "PGHOST": "x.y.tsdb.cloud.timescale.com", "PGDATABASE": "tsdb", "PGPORT": "32467", "PGUSER": "readonly_mcp_user", "PGPASSWORD": "abc123" } } } }