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.
Interact with the Stellar blockchain to manage wallets, list tokens, query balances, and transfer funds.
Query the Materials Project database using the mp_api client. Requires an MP_API_KEY environment variable.
Open source MCP server specializing in easy, fast, and secure tools for Databases.
Provides real-time financial data using the Tushare API.
Embeddings, vector search, document storage, and full-text search with the open-source AI application database
Manage NocoDB server, support read and write databases
Provides AI assistants with a secure and structured way to explore and analyze data in GreptimeDB.
An MCP server for the Chroma embedding database, providing persistent, searchable working memory for AI-assisted development with features like automated context recall and codebase indexing.
A read-only MCP server for querying live eBay data. Requires a separately licensed CData JDBC Driver for eBay.
Access the OpenGenes database for aging and longevity research, with automatic updates from Hugging Face Hub.