Berlin Services MCP Server
Enables comprehensive search and browsing of Berlin city services. Also supports PDF form discovery, analysis, and filling with resilient caching.
README
Berlin Services MCP Server - Enhanced
A production-grade Model Context Protocol (MCP) server for Berlin city services (Dienstleistungen). It features resilient caching, advanced search, PDF form discovery, and filling capabilities.
Features
- Comprehensive Tools: Search, browse, and get detailed information on Berlin services.
- Form Management: Discover, analyze, and fill PDF forms for various services.
- Resilient Caching: Optimized for performance with intelligent fallback for offline use.
- Remote Sync: Supports both local and remote (Cloud) deployments.
Technical Architecture
1. Data Sourcing
The server pulls data from the official Berlin City Services API
- Live Fetching: Tools like
search_servicesandget_service_detailshit the live API. - Resilient Caching: Implements a dual-layer cache (Memory + Disk) to ensure high performance and offline reliability.
- Smart Fallback: If the API is down and no cache exists, it falls back to a minimal set of core services to remain functional.
2. Advanced PDF Processing
Powered by PyMuPDF (fitz), the server provides sophisticated document handling:
- Field Extraction: Automatically detects fillable fields in PDF forms hosted on the city's servers.
- Intelligent Filling: Maps user data to PDF fields using smart matching and common translation fragments.
- Loop Protection: Includes a
LoopProtectorto prevent redundant tool executions and LLM loops. - Visual Previews: Can render specific pages of a PDF to JPEG for a quick in-chat snapshot (useful for verification without leaving the chat).
3. Deployment Modes
- Local Mode: Optimized for use with Claude Desktop. In this mode,
open_file_locallycan be used to open filled PDFs directly with your system's default viewer. - Remote/Cloud Mode: Designed for deployment on platforms like Fly.io or Railway. Replaces local file opening with secure synchronization and in-chat previews.
Prerequisites
- Python 3.11 or higher
uv(recommended) orpip
Local Setup
Using uv (Recommended)
- Install dependencies and sync the environment:
uv sync - Run the server as a module:
Note: If you've installed the package viaexport PYTHONPATH=$PYTHONPATH:$(pwd)/src && uv run python -m berlin_mcp.mainuv sync, you can also just run:uv run berlin-mcp
Using pip
- Install dependencies:
pip install -r requirements.txt - Run the server:
export PYTHONPATH=$PYTHONPATH:$(pwd)/src && python -m berlin_mcp.main
Claude Desktop Configuration
Add the following to your Claude Desktop configuration file. Replace /Users/mananshah/Desktop/Berlin-Services-MCP-Server with the actual absolute path to the folder.
macOS
File location: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"berlin-services": {
"command": "uv",
"args": [
"run",
"--directory",
"/Users/YourUser/Desktop/Berlin-Services-MCP-Server",
"python",
"-m",
"berlin_mcp.main"
],
"env": {
"PYTHONPATH": "src"
}
}
}
}
Windows
File location: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"berlin-services": {
"command": "uv",
"args": [
"run",
"--directory",
"C:\\Users\\YourUser\\Desktop\\Berlin-Services-MCP-Server",
"python",
"-m",
"berlin_mcp.main"
],
"env": {
"PYTHONPATH": "src"
}
}
}
}
Tools and Resources
The server exposes the following tools to help you navigate and manage Berlin city services:
| Tool | Description |
|---|---|
search_services |
Advanced search for Berlin services with paging and filters. |
get_service_details |
Get complete details about a service including forms and prerequisites. |
get_service_forms |
Get all forms associated with a service with detailed metadata. |
search_forms |
Search for forms across all services. |
get_forms_by_type |
Get all forms of a specific type across services. |
get_service_prerequisites |
Get all prerequisites and requirements for a service. |
get_service_checklist |
Get a comprehensive checklist for completing a service application. |
analyze_form_for_filling |
Download a PDF form and extract its fillable fields. |
perform_form_filling |
Fill a PDF form and save locally. |
download_filled_form |
Retrieve a filled PDF form. |
get_form_visual_preview |
Render a page of a filled PDF as an image. |
open_file_locally |
Open a file on the user's local system (Local setup only). |
delete_filled_form |
Manually delete a filled form from the server. |
browse_services_by_category |
Browse services by category. |
find_online_services |
Find all services available online. |
get_service_locations |
Get all locations for a service. |
get_api_status |
Get API and cache status diagnostics. |
clear_cache |
Clear the service cache and force refresh. |
Security Note
PDF forms filled on remote servers should be downloaded and then deleted using the delete_filled_form tool to ensure data privacy.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。