This project is a server application that provides PostGIS database connection using Model Context Protocol (MCP).
- Developed with TypeScript
- Model Context Protocol (MCP) integration
- PostGIS database support
- Configuration for development and production environments
- Hot-reload support
- Node.js (v14 or higher)
- PostgreSQL (with PostGIS extension)
- npm or yarn
- Clone the project:
git clone https://github.com/receptopalak/postgis-mcp.git
cd postgis-mcp- Install dependencies:
npm install- Create
.envfile:
NODE_ENV=development
DB_URL_1=postgres://user:password@host:5432/database_one
DB_URL_2=postgres://user:password@host:5432/database_two
DB_URL_3=postgres://user:password@host:5432/database_threeLegacy single-database DB_HOST / DB_NAME / DB_USER / DB_PASSWORD variables are still supported as a fallback.
- Optional: customize table/domain aliases in
domain-aliases.jsonto improve natural-language table selection.
npm run devnpm run build
npm startYou can use the following example configuration for MCP server:
{
"mcpServers": {
"postgis": {
"command": "npx",
"args": ["tsx", "server.ts"],
"env": {
"NODE_ENV": "development",
"DB_URL_1": "postgres://user:pass@host:5432/db_one",
"DB_URL_2": "postgres://user:pass@host:5432/db_two"
}
}
}
}- @modelcontextprotocol/sdk: ^1.12.1
- dotenv: ^16.5.0
- pg: ^8.16.0
- zod: ^3.25.64
- Fork this repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the ISC License. See the LICENSE file for more information.
Project Owner - @receptopalak
Project Link: https://github.com/receptopalak/postgis-mcp
Bu proje, Model Context Protocol (MCP) kullanarak PostGIS veritabanı bağlantısını sağlayan bir sunucu uygulamasıdır.
- TypeScript ile geliştirilmiş
- Model Context Protocol (MCP) entegrasyonu
- PostGIS veritabanı desteği
- Geliştirme ve üretim ortamları için yapılandırma
- Hot-reload desteği
- Node.js (v14 veya üzeri)
- PostgreSQL (PostGIS eklentisi ile)
- npm veya yarn
- Projeyi klonlayın:
git clone https://github.com/receptopalak/postgis-mcp.git
cd postgis-mcp- Bağımlılıkları yükleyin:
npm install.envdosyası oluşturun:
NODE_ENV=development
DB_URL_1=postgres://user:password@host:5432/database_one
DB_URL_2=postgres://user:password@host:5432/database_two
DB_URL_3=postgres://user:password@host:5432/database_threeEski tek veritabanlı DB_HOST / DB_NAME / DB_USER / DB_PASSWORD değişkenleri de fallback olarak desteklenir.
- Opsiyonel: doğal dilde tablo seçimini iyileştirmek için
domain-aliases.jsondosyasını özelleştirin.
npm run devnpm run build
npm startMCP sunucu yapılandırması için aşağıdaki örnek yapılandırmayı kullanabilirsiniz:
{
"mcpServers": {
"postgis": {
"command": "npx",
"args": ["tsx", "server.ts"],
"env": {
"NODE_ENV": "development",
"DB_URL_1": "postgres://user:pass@host:5432/db_one",
"DB_URL_2": "postgres://user:pass@host:5432/db_two"
}
}
}
}- @modelcontextprotocol/sdk: ^1.12.1
- dotenv: ^16.5.0
- pg: ^8.16.0
- zod: ^3.25.64
- Bu depoyu fork edin
- Yeni bir özellik dalı oluşturun (
git checkout -b feature/amazing-feature) - Değişikliklerinizi commit edin (
git commit -m 'feat: Add some amazing feature') - Dalınıza push edin (
git push origin feature/amazing-feature) - Bir Pull Request oluşturun
Bu proje ISC lisansı altında lisanslanmıştır. Daha fazla bilgi için LICENSE dosyasına bakın.
Proje Sahibi - @receptopalak
Proje Linki: https://github.com/receptopalak/postgis-mcp