Skip to content

Commit ed6be8a

Browse files
author
Temp
committed
feat: add 9 pgcrypto tools for cryptographic operations, update documentation, and introduce core adapter files.
1 parent ea4a09a commit ed6be8a

7 files changed

Lines changed: 580 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7474
- `pg_ltree_convert_column` — Convert text to ltree
7575
- `pg_ltree_create_index` — Create GiST index for tree queries
7676
- New `ltree` tool-filtering group for hierarchical tree operations
77+
- **9 pgcrypto tools** — Cryptographic functions support
78+
- `pg_pgcrypto_create_extension` — Enable pgcrypto
79+
- `pg_pgcrypto_hash` — Hash data with digest() (SHA-256, MD5, etc.)
80+
- `pg_pgcrypto_hmac` — HMAC authentication
81+
- `pg_pgcrypto_encrypt` — Symmetric encryption with pgp_sym_encrypt()
82+
- `pg_pgcrypto_decrypt` — Symmetric decryption with pgp_sym_decrypt()
83+
- `pg_pgcrypto_gen_random_uuid` — Generate cryptographically secure UUID v4
84+
- `pg_pgcrypto_gen_random_bytes` — Generate random bytes for salts/tokens
85+
- `pg_pgcrypto_gen_salt` — Generate salt for password hashing
86+
- `pg_pgcrypto_crypt` — Hash passwords with crypt()
87+
- New `pgcrypto` tool-filtering group for cryptographic operations
7788

7889
### Changed
7990
- Restructured resources into modular files for maintainability
8091
- Resource count from 6 to 14
8192
- Prompt count from 7 to 13
8293
- Restructured prompts into modular files for maintainability
83-
- Tool count from 146 to 185 (added pg_cron, pg_partman, pg_stat_kcache, citext, and ltree tools)
94+
- Tool count from 146 to 194 (added pg_cron, pg_partman, pg_stat_kcache, citext, ltree, and pgcrypto tools)
8495

8596
### Planned
8697
- Verify prompts and resources from old Python server are ported

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44

55
*Last updated December 14, 2025 - Initial Implementation Complete*
66

7-
*Enterprise-grade PostgreSQL MCP Server with OAuth 2.0 authentication, connection pooling, tool filtering, plus support for citext, ltree, pg_cron, pg_stat_kcache, pgvector, PostGIS, and advanced PostgreSQL features - TypeScript Edition*
7+
*Enterprise-grade PostgreSQL MCP Server with OAuth 2.0 authentication, connection pooling, tool filtering, plus support for citext, ltree, pgcrypto, pg_cron, pg_stat_kcache, pgvector, PostGIS, and advanced PostgreSQL features - TypeScript Edition*
88

