Skip to main content
Glama

Dienstreiseantrag Model Context Protocol (DRA-MCP)

A model context protocol server for filling out business trip application forms.

Note that DRA-MCP is in early stage of development. It may later be used in production and for teaching. Hence, suggestions and improvements are welcome, as long as we don't over-engineer it.

Setup

It is recommended to install uv first.

git clone https://github.com/scads/dra-mcp
cd dra-mcp
uv sync

Copy .env.example to .env and put in your form and reusable applicant details:

DRA_FORM=saxony
SERVICE_UNIT=
APPLICANT_NAME=
DEPARTMENT=
OFFICE_PHONE=
HOME_ADDRESS=
ADDITIONAL_HOME_ADDRESS=
TEMPORARY_STAY_ADDRESS=
IBAN=
BIC=
BANK_NAME=
PERSONNEL_NUMBER=
TRAVEL_START_FROM=
TRAVEL_END_AT=
HOME_CITY=
OUTPUT_DIR=

This file is ignored by Git because it may contain personal and banking information. Filled PDFs are written to output/ (or OUTPUT_DIR), which is ignored as well.

TRAVEL_START_FROM / TRAVEL_END_AT say where your trips usually start and end (home-a, home-b, office or temporary-address), HOME_CITY is the city travel times are estimated from (default: Leipzig).

Related MCP server: Trip Planner MCP Server

Supported forms

DRA_FORM

Form

Template

saxony (default)

Dienstreiseantrag Anlage 1 (VwV-SächsRKG)

00_application-form.pdf

tud

TU Dresden RK-02, Beantragung einer Dienstreise

00_application-form-dresden.pdf

Only the applicant's sections are filled. Notes for the TU Dresden form:

  • Section 6 has one row per place where the trip starts or ends. Set TRAVEL_START_FROM / TRAVEL_END_AT in .env; otherwise the AI agent asks for them.

  • The purpose (Reisezweck) is a single line of at most 70 characters; details go into the explanations.

  • Trips to other EU countries need an A1 certificate (A1-Bescheinigung). Complete section 18 before signing electronically; the form is either signed fully digitally or printed and signed by hand.

If you use this tool via an MCP-compatible AI-agent such as Jan.AI (open source), it is recommended to use privacy-preserving, local-only Large Language Models. If you use a cloud-service for this, be aware that information such as your home adress and bank account might be shared with this cloud service provider!

MCP server

business_trip_mcp_server.py exposes create_business_trip_application as an MCP tool via FastMCP, so an MCP-compatible AI agent can fill out and generate the PDF for you. The tool fills the form selected by DRA_FORM and only offers that form's fields and options. The server also ships a business_trip_travel_planning_guide prompt with detailed rules for choosing the transport mode (train vs. flight) and estimating realistic departure/return dates and times, assuming the traveller starts from HOME_CITY.

Install dependencies and run the server with uv:

uv sync
uv run python business_trip_mcp_server.py

Point your MCP-compatible client (e.g. Jan.AI) at this command (uv run python business_trip_mcp_server.py, working directory dra-mcp) to add it as a stdio MCP server. Most clients (Jan.AI, Claude Desktop, VS Code, ...) accept a JSON config such as:

{
  "mcpServers": {
    "dra": {
      "active": true,
      "args": [
        "--directory",
        "path/to/dra-mcp",
        "run",
        "business_trip_mcp_server.py"
      ],
      "command": "uv"
    }
  }
}

The form can also be chosen in the client config instead of .env, e.g. by adding "env": {"DRA_FORM": "tud"} next to "command".

Use via Terminal and Python (without AI agents)

