tk-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tk-mcpsearch Polish Constitutional Tribunal judgments on abortion from last year"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
tk-mcp
Serwer MCP dla orzecznictwa Trybunału Konstytucyjnego: wyszukiwarka wyroków
i postanowień oraz pełny tekst orzeczenia. Źródło: oficjalna strona
trybunal.gov.pl (HTML, bez auth).
Strona nie ma API - konektor czyta HTML. Wyszukiwarka to Solr (type=7383),
pełny tekst czytamy z kontenera #content strony orzeczenia.
Instalacja
uv pip install -e ".[dev]"Related MCP server: Constitutional-Court-decision-mcp
Narzędzia
Tool | Opis |
| wyszukiwarka orzeczeń; |
| pełny tekst orzeczenia (akapity z |
| co konektor pokrywa, a czego nie (każda luka ma |
Fasety (filter): signature:K|Kp|Kpt|P|Pp|SK|U, category:Wyrok,
category:Postanowienie, modificationDate:today|lastWeek|lastMonth|lastYear|all.
Sortowanie: publicationDate+desc / publicationDate+asc.
Uruchomienie
tk-mcp # stdio
python -m tk_mcp.serverRozwój
pytest
pytest -m smoke -v # testy online (live trybunal.gov.pl)
ruff checkAudit log: ~/.matematic/audit/tk-mcp.jsonl (override: TK_MCP_AUDIT_DIR).
Logowane są metadane wywołań (params_hash, result_summary, source_urls,
latency_ms) - bez pełnych treści orzeczeń.
Uwagi o źródle
type=7383jest obowiązkowy w wyszukiwarce - bez niego strona zwraca sam szkielet.Brak trafień =
count=0, nie błąd.category:Publiczne ogłoszenie orzeczeniato faseta ogłoszeń (komunikatów), nie orzeczeń - dla realnych sygnatur zwraca 0.Orzeczenia TK z lat 2024-2026 są częścią sporu ustrojowego: konektor zwraca treść verbatim i nie rozstrzyga o ważności ani prawidłowości składu.
Available Tools
3 toolsget_judgment_textARead-onlyIdempotent
Pelny tekst orzeczenia TK ze strony trybunal.gov.pl.
Parser scope'uje sie do kontenera #content (nav/naglowek emituja wlasne
dlugie <p>), wiec zwrocone akapity to sklad orzekajacy i uzasadnienie, bez
boilerplate. Bez PDF, bez JS.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | URL, sciezka absolutna albo wzgledna, np "/postepowanie-i-orzeczenia/wyroki/art/4844-wiek-emerytalny-kobiet-i-mezczyzn" |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover the safety profile (readOnly, idempotent, openWorld, non-destructive), and the description usefully adds output-content behavior: it scopes to `#content` so boilerplate nav/header is excluded and only the adjudicating composition and justification are returned. It also discloses two real limitations ('no PDF, no JS') that constrain what pages will work.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with purpose in the first sentence, followed by two tight clauses on parser scope and limitations. The parser-container detail is slightly implementation-flavored, but it justifies itself by explaining why the output is clean.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present and annotations carrying the safety profile, the description need only add what structured fields cannot: it explains the extraction scope and the PDF/JS limitations. The one gap is the absence of routing guidance relative to the sibling search and coverage tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the single `path` parameter is documented with a concrete example URL in the schema. The description adds nothing about accepted path formats or resolution, so the baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: fetching the full text ('Pelny tekst') of a TK judgment from trybunal.gov.pl. It is clearly distinguishable from search_judgments (retrieval vs discovery), though it never names or routes against its siblings explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains parser behavior but never says when to use this tool versus search_judgments or tk_coverage, nor what input is expected (a URL/path obtained elsewhere). Usage is only inferable from the word 'full text'; there is no explicit when-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_judgmentsARead-onlyIdempotent
Szuka orzeczen TK w wyszukiwarce trybunal.gov.pl (Solr, type=7383).
Zwraca globalny count z naglowka i jedna strone wynikow. Brak naglowka
licznika albo licznik 0 to count=0 z pustymi items - nie blad.
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | numer strony, 1-based (default 1) | |
| sort | No | "publicationDate+desc" albo "publicationDate+asc" | |
| query | No | fraza pelnotekstowa (np "K 15/24", "emerytalny"). Pusta = przegladanie po samej `filter` (np. wszystkie wyroki), serwerowo `q=*:*`. | |
| filter | No | faseta, np "signature:K", "category:Wyrok", "modificationDate:lastYear" |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/openWorld/idempotent/non-destructive, so the bar is lower. The description still adds real value by disclosing result shape (global count header plus one page) and, importantly, the error semantics: missing counter header or zero counter yields count=0 with empty items rather than an error.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short paragraphs, front-loaded with purpose then return/edge-case behavior. The internal detail (Solr, type=7383) is borderline noise but arguably useful for constructing filters, so it mostly earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists so return values need not be spelled out, yet the description still clarifies the count semantics and the empty-result case, which is exactly the gap an agent would hit when paginating. Nothing critical is missing for a search tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds a little beyond the schema by restating that an empty query falls back to q=*:* with filter-only browsing, but the meaning of page, sort and filter syntax is left to the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The first sentence names a specific verb (Szuka) and resource (orzeczenia TK) and even identifies the backend (trybunal.gov.pl, type=7383). It does not explicitly distinguish itself from get_judgment_text or tk_coverage, so the agent must infer the search-vs-fetch split.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implicit guidance is present: an empty query means browsing by filter alone (q=*:*), which tells the agent how to do a list-everything search. However there is no explicit statement of when to prefer this over get_judgment_text or tk_coverage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tk_coverageARead-onlyIdempotent
Declare what this connector covers, how it is sourced, and what it does NOT cover.
Call this before telling a user that the Constitutional Tribunal record "does not contain" something, and whenever a search comes back empty: the absence may be a gap in this connector rather than in the TK record. Every gap carries a fallback saying where to look instead.
Returns:
Coverage with families, an as-of note, and a non-empty list of known gaps.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| status | No | |
| families | No | |
| as_of_note | Yes | States what the dates mean, and what they do not promise. |
| known_gaps | No | Never empty. An empty list would mean 'not checked', not 'no gaps'. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds real behavioral context beyond that: every gap carries a fallback saying where to look instead, and the result always includes a non-empty list of known gaps — semantics an agent cannot infer from the annotations alone.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Structure is front-loaded: the imperative purpose first, then the usage condition, then the return summary. It is slightly longer than strictly necessary because the gap rationale is stated twice in adjacent sentences, but every element is relevant and there is no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present, the description is not obligated to explain return values, yet it still names the Coverage payload, its families, as-of note, and non-empty gap list. Combined with the rich annotations and explicit call conditions, an agent has everything needed to invoke this correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so there is nothing for the description to disambiguate; baseline 4 applies. The description correctly implies a parameterless invocation and spends no space on non-existent inputs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Declare what this connector covers, how it is sourced, and what it does NOT cover.' That is unmistakably distinct from the sibling read tools (search_judgments, get_judgment_text), which fetch records rather than declare coverage metadata.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives explicit trigger conditions: call before asserting the TK record 'does not contain' something, and whenever a search returns empty. It also explains why — an empty result may be a connector gap rather than a record gap — which directly routes the agent away from over-claiming based on sibling search results.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.0- First observed
get_judgment_text - First observed
search_judgments - First observed
tk_coverage
TDQS
Scored across 3 tools
search_judgments (find judgments) and get_judgment_text (fetch full text of a known judgment) target clearly different actions, and tk_coverage is an explicit meta/coverage declaration tool that plays a distinct role. No overlap or plausible misselection.
search_judgments and get_judgment_text follow a clean snake_case verb_noun pattern. tk_coverage breaks it by using a namespace prefix and no verb, but it is still readable and only a single deviation.
Three tools is lean for a read-only judgment connector but each earns its place: search, retrieve, and a coverage/gap disclaimer. Slightly thin but well-scoped rather than padded.
The core read lifecycle (search then fetch full text) plus a coverage/gap declaration is covered for this domain. Minor gaps remain around pagination beyond one page and metadata-only listing, which the coverage tool at least documents.
Maintenance
Related MCP Connectors
Resolve, search and verify legal citations against the official sources, with provenance.
Temporal search and comparison for official Luxembourg and reviewed EU law, with provenance.
Case law search, court decisions and súmulas, across indexed public sources (STF, STJ, TST, state co
Official EUR-Lex, UK, US, and gazette search, metadata fetch, and change-only watches.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides access to Polish court judgments from the SAOS database. Enables search and retrieval of judgments with full-text search, filtering, and detailed case information.320 npm1Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables searching and retrieving Korean Constitutional Court decisions using the official Open API, with search filters and full-text retrieval.-
- AlicenseAqualityBmaintenanceEnables searching Polish parliamentary prints and retrieving the full legislative process history, including links to final legal acts, via the official Sejm API.3MIT
- AlicenseAqualityBmaintenanceEnables access to Polish Constitutional Tribunal rulings, including search by keywords or case signature, listing recent decisions, and retrieving full judgment texts with metadata and official links. Supports section-wise and chunked retrieval of long documents to manage context budgets.4MIT