Pagila MCP Server

Pagila MCP Server

Enables interaction with the Pagila sample PostgreSQL database through natural language queries and SQL execution, supporting safe SELECT operations and text-to-SQL conversion.

Category
Visit Server

README

pagila-mcp

Small MCP server wrapper for the Pagila sample database. This repository provides:

  • mcp_pagila_server.py - MCP server that accepts JSON requests on stdin and returns JSON responses on stdout.
  • db.py - database helpers to run queries against Postgres.
  • mcp_inspector.py - a small interactive inspector that starts the server subprocess and sends test requests.

Quickstart

  1. Copy the example env and set your DB credentials:
cp config.env.example config.env
# edit config.env and set PG_HOST, PG_USER, PG_PASSWORD etc.
  1. Create a virtualenv and install dependencies:
python -m venv .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install -r requirements.txt
  1. Run the inspector (it will start the server for you):
.venv/bin/python mcp_inspector.py
# or one-shot examples
.venv/bin/python mcp_inspector.py -c "list_films 5"
.venv/bin/python mcp_inspector.py -c "text2sql show me film titles from 2010 limit 3"

Usage & safety

  • The server exposes run_pagila_query which accepts only SELECT statements. text_to_sql generates SELECT SQL from natural language (local heuristic by default).
  • Do not commit config.env or any secrets. Use environment variables for production.

CI & code style

  • This repo includes a GitHub Actions CI workflow at .github/workflows/ci.yml to run formatting and tests.
  • Use pre-commit (configured in .pre-commit-config.yaml) to run black/isort/flake8 locally.

License MIT

Pagila MCP server

Lightweight MCP server around the Pagila DB.

Quick start:

  1. Copy .env.example -> config.env and fill DB creds.
  2. Create a virtualenv and install dependencies:
    python -m venv .venv
    .venv/bin/pip install -r requirements.txt
    
  3. Run the server:
    .venv/bin/python mcp_pagila_server.py
    
  4. Use the inspector: .venv/bin/python mcp_inspector.py

See .vscode/launch.json and .vscode/mcp.json for examples.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured