Repository navigation
fds-mcp: an MCP server for fragdenstaat.de — and four API limits we measured along the way #1317
notDIRK
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
While building an MCP server against the fragdenstaat.de REST API, we ended up measuring a few limits that are not obvious from the schema. Posting them here in case they are useful to you — and in case we got any of them wrong.
All four were measured on 2026-09-05 against the live site.
1.
MakeRequestSerializerhas nolaw_typefield. A request created through the API always files underpublicbody.default_law, and becauselawsis ordered by("-meta", "-priority")that is almost always the combined meta act. Asking for the LTranspG (law 16) at a Rhineland-Palatinate municipality files under "LTranspG, VIG" (law 18) instead, silently. The web form takes?law_type=, so this is an API-only gap.2. But
lawis writable via PATCH, andConcreteLawFormexists for exactly this narrowing.POSTwithfull_text: true, thenPATCH {"law": ".../api/v1/law/16/"}, produces a request filed under the specific act. We have since done this on a real request and read the result back:law.idwas 16 afterwards, and the outgoing mail carried no trace of the meta act, becausefull_textdropsletter_start/letter_end.One caveat we had to guard against:
due_dateis computed at creation from the default act and is not recalculated by the PATCH. So the two-step route is only safe when both acts carry the same deadline — otherwise the stored deadline silently belongs to the wrong act. We also restrict the target to the meta act's owncombinedset, since PATCH itself accepts any law id and does not runset_concrete_law.3.
POST /api/v1/message/cannot send e-mail.validate_kindaccepts onlypost,phoneandvisit; everything created is a draft, andpublishonly acceptskind: post. Sending a follow-up to an authority is web-only as far as we could tell.4. The web view at
/a/<slug>/send/message/ignores bearer tokens. It answered 302 to/account/login/identically with and without one — session and CSRF only. Consistent with (3), but worth stating separately because it is the obvious workaround and it does not work.Each of these is written up with the measurement method, the dead ends we tried, and the mistakes we made, in docs/FINDINGS.md. Corrections are very welcome — several of these we would rather be wrong about.
The server itself is notDIRK/fds-mcp (MIT, Python). It is deliberately conservative about writing, because of finding (1) and because
POST /api/v1/request/sends immediately and cannot be recalled:submit_requestdefaults to a dry run and refuses unless five independent gates agree, and drafts live as local files a human reads first. Four of its tools — authority search, act lookup, and resolving which authority covers a given place — need no account at all.It is written against fragdenstaat.de specifically, not against froide in general: the base URL is a constant, some paths are theme-specific, and the pre-send rule set encodes German FOI law. If there is interest in other froide instances being addressable, that is useful to know — it changes what we would build next.
All reactions