python business_trip.py --help
python business_trip.py `
  --application-kind business-trip `
  --destination "Dresden" `
  --purpose "Project meeting" `
  --departure-date 2026-10-12 `
  --outbound-train `
  --return-train `
  --output completed-trip.pdf

The CLI accepts options for all applicant-editable text fields, choices, and checkboxes. Omitted fields stay blank in the PDF. Boolean options support both --option and --no-option; radio choices are listed by --help. --form tud fills the TU Dresden form instead of the one in DRA_FORM (python business_trip.py --form tud --help lists its options), and --no-open skips opening the PDF afterwards.

From Python, each form module has a fill function that takes the same arguments as a dict:

import form_saxony

form_saxony.fill(
    {"destination": "Dresden", "purpose": "Project meeting", "outbound_train": True},
    output_path="completed-trip.pdf",
)

from business_trip import create_business_trip_application still works and fills the Saxon form; it is the typed function the MCP tool is built from.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. Note: Large parts of the code in this repository were vibe-coded using GitHub Copilot integration in Visual Studio Code. When modifying code here, consider using a similar tool.

Run the tests with uv run pytest. To support another form, add a form_<name>.py next to form_tud.py (field maps, a typed create_business_trip_application and fill) and register it in FORMS in business_trip.py; the tests in tests/test_forms.py and tests/test_mcp.py then check it against its PDF automatically.

Acknowledgements

We acknowledge the financial support by the Federal Ministry of Research, Technology and Space of Germany and by Sächsische Staatsministerium für Wissenschaft, Kultur und Tourismus in the programme Center of Excellence for AI-research „Center for Scalable Data Analytics and Artificial Intelligence Dresden/Leipzig“, project identification number: ScaDS.AI

Available Tools

1 tool
create_business_trip_applicationCreate Business Trip ApplicationA

You are helping fill out a German business-trip application (Dienstreiseantrag). The applicant is based in Leipzig, Germany. Use the following rules to decide transport mode, checkboxes, and dates before calling create_business_trip_application. Do not make up information! E.g. if you don't know the applicant's home address, IBAN, or other personal details, leave them None or null (not empty string). You must provide these fields, and you need to reason some of them based on what is given by the user:

  • destination (at least postal code + city + country, if not in Germany)

  • purpose (meeting name or similar)

  • departure_date

  • departure_time

  • business_start_date

  • business_start_time

  • business_end_date

  • business_end_time

  • return_date

  • return_time

These fields are optional and not required:

  • service_unit

  • applicant_name

  • department": "Antragsteller.Referat",

  • office_phone

  • home_address

  • additional_home_address

  • temporary_stay_address

  • overnight_cost_per_night

  • private_car_reason (only required if using a private car for traveling)

  • flight_reason (only required if using a flight for traveling)

  • private_stay_from

  • private_stay_until

  • private_stay_destination

  • iban

  • bic

  • bank_name

  • explanations

  • explanations_continuation

  • application_date If the user didn't provide them, do not fill them! Keep them None / null.

Choosing the transport mode

  • Destinations inside Germany, or otherwise reachable comfortably by rail in a few hours (e.g. neighbouring countries such as Poland, Czechia, or nearby parts of Austria/Netherlands), should use train + public transport for both legs: set outbound_train=True, outbound_bus_or_public_transport=True, return_train=True, return_bus_or_public_transport=True.

  • Destinations that are far away, overseas, or would otherwise require a very long train ride (roughly more than half a day of travel each way, e.g. most of Western/Southern Europe onward, or anywhere outside Europe) should use flight instead: set outbound_flight=True and return_flight=True. Use flight_reason / flight_reason_continuation to justify the choice if asked.

  • Only select one primary mode per leg unless additional legs (e.g. bus/public transport to/from the airport or station) are genuinely part of the journey.

Estimating departure and return dates/times

Assume the traveller starts and ends every trip in Leipzig. Before setting departure_date/departure_time and return_date/return_time, estimate the one-way travel time from Leipzig to the destination (and back):

  • Nearby destinations reachable within roughly 2-3 hours (e.g. Dresden, Berlin, Halle): same-day travel is fine; departure can be the morning of business_start_date and return the evening of business_end_date.

  • Mid-distance destinations requiring roughly half a day of travel each way (e.g. Paris, Munich to a far corner of Germany, most of Central Europe by train, or a short flight including airport transfer time): if business_start_time is in the early morning (roughly before 9-10am), the traveller cannot arrive in time same-day, so set departure_date to the day BEFORE business_start_date (with an afternoon/evening departure_time). Otherwise, an early-morning departure on business_start_date itself may be reasonable. Apply the same logic symmetrically to the return: if business_end_time is late in the day and travel home would take half a day, set return_date to the day AFTER business_end_date; only keep the return on the same day if there is clearly enough remaining time after the business ends.

  • Long-distance/overseas destinations reachable only by flight: budget extra time for airport transfers, check-in, and connections. Set the departure the day before the business start whenever the start time plus necessary travel time would not otherwise be reachable, and similarly delay the return by a day when the business end time is late.

  • When in doubt, prefer arriving with a comfortable buffer (e.g. arriving the evening before an early-morning meeting) over risking a missed appointment, but avoid padding travel by more than necessary (don't add a full travel day for a destination that's only 1-2 hours away).

Note that departure_date and departure_time must be reasonably BEFORE business_start_date and business_start_time, and return_date and return_time must be reasonably AFTER business_end_date and business_end_time.

General notes

  • Dates accepted by the tool are YYYY-MM-DD or DD.MM.YYYY; times are free text (e.g. "08:00").

  • Personal fields (home address, IBAN, etc.) fall back to values in .env if not provided; do not invent these values yourself, ask the user if they are missing and not already on file.

  • Leave fields unset (do not guess) when information is genuinely unknown; blank fields stay empty in the generated PDF for the applicant or office to fill in later.

  • When the application was created, provide a markdown link to the file, e.g. .

Inputs: purpose (required), destination (required), return_date (required), return_time (required), +68 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 1 tool

    Disambiguation5/5

    Only one tool exists, so there is no possibility of misselection or overlapping purpose. The tool's purpose is clearly stated and distinct.

    Naming Consistency5/5

    The single tool uses a clear snake_case verb_noun pattern (create_business_trip_application), consistent with common MCP naming conventions.

    Tool Count3/5

    A single tool for a complex, specialized task feels thin. While it covers creation, the expected range for a well-scoped server is typically 3–15 tools, so this is borderline.

    Completeness3/5

    The tool covers creation of a business trip application but lacks read, update, or delete operations. The lifecycle is incomplete for managing applications beyond initial creation.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers