How entscheidsuche/entscheidsuche-mcp works
This is an MCP server that exposes Swiss case-law search and retrieval to AI and programmatic clients. The main workflow is a client invoking a registered tool, the server delegating to its search client, and that client querying Elasticsearch before returning typed results. Separate tools expose exact case-number search, document retrieval, hierarchy counts, facets, and server information. Access-log analysis is a distinct operational capability. The graph follows the excerpts and README; links to unsampled tool implementations and statistics routing are omitted where the exact call is not shown.
Main entry points: server.py MCP tools · search.py Search client · __main__.py CLI entry · models.py Request and result models
Components 9
Search and data
- Request and result models
src/entscheidsuche_mcp/models.py - Search client
src/entscheidsuche_mcp/search.py - Elasticsearch index
- Facet hierarchy service
Usage analytics
- Access-log middleware
src/entscheidsuche_mcp/access_log.py - Usage statistics
src/entscheidsuche_mcp/statistik.py
Other components
- MCP client
Connections 11
- MCP client → CLI entry: starts server
README.md - CLI entry → MCP tools: builds app
src/entscheidsuche_mcp/__main__.py - MCP client → MCP tools: calls tools
README.md - MCP tools → Search client: delegates search
src/entscheidsuche_mcp/server.py - Search client → Request and result models: builds results
src/entscheidsuche_mcp/search.py - Search client → Elasticsearch index: queries index
src/entscheidsuche_mcp/search.py - MCP tools → Request and result models: validates parameters
src/entscheidsuche_mcp/server.py - Search client → Facet hierarchy service: fetches hierarchy
src/entscheidsuche_mcp/search.py - CLI entry → Access-log middleware: configures logging
src/entscheidsuche_mcp/__main__.py - MCP tools → Access-log middleware: wraps requests
src/entscheidsuche_mcp/server.py - MCP tools → Usage statistics: routes statistics
src/entscheidsuche_mcp/server.py