PostGIS MCP Server
PostGIS MCP 서버
PostGIS MCP 서버
이 프로젝트는 Model Context Protocol(MCP)을 사용하여 PostGIS 데이터베이스 연결을 제공하는 서버 애플리케이션입니다.
🚀 기능
TypeScript로 개발됨
Model Context Protocol(MCP) 통합
PostGIS 데이터베이스 지원
개발 및 운영 환경을 위한 구성
핫 리로드(Hot-reload) 지원
Related MCP server: GeoServer MCP Server
📋 요구 사항
Node.js (v14 이상)
PostgreSQL (PostGIS 확장 포함)
npm 또는 yarn
🛠️ 설치
프로젝트 복제:
git clone https://github.com/receptopalak/postgis-mcp.git
cd postgis-mcp의존성 설치:
npm install.env파일 생성:
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_three기존의 단일 데이터베이스용 DB_HOST / DB_NAME / DB_USER / DB_PASSWORD 변수도 대체(fallback) 방식으로 지원됩니다.
선택 사항: 자연어 테이블 선택 기능을 향상시키려면
domain-aliases.json에서 테이블/도메인 별칭을 사용자 정의하세요.
🚀 사용법
개발 모드
npm run dev운영 모드
npm run build
npm start🔧 MCP 구성
MCP 서버에 대해 다음 예시 구성을 사용할 수 있습니다:
{
"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)하세요
기능 브랜치를 생성하세요 (
git checkout -b feature/amazing-feature)변경 사항을 커밋하세요 (
git commit -m 'feat: Add some amazing feature')브랜치에 푸시하세요 (
git push origin feature/amazing-feature)Pull Request를 여세요
📝 라이선스
이 프로젝트는 ISC 라이선스 하에 있습니다. 자세한 내용은 LICENSE 파일을 참조하세요.
📧 연락처
프로젝트 소유자 - @receptopalak
프로젝트 링크: https://github.com/receptopalak/postgis-mcp
PostGIS MCP 서버
이 프로젝트는 Model Context Protocol(MCP)을 사용하여 PostGIS 데이터베이스 연결을 제공하는 서버 애플리케이션입니다.
🚀 특징
TypeScript로 개발됨
Model Context Protocol(MCP) 통합
PostGIS 데이터베이스 지원
개발 및 운영 환경을 위한 구성
핫 리로드(Hot-reload) 지원
📋 요구 사항
Node.js (v14 이상)
PostgreSQL (PostGIS 확장 포함)
npm 또는 yarn
🛠️ 설치
프로젝트 복제:
git clone https://github.com/receptopalak/postgis-mcp.git
cd postgis-mcp의존성 설치:
npm install.env파일 생성:
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_three기존의 단일 데이터베이스용 DB_HOST / DB_NAME / DB_USER / DB_PASSWORD 변수도 대체(fallback) 방식으로 지원됩니다.
선택 사항: 자연어 테이블 선택 기능을 향상시키려면
domain-aliases.json파일을 사용자 정의하세요.
🚀 사용법
개발 모드
npm run dev운영 모드
npm run build
npm start🔧 MCP 구성
MCP 서버 구성에 대해 다음 예시 구성을 사용할 수 있습니다:
{
"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)하세요
새로운 기능 브랜치를 생성하세요 (
git checkout -b feature/amazing-feature)변경 사항을 커밋하세요 (
git commit -m 'feat: Add some amazing feature')브랜치에 푸시하세요 (
git push origin feature/amazing-feature)Pull Request를 생성하세요
📝 라이선스
이 프로젝트는 ISC 라이선스 하에 있습니다. 자세한 내용은 LICENSE 파일을 참조하세요.
📧 연락처
프로젝트 소유자 - @receptopalak
Available Tools
22 toolsanalyze-databaseC
Veritabanı şemasını analiz et ve tablo bilgilerini topla
Inputs: force_refresh.
calculate-distanceC
İki nokta arasındaki mesafeyi hesapla
Inputs: point1_lat (required), point1_lon (required), point2_lat (required), point2_lon (required), +1 more.
create-bufferC
Geometri etrafında buffer oluştur
Inputs: distance_meters (required), geometry_wkt (required).
create-linestringB
Koordinat dizisinden çizgi geometrisi oluştur
Inputs: coordinates (required), srid.
create-pointC
Koordinatlardan nokta geometrisi oluştur
Inputs: latitude (required), longitude (required), srid.
create-polygonC
Koordinat dizisinden poligon geometrisi oluştur
Inputs: exterior_ring (required), interior_rings, srid.
create-spatial-indexD
Mekansal indeks oluştur
Inputs: table_name (required), geometry_column.
extract-raster-valueC
Belirli koordinattaki raster değerini çıkar
Inputs: latitude (required), longitude (required), table_name (required), raster_column.
find-nearbyC
Belirli bir noktanın çevresindeki özellikleri bul
Inputs: distance_km (required), latitude (required), longitude (required), table_name (required), +1 more.
geometry-centroidC
Geometrinin merkez noktasını bul
Inputs: geometry_wkt (required).
geometry-convex-hullC
Geometrinin konveks zarfını hesapla
Inputs: geometry_wkt (required).
geometry-infoC
Geometri hakkında detaylı bilgi al (alan, uzunluk, boyut vs.)
Inputs: geometry_wkt (required).
geometry-intersectionC
İki geometrinin kesişimini bul
Inputs: geometry1_wkt (required), geometry2_wkt (required).
geometry-unionC
Birden fazla geometriyi birleştir
Inputs: geometries_wkt (required).
get-table-infoC
Belirli bir tablo hakkında detaylı bilgi al
Inputs: table_name (required).
raster-infoC
Raster verisinin bilgilerini al
Inputs: table_name (required), raster_column.
simplify-geometryC
Geometriyi basitleştir (Douglas-Peucker algoritması)
Inputs: geometry_wkt (required), tolerance (required), preserve_collapsed.
smart-queryC
Doğal dilde sorulan soruyu anla ve uygun veritabanı sorgusuna çevir
Inputs: question (required), language.
spatial-joinC
İki tablo arasında mekansal join işlemi yap
Inputs: join_type (required), table1 (required), table2 (required), geometry_column1, +2 more.
test-connectionB
PostGIS veritabanı bağlantısını test et
Inputs: no named parameters.
transform-coordinatesD
Koordinat sistemini dönüştür
Inputs: geometry_wkt (required), source_srid (required), target_srid (required).
validate-geometryC
Geometrinin geçerliliğini kontrol et
Inputs: geometry_wkt (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Every tool has a clearly distinct purpose targeting specific PostGIS operations like geometry creation, analysis, spatial queries, and database management. There is no overlap; for example, 'create-point' and 'create-puffer' serve different functions, and descriptions help differentiate even similar-sounding tools like 'geometry-info' and 'get-table-info'.
Tool names follow a consistent verb-noun pattern with hyphens throughout, such as 'create-point', 'calculate-distance', and 'validate-geometry'. This predictable naming scheme makes it easy for agents to understand and select tools without confusion or mixed conventions.
With 22 tools, the count is slightly high but reasonable for a comprehensive PostGIS server covering geometry operations, spatial analysis, raster data, and database utilities. It might feel heavy, but each tool appears to earn its place in the domain without being excessive.
The tool set provides complete coverage for PostGIS operations, including CRUD-like functions (e.g., create, analyze, validate), spatial calculations (e.g., distance, intersection), database management (e.g., test-connection, get-table-info), and advanced features like natural language querying. No obvious gaps are present for the domain.
Maintenance
Related MCP Connectors
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
Hosted PostgreSQL MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Geospatial AI MCP server — satellite imagery, embeddings, weather, GNS governance
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables powerful PostgreSQL database management capabilities including analysis, schema management, data migration, and monitoring through natural language interactions.1810,856 npm204AGPL 3.0
- AlicenseAqualityDmaintenanceA Model Context Protocol server that connects Large Language Models to the GeoServer REST API, enabling AI assistants to query and manipulate geospatial data through natural language.997MIT
- 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.-
- FlicenseNot gradedqualityDmaintenanceAn MCP server that transforms natural language questions into SQL, executes queries on PostgreSQL, and returns human-friendly responses, with Redis memory for context.1-