9-
> **✅ Initial Implementation Complete** - 185 tools, 14 resources, and 13 prompts. Thorough testing before release in progress.
9+
> **✅ Initial Implementation Complete** - 194 tools, 14 resources, and 13 prompts. Thorough testing before release in progress.
1010
1111
[![GitHub](https://img.shields.io/badge/GitHub-neverinfamous/postgres--mcp-blue?logo=github)](https://github.com/neverinfamous/postgres-mcp)
1212
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
1313
[![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue.svg)](https://www.typescriptlang.org/)
1414
[![MCP](https://img.shields.io/badge/MCP-Compatible-green.svg)](https://modelcontextprotocol.io/)
1515
![Status](https://img.shields.io/badge/status-Testing-blue)
1616

17-
A **PostgreSQL MCP Server** that enables AI assistants (Claude, Cursor, etc.) to interact with PostgreSQL databases through the Model Context Protocol. Provides **185 specialized tools**, **14 resources**, and **13 AI-powered prompts**.
17+
A **PostgreSQL MCP Server** that enables AI assistants (Claude, Cursor, etc.) to interact with PostgreSQL databases through the Model Context Protocol. Provides **194 specialized tools**, **14 resources**, and **13 AI-powered prompts**.
1818

1919
---
2020

@@ -102,7 +102,7 @@ node dist/cli.js --transport stdio --postgres postgres://user:password@localhost
102102

103103
## 🛠️ Tool Categories
104104

105-
This server provides **185 tools** across 18 categories:
105+
This server provides **194 tools** across 19 categories:
106106

107107
| Category | Tools | Description |
108108
|----------|-------|-------------|
@@ -124,13 +124,14 @@ This server provides **185 tools** across 18 categories:
124124
| Kcache | 7 | pg_stat_kcache extension - OS-level CPU/memory/I/O stats per query |
125125
| Citext | 6 | citext extension - case-insensitive text for emails, usernames |
126126
| Ltree | 8 | ltree extension - hierarchical tree labels for taxonomies, org charts |
127+
| Pgcrypto | 9 | pgcrypto extension - hashing, encryption, password hashing, random UUIDs |
127128

128129
---
129130

130131
## 🎛️ Tool Filtering
131132

132133
> [!IMPORTANT]
133-
> **AI-enabled IDEs have tool limits.** With 177 tools, you **MUST** use tool filtering to stay within limits.
134+
> **AI-enabled IDEs have tool limits.** With 194 tools, you **MUST** use tool filtering to stay within limits.
134135
135136
### Tool Groups
136137

@@ -154,6 +155,7 @@ This server provides **185 tools** across 18 categories:
154155
| `kcache` | 7 | pg_stat_kcache OS-level stats |
155156
| `citext` | 6 | citext case-insensitive text |
156157
| `ltree` | 8 | ltree hierarchical tree labels |
158+
| `pgcrypto` | 9 | pgcrypto hashing, encryption, UUIDs |
157159

158160
### Filter Presets
159161

@@ -169,7 +171,7 @@ This server provides **185 tools** across 18 categories:
169171

170172
**DBA (~75 tools):**
171173
```json
172-
"--tool-filter", "-vector,-postgis,-cron,-partman,-kcache,-citext,-ltree"
174+
"--tool-filter", "-vector,-postgis,-cron,-partman,-kcache,-citext,-ltree,-pgcrypto"
173175
```
174176

175177
### Custom Filtering Syntax
@@ -241,6 +243,7 @@ This server provides **14 resources** for structured data access:
241243
| `pg_stat_kcache` | OS-level CPU/memory/I/O stats | 7 kcache tools |
242244
| `citext` | Case-insensitive text | 6 citext tools |
243245
| `ltree` | Hierarchical tree labels | 8 ltree tools |
246+
| `pgcrypto` | Hashing, encryption, UUIDs | 9 pgcrypto tools |
244247

245248
> Extension tools gracefully handle cases where extensions are not installed.
246249

src/adapters/postgresql/PostgresAdapter.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import { getPartmanTools } from './tools/partman.js';
4444
import { getKcacheTools } from './tools/kcache.js';
4545
import { getCitextTools } from './tools/citext.js';
4646
import { getLtreeTools } from './tools/ltree.js';
47+
import { getPgcryptoTools } from './tools/pgcrypto.js';
4748
import { getPostgresResources } from './resources/index.js';
4849
import { getPostgresPrompts } from './prompts/index.js';
4950

@@ -545,7 +546,8 @@ export class PostgresAdapter extends DatabaseAdapter {
545546
'partman',
546547
'kcache',
547548
'citext',
548-
'ltree'
549+
'ltree',
550+
'pgcrypto'
549551
];
550552
}
551553

@@ -572,7 +574,8 @@ export class PostgresAdapter extends DatabaseAdapter {
572574
...getPartmanTools(this),
573575
...getKcacheTools(this),
574576
...getCitextTools(this),
575-
...getLtreeTools(this)
577+
...getLtreeTools(this),
578+
...getPgcryptoTools(this)
576579
];
577580
}
578581

0 commit comments

Comments
 (0)