A comprehensive movie database server supporting advanced search, CRUD operations, and image management via a PostgreSQL database.
A Model Context Protocol (MCP) server that provides a comprehensive movie database with advanced search, CRUD operations, and image support. Built with Go and PostgreSQL, this server enables AI assistants to manage and query movie information through a standardized protocol.
git clone https://github.com/francknouama/movies-mcp-server.git
cd movies-mcp-server
cp .env.example .env
make docker-up
make db-setup
make db-migrate
make db-seed
make build
./build/movies-server
The server implements the following MCP tools:
get_movie
- Retrieve a movie by IDadd_movie
- Add a new movie with optional posterupdate_movie
- Update movie details including posterdelete_movie
- Remove a movie from the databasesearch_movies
- Advanced search with multiple criterialist_top_movies
- Get top-rated movies with filteringAccess movie data through these resource URIs:
movies://database/all
- All movies in JSON formatmovies://database/stats
- Database statisticsmovies://database/genres
- List of all genresmovies://database/directors
- List of all directorsmovies://posters/{movie-id}
- Individual movie postermovies://posters/collection
- Gallery of all posters{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": {
"name": "example-client",
"version": "1.0.0"
}
}
}
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "add_movie",
"arguments": {
"title": "The Matrix",
"director": "The Wachowskis",
"release_year": 1999,
"genre": "Sci-Fi",
"rating": 8.7,
"description": "A computer hacker learns about the true nature of reality",
"poster_url": "https://example.com/matrix-poster.jpg"
}
}
}
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "search_movies",
"arguments": {
"query": "sci-fi",
"search_type": "genre"
}
}
}
The server uses environment variables for configuration. See .env.example
for all available options:
# Database configuration
DATABASE_URL=postgres://movies_user:movies_password@localhost:5432/movies_db?sslmode=disable
# Server configuration
LOG_LEVEL=info
SERVER_TIMEOUT=30s
MAX_CONNECTIONS=100
# Image handling
MAX_IMAGE_SIZE_MB=10
ALLOWED_IMAGE_TYPES=image/jpeg,image/png,image/webp
# Run all tests
make test
# Run with coverage
make test-coverage
# Run integration tests
DATABASE_URL=... make test-integration
# Apply migrations
make db-migrate
# Rollback one migration
make db-migrate-down
# Reset database
make db-migrate-reset
# Build for current platform
make build
# Build for multiple platforms
make build-all
# Build Docker image
make docker-build
The server includes Prometheus metrics and health endpoints:
/health
- Health check endpoint/metrics
- Prometheus metricsA Grafana dashboard is included in monitoring/grafana-dashboard.json
.
Interactive API testing is available through the included Bruno collection in bruno-collection/
. This provides pre-configured requests for all MCP operations.
The server follows clean architecture principles:
├── cmd/ # Application entrypoints
├── internal/ # Private application code
│ ├── config/ # Configuration management
│ ├── database/ # Database layer
│ ├── models/ # Domain models
│ └── server/ # MCP server implementation
├── pkg/ # Public packages
│ ├── errors/ # Error handling
│ ├── health/ # Health checks
│ ├── logging/ # Structured logging
│ └── metrics/ # Prometheus metrics
├── migrations/ # Database migrations
└── scripts/ # Utility scripts
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.
An MCP server for NocoDB, the open-source Airtable alternative. It allows interaction with your NocoDB instance via API.
Knowledge graph-based persistent memory system
MCP server for libSQL databases with comprehensive security and management tools. Supports file, local HTTP, and remote Turso databases with connection pooling, transaction support, and 6 specialized database tools.
A read-only MCP server for querying live data from Outreach.io using the CData JDBC Driver.
Access the OpenGenes database for aging and longevity research, with automatic updates from Hugging Face Hub.
Access and manage MariaDB or MySQL databases using an MCP server.
A read-only MCP server for querying live data from Square using the CData JDBC Driver.
Provides access to Jewish texts from the Sefaria library.
Manage and query databases, tenants, users, auth using LLMs
Interact with the Neon serverless Postgres platform