MCP PostgreSQL Server
MCP PostgreSQL 服务器
-
通过 MCP 工具提供 PostgreSQL 数据库操作的模型上下文协议 (MCP) 服务器。
特征
User 和 Post 实体的 CRUD 操作
使用 Prisma 进行类型安全的数据库操作
MCP兼容工具接口
使用 TypeScript 构建以确保类型安全
Related MCP server: pg-mcp
安装
克隆存储库
安装依赖项:
git clone https://github.com/a21071/mcp-postgres.git
cd mcp-postgres
npm install设置 PostgreSQL 数据库:
docker-compose up -d运行数据库迁移:
npx prisma migrate dev构建项目:
npm run build用法
运行服务器:
npm start可用的 MCP 工具
getData :从 PostgreSQL 检索用户数据
{ "tableName": "user" }addUserData :将新用户添加到数据库
{ "email": "user@example.com", "name": "John Doe", "age": 30 }deleteUserData :通过 ID、电子邮件或姓名删除用户
{ "id": "clxyz...", "email": "user@example.com", "name": "John Doe" }updateUserData :更新用户信息
{ "id": "clxyz...", "email": "new@example.com", "name": "New Name" }
数据库架构
服务器使用以下 Prisma 模式:
model User {
id String @id @default(cuid())
email String @unique
name String?
age Int?
createdAt DateTime @default(now())
posts Post[]
}
发展
观看模式:
npm run watch依赖项
@modelcontextprotocol/sdk - MCP 服务器 SDK
Prisma - 类型安全的数据库客户端
TypeScript - 类型检查
执照
麻省理工学院
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server implementation that provides a simple interface to interact with PostgreSQL databases, enabling SQL queries, database operations, and schema management through MCP.
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server for PostgreSQL that enables database operations like querying, schema inspection, performance analysis, and administration through a JSON-RPC 2.0 interface.MIT
- FlicenseNot gradedqualityDmaintenanceA standardized Model Context Protocol server for interacting with PostgreSQL databases, enabling full CRUD operations, schema management, and database introspection.1
- FlicenseNot gradedqualityBmaintenanceMCP server for managing users in PostgreSQL, enabling CRUD operations and search via natural language commands.
Related MCP Connectors
MCP server for managing Prisma Postgres.
MCP server for interacting with the Supabase platform
A basic MCP server to operate on the Postman API.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/a21071/mcp-postgres'
If you have feedback or need assistance with the MCP directory API, please join our Discord server