|
| 1 | +# Tiger Memory MCP Server |
| 2 | + |
| 3 | +Un semplice sistema di memoria progettato per consentire agli LLM di memorizzare e recuperare informazioni. Questo fornisce alcuni strumenti focalizzati agli LLM tramite il [Model Context Protocol](https://modelcontextprotocol.io/introduction). |
| 4 | + |
| 5 | +## API |
| 6 | + |
| 7 | +Tutti i metodi sono esposti come strumenti MCP e endpoint API REST. |
| 8 | + |
| 9 | +## Sviluppo |
| 10 | + |
| 11 | +Clonazione ed esecuzione del server in locale. |
| 12 | + |
| 13 | +```bash |
| 14 | +git clone git@github.com:timescale/tiger-memory-mcp-server.git |
| 15 | +``` |
| 16 | + |
| 17 | +### Compilazione |
| 18 | + |
| 19 | +Eseguire `npm i` per installare le dipendenze e compilare il progetto. Usare `npm run watch` per ricompilare ad ogni modifica. |
| 20 | + |
| 21 | +Creare un file `.env` basato sul file `.env.sample`. |
| 22 | + |
| 23 | +```bash |
| 24 | +cp .env.sample .env |
| 25 | +``` |
| 26 | + |
| 27 | +### Testing |
| 28 | + |
| 29 | +L'MCP Inspector è molto utile. |
| 30 | + |
| 31 | +```bash |
| 32 | +npm run inspector |
| 33 | +``` |
| 34 | + |
| 35 | +| Campo | Valore | |
| 36 | +| -------------- | --------------- | |
| 37 | +| Transport Type | `STDIO` | |
| 38 | +| Command | `node` | |
| 39 | +| Arguments | `dist/index.js` | |
| 40 | + |
| 41 | +#### Testing in Claude Desktop |
| 42 | + |
| 43 | +Creare/modificare il file `~/Library/Application Support/Claude/claude_desktop_config.json` per aggiungere una voce come la seguente, assicurandosi di utilizzare il percorso assoluto del progetto locale `tiger-memory-mcp-server` e credenziali database reali. |
| 44 | + |
| 45 | +```json |
| 46 | +{ |
| 47 | + "mcpServers": { |
| 48 | + "tiger-memory": { |
| 49 | + "command": "node", |
| 50 | + "args": [ |
| 51 | + "/percorso/assoluto/a/tiger-memory-mcp-server/dist/index.js", |
| 52 | + "stdio" |
| 53 | + ], |
| 54 | + "env": { |
| 55 | + "PGHOST": "x.y.tsdb.cloud.timescale.com", |
| 56 | + "PGDATABASE": "tsdb", |
| 57 | + "PGPORT": "32467", |
| 58 | + "PGUSER": "readonly_mcp_user", |
| 59 | + "PGPASSWORD": "abc123" |
| 60 | + } |
| 61 | + } |
| 62 | + } |
| 63 | +} |
| 64 | +``` |
| 65 | + |
| 66 | +## Deployment |
| 67 | + |
| 68 | +Utilizziamo un Helm chart per il deployment su Kubernetes. Vedere la directory `chart/` per i dettagli. |
| 69 | + |
| 70 | +Il servizio è accessibile ad altri servizi nel cluster tramite il nome DNS `tiger-memory-mcp-server.savannah-system.svc.cluster.local`. |
| 71 | + |
| 72 | +### Configurazione database |
| 73 | + |
| 74 | +Creazione dell'utente database: |
| 75 | + |
| 76 | +```sql |
| 77 | +CREATE USER tiger_memory WITH PASSWORD 'secret'; |
| 78 | +GRANT CREATE ON DATABASE tsdb TO tiger_memory; |
| 79 | +``` |
| 80 | + |
| 81 | +### Secrets |
| 82 | + |
| 83 | +Eseguire quanto segue per creare i sealed secrets necessari. Assicurarsi di inserire i valori corretti. |
| 84 | + |
| 85 | +```bash |
| 86 | +kubectl -n savannah-system create secret generic tiger-memory-mcp-server-database \ |
| 87 | + --dry-run=client \ |
| 88 | + --from-literal=user="tiger_memory" \ |
| 89 | + --from-literal=password="secret" \ |
| 90 | + --from-literal=database="tsdb" \ |
| 91 | + --from-literal=host="x.y.tsdb.cloud.timescale.com" \ |
| 92 | + --from-literal=port="32467" \ |
| 93 | + -o yaml | kubeseal -o yaml |
| 94 | + |
| 95 | +# https://logfire-us.pydantic.dev/tigerdata/tigerdata/settings/write-tokens |
| 96 | +kubectl -n savannah-system create secret generic tiger-memory-mcp-server-logfire \ |
| 97 | + --dry-run=client \ |
| 98 | + --from-literal=token="pylf_v1_us_" \ |
| 99 | + -o yaml | kubeseal -o yaml |
| 100 | + |
| 101 | +# https://login.tailscale.com/admin/settings/keys |
| 102 | +kubectl -n savannah-system create secret generic tiger-memory-mcp-server-tailscale \ |
| 103 | + --dry-run=client \ |
| 104 | + --from-literal=authkey="tskey-auth-" \ |
| 105 | + -o yaml | kubeseal -o yaml |
| 106 | +``` |
| 107 | + |
| 108 | +Aggiornare `./chart/values/dev.yaml` con l'output. |
0 commit comments