PostGIS MCP 服务器是一个使用模型上下文协议(MCP)提供 PostGIS 数据库连接的服务器应用程序,能为开发和生产环境提供稳定的数据库连接服务。
本项目是一个使用模型上下文协议(MCP)提供 PostGIS 数据库连接的服务器应用程序。下面将为你介绍其快速开始的方法。
git clone https://github.com/receptopalak/postgis-mcp.git
cd postgis-mcp
npm install
.env 文件:NODE_ENV=development
DB_PORT=5432
DB_HOST=localhost
DB_NAME=your_database_name
DB_USER=your_username
DB_PASSWORD=your_password
npm run dev
npm run build
npm start
你可以使用以下示例配置来配置 MCP 服务器:
{
"mcpServers": {
"postgis": {
"command": "npx",
"args": ["tsx", "server.ts"],
"env": {
"NODE_ENV": "development",
"DB_PORT": "5432",
"DB_HOST": "host",
"DB_NAME": "dbname",
"DB_USER": "user",
"DB_PASSWORD": "pass"
}
}
}
}
git checkout -b feature/amazing-feature)。git commit -m 'feat: Add some amazing feature')。git push origin feature/amazing-feature)。本项目采用 ISC 许可证。有关更多信息,请参阅 LICENSE 文件。
项目所有者 - @receptopalak 项目链接: https://github.com/receptopalak/postgis-mcp