Skip to main content
Glama
receptopalak

PostGIS MCP Server

by receptopalak

PostGIS MCP Server

English | Türkçe

PostGIS MCP Server

Этот проект представляет собой серверное приложение, обеспечивающее подключение к базе данных PostGIS с использованием протокола Model Context Protocol (MCP).

🚀 Функции

  • Разработано на TypeScript

  • Интеграция с Model Context Protocol (MCP)

  • Поддержка базы данных PostGIS

  • Конфигурация для сред разработки и продакшена

  • Поддержка горячей перезагрузки (hot-reload)

Related MCP server: GeoServer MCP Server

📋 Требования

  • Node.js (v14 или выше)

  • PostgreSQL (с расширением PostGIS)

  • npm или yarn

🛠️ Установка

  1. Клонируйте проект:

git clone https://github.com/receptopalak/postgis-mcp.git
cd postgis-mcp
  1. Установите зависимости:

npm install
  1. Создайте файл .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 по-прежнему поддерживаются в качестве резервного варианта.

  1. Опционально: настройте псевдонимы таблиц/доменов в 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

🤝 Участие в разработке

  1. Сделайте форк этого репозитория

  2. Создайте ветку для вашей функции (git checkout -b feature/amazing-feature)

  3. Зафиксируйте изменения (git commit -m 'feat: Add some amazing feature')

  4. Отправьте изменения в ветку (git push origin feature/amazing-feature)

  5. Откройте Pull Request

📝 Лицензия

Этот проект лицензирован по лицензии ISC. Дополнительную информацию см. в файле LICENSE.

📧 Контакты

Владелец проекта - @receptopalak

Ссылка на проект: https://github.com/receptopalak/postgis-mcp


PostGIS MCP Server

Bu proje, Model Context Protocol (MCP) kullanarak PostGIS veritabanı bağlantısını sağlayan bir sunucu uygulamasıdır.

🚀 Özellikler

  • 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

📋 Gereksinimler

  • Node.js (v14 veya üzeri)

  • PostgreSQL (PostGIS eklentisi ile)

  • npm veya yarn

🛠️ Kurulum

  1. Projeyi klonlayın:

git clone https://github.com/receptopalak/postgis-mcp.git
cd postgis-mcp
  1. Bağımlılıkları yükleyin:

npm install
  1. .env dosyası 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_three

Eski tek veritabanlı DB_HOST / DB_NAME / DB_USER / DB_PASSWORD değişkenleri de fallback olarak desteklenir.

  1. Opsiyonel: doğal dilde tablo seçimini iyileştirmek için domain-aliases.json dosyasını özelleştirin.

🚀 Kullanım

Geliştirme Modu

npm run dev

Üretim Modu

npm run build
npm start

🔧 MCP Yapılandırması

MCP 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"
      }
    }
  }
}

📦 Bağımlılıklar

  • @modelcontextprotocol/sdk: ^1.12.1

  • dotenv: ^16.5.0

  • pg: ^8.16.0

  • zod: ^3.25.64

🤝 Katkıda Bulunma

  1. Bu depoyu fork edin

  2. Yeni bir özellik dalı oluşturun (git checkout -b feature/amazing-feature)

  3. Değişikliklerinizi commit edin (git commit -m 'feat: Add some amazing feature')

  4. Dalınıza push edin (git push origin feature/amazing-feature)

  5. Bir Pull Request oluşturun

📝 Lisans

Bu proje ISC lisansı altında lisanslanmıştır. Daha fazla bilgi için LICENSE dosyasına bakın.

📧 İletişim

Proje Sahibi - @receptopalak

Proje Linki: https://github.com/receptopalak/postgis-mcp

Install Server
F
license - not found
B
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    B
    quality
    B
    maintenance
    A Model Context Protocol server that enables powerful PostgreSQL database management capabilities including analysis, schema management, data migration, and monitoring through natural language interactions.
    18
    2,467
    198
    AGPL 3.0
  • A
    license
    A
    quality
    C
    maintenance
    A 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.
    9
    87
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    A 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.

View all related MCP servers

Related MCP Connectors

  • GibsonAI MCP server: manage your databases with natural language

  • MCP server for managing Prisma Postgres.

  • MCP server for interacting with the Supabase platform

View all MCP Connectors

Latest Blog Posts

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/receptopalak/postgis-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server