start_form_collectionLABSCO SUMMARY
An intake form filled in by talking, not by tabbing through fields.
It knows the seven fields a mediation case needs and pulls them out of what the applicant actually says, checking as it goes — an 11-digit phone number is caught on the way in rather than after filing. The completed record lands in MySQL.
What it is
A guided intake collector for mediation cases: it opens a session, extracts the applicant's details and the incident description from what they say, validates each field, and files the completed form to MySQL.
What you get
- A collection session per applicant, tracked from first message to submission
- Fields extracted from ordinary conversation rather than asked one box at a time
- The seven required fields enforced: name, phone (11 digits), address, incident time, place, description, number of people involved
- Validation run over the collected data before anything is filed
- Progress reported mid-collection, so the person knows what is still missing
- Completed forms written to a MySQL database
- Session statistics across collections
- Results laid out as Markdown tables, with streaming output
Requirements
A MySQL connection string and a DeepSeek API key — the field extraction runs on DeepSeek. Python 3.12, or Docker Compose; the service listens on port 7000 with /health, /mcp and /sse endpoints.
Setup effort
Build from source — git clone https://github.com/xiaoshi7915/mdtj-mcp-server.git
USE CASES
Taking a walk-in complaint over chat
Open the session and let the details be extracted from the person's own account instead of interrogating them field by field.
Knowing what the person still has not told you
The status call names the missing required fields, so the next question is the right one.
Catching a bad phone number before it is filed
Validation runs over the collected data first — an 11-digit rule enforced at intake, not at review.
Filing the completed case
Submit writes the record to MySQL and closes the session.
Reporting on how many intakes were handled
Session statistics across collections, without querying the database directly.
6 tools
Listed in project docs. Your client may show a different list.
collect_field_infoget_collection_statusvalidate_form_datasubmit_formget_session_statisticsBEFORE YOU INSTALL
What to know first
Tools you get
6 tools named in the project's documentation.
Requires
- Python 3.12 (python on PATH)
- A MySQL database for DATABASE_URL
- DEEPSEEK_API_KEY
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/xiaoshi7915/mdtj-mcp-server.git
cd mdtj-mcp-server
pip install -r requirements.txtHave a MySQL database ready: its connection string goes into DATABASE_URL, and a DeepSeek API key into DEEPSEEK_API_KEY, in the block below.
MCP Clients
Cursor
{
"mcpServers": {
"mdtj_mcp_server": {
"command": "python",
"args": [
"<YOUR_PATH_TO_MDTJ_MCP_SERVER>/mcp_server_final.py"
],
"cwd": "<YOUR_PATH_TO_MDTJ_MCP_SERVER>",
"env": {
"DATABASE_URL": "mysql+aiomysql://<YOUR_DB_USER>:<YOUR_DB_PASSWORD>@<YOUR_DB_HOST>:<YOUR_DB_PORT>/<YOUR_DB_NAME>",
"DEEPSEEK_API_KEY": "<YOUR_DEEPSEEK_API_KEY>"
}
}
}
}<YOUR_PATH_TO_MDTJ_MCP_SERVER> is the full path of the folder you cloned, and the two env values are your MySQL connection string and DeepSeek API key. The server reads them from the environment and does not load a .env file on its own.