Repository navigation
Expand file tree
/
Copy pathpostgres.yaml
More file actions
72 lines (72 loc) · 2.27 KB
/
Copy pathpostgres.yaml
File metadata and controls
72 lines (72 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
id: postgres
name: PostgreSQL MCP Server
description: >
Provides read-only access to PostgreSQL databases through the Model Context Protocol.
Enables AI agents to inspect database schemas, run SELECT queries, and explore table
structures. Designed for safe database exploration with read-only transaction isolation
to prevent accidental data modification. Originally part of the reference servers,
now archived and available in servers-archived.
author:
name: Anthropic
github: modelcontextprotocol
repository: https://github.com/modelcontextprotocol/servers-archived
transport:
- stdio
category: Database
tags:
- postgresql
- database
- sql
- data-exploration
- schema-inspection
created_at: "2024-11-25T00:00:00.000Z"
updated_at: "2026-01-27T00:00:00.000Z"
tools:
- name: query
description: Execute a read-only SQL query against the connected PostgreSQL database and return results.
input_schema:
type: object
properties:
sql:
type: string
description: SQL query to execute (SELECT statements only)
required:
- sql
- name: list_tables
description: List all tables in the connected PostgreSQL database with their schemas.
input_schema:
type: object
properties:
schema:
type: string
description: Schema name to filter tables (defaults to public)
- name: describe_table
description: Get the column definitions, types, and constraints for a specific table.
input_schema:
type: object
properties:
table_name:
type: string
description: Name of the table to describe
schema:
type: string
description: Schema name (defaults to public)
required:
- table_name
resources:
- uri_template: "postgres://{host}/{database}/schema"
description: Access to the database schema information including tables, columns, and relationships.
install:
npm: "@modelcontextprotocol/server-postgres"
command: npx
args:
- "-y"
- "@modelcontextprotocol/server-postgres"
- "postgresql://localhost/mydb"
env_vars:
- name: POSTGRES_CONNECTION_STRING
description: PostgreSQL connection string (e.g., postgresql://user:pass@host:5432/dbname)
required: true
license: MIT
version: "0.6.2"
stars: 265