Integrations
Berghain Events API & MCP Implementation
Project structure
Copy
Requirements
- Python 3.10+
- uv (for dependency management and virtual environment)
- AWS Account (for DynamoDB and App Runner)
- Firecrawl API Key
Facility
- Clone this repository:Copy
- Create and activate a virtual environment with
uv
:Copy - Install dependencies with
uv
:Copy
Detailed Process
1. Data Extraction with Firecrawl
- Configure the Firecrawl MCP in Cursor: Make sure you have your Firecrawl API Key. In the Cursor MCP settings, add:Copy
- Run the extraction: Use an agent in Cursor (or a similar tool) to call the Firecrawl MCP and ask it to extract events from
https://www.berghain.berlin/en/program/
. - Save the data: The extracted data should be saved as JSON files in the
events/
directory. For example,events/berghain_events_YYYY-MM-DD.json
.
2. Loading Data into DynamoDB
- Create the table in DynamoDB: The
scripts/create_table.py
script takes care of this. Run it (adjust the parameters if necessary):Copy - Load data into the table: The
scripts/load_data.py
script loads events from JSON files.Make sure thatCopyapp/core/config.py
(imported byload_data.py
) has the necessary configurations if you don't pass them as arguments.
3. API with FastAPI and MCP Server
- The API logic resides in the
app/
directory, with the endpoints defined (e.g., inapp/api/endpoints/events.py
). - The
app/main.py
file is configured to launch the FastAPI application and the FastMCP server, exposing the API endpoints as tools for AI models. Review thecustom_maps
inapp/main.py
to see how GET routes are mapped toRouteType.TOOL
.
Deployment on AWS
a. Dockerfile
Make sure your Dockerfile
is configured correctly to use uv
and run app/main.py
:
b. Build and Upload Image to Amazon ECR (Elastic Container Registry)
- Authenticate Docker with ECR:Copy
- Create a repository in ECR (if it doesn't exist):Copy
- Build your Docker image:Copy
- Tag your image:Copy
- Upload the image to ECR:ReplaceCopy
tu-region-aws
andtu-aws-account-id
with your values.
c. Deploy Infrastructure with Terraform
- Prepare your Terraform files: Make sure you have your Terraform configuration files (e.g.,
main.tf
,variables.tf
,outputs.tf
) in a directory (e.g.,terraform/
). These files should define the necessary AWS resources, such as the AWS App Runner service that will use the ECR image, and the DynamoDB table (if it is also managed by Terraform). Your App Runner configuration in Terraform should reference the uploaded ECR image. - Navigate to the Terraform directory:Copy
- Initialize Terraform:Copy
- Apply the Terraform configuration:Review the plan and confirm the application. Terraform will provision the resources.Copy
- Get the service URL: Once applied, Terraform should display the defined outputs, including the App Runner service URL. Make a note of this URL (e.g.,
https://<id-servicio>.<region>.awsapprunner.com
).
Test the Deployed Solution
a. Adjust Local Test Script ( mcp_local.py
)
Set the mcp_local.py
file to the root of your project
Important: Update the mcp_server_url
variable in mcp_local.py
with the URL you got from the Terraform output.
b. Run Test
From the root of your project (or wherever you saved mcp_local.py
):
Copy
This will run the PydanticAI agent, which will attempt to connect to your deployed MCP and perform the query.
License
MIT
This server cannot be installed
A server that allows AI agents to query and retrieve information about upcoming events at Berghain nightclub through a DynamoDB-backed FastAPI service.
Related MCP Servers
- AsecurityFlicenseAqualityThis server integrates with the Ticketmaster API to provide AI agents with real-time concert and event data, enabling dynamic fetching and formatting for ease of interpretation.Last updated -1Python
- AsecurityAlicenseAqualityAn unofficial server that allows AI assistants to access Fathom Analytics data, enabling users to retrieve account information, site statistics, events, aggregated reports, and real-time visitor tracking.Last updated -581TypeScriptMIT License
- AsecurityAlicenseAqualityThis server provides tools for AI assistants to interact with the Eventbrite API, allowing users to search for events, get event details, retrieve venue information, and list event categories.Last updated -421JavaScriptMIT License
- -securityAlicense-qualityA Server-Sent Events implementation using FastAPI framework that integrates Model Context Protocol (MCP), allowing AI models to access external tools and data sources like weather information.Last updated -9PythonMIT License