Gadoes/dispumike
A multi-jurisdictional legal AI fork built around MCP tool adapters, citation rendering, and a full source-management UI.
Gadoes/dispumike is an active fork focused on turning the MCP backend into something deployable for multi-region legal work. The bulk of the development is infrastructure: individual MCP server adapters for CourtListener, EUR-Lex, GovInfo, Al-Meezan, ITALAW, and ICSID, backed by a portable SQLite scraper framework for the non-API sources. On top of that sits a full source-management stack - a region-grouped registry table, AES-256-GCM key storage, a picker UI with per-source toggling, and a per-query scope filter that restricts which MCP tools the LLM can call on a given message.
The fork also adds: a citation data model and rendering pipeline, a citation verification step before responses go to the user, an MCP telemetry table with an admin dashboard, a tool-result caching layer, and a circuit breaker for open/failed MCP connections. Late cleanup commits tighten repo hygiene and fix a EUR-Lex region glyph.
The codebase is tightly coupled to Supabase for auth and to a specific user_profiles schema. The 12-source seed catalogue and the is_admin column reflect Gadoes's specific product; both would need adaptation before adoption.
What's in it
- Multi-jurisdiction legal source connectors Plug-in adapters for US (CourtListener, GovInfo), EU (EUR-Lex), and Pakistani (Al-Meezan) legal databases, with a self-hosted scraping path for jurisdictions that don't have a ready-made connector - including italaw and ICSID for international arbitration.
- Source picker and per-query scope Users manage which legal sources are connected and toggle which ones any given question is allowed to consult, so research stays scoped to the right jurisdictions.
- Citations as first-class output When the assistant cites a source, the citation is rendered as a structured card rather than buried in prose, with state for whether the underlying source is still reachable.
- Citation verification loop Citations can be re-fetched against their original source and explicitly marked verified or unverified, closing the loop between what the assistant said and what the source actually says.
- Source-call caching Equivalent legal-source lookups are deduplicated and cached, so repeated research over the same material is faster and cheaper.
- Telemetry and admin dashboard Every call out to a legal source is logged and surfaced in an admin view, giving operators visibility into what's being queried, how often, and with what success.
- Resilience plumbing A circuit-breaker and reconnect layer sits in front of the source connectors, so a flaky external database degrades gracefully rather than taking the assistant down with it.
Direction
searchintegrationinfrastructure
Activity
Threads of work (detailed view)
Gadoes wires Mike to bail on a failing source fast
When an outside data source starts misbehaving, the fork now cuts it off instead of waiting on it.
Cleanup commit adds the missing circuit breaker that the build needed all along
The final commit in the Gadoes feature sequence deletes 6,300 lines of accidentally-committed internal planning files, fixes a leaked Supabase URL in `.env.example`, and - buried in the cleanup - adds `circuitBreaker.ts`, a file that `clientManager.ts` has been importing since Chunk 1 but that was never committed to the branch until now.
Gadoes makes Mike's citations prove themselves
Every source Mike cites can now be checked against the actual document, with a status badge that tells you whether it holds up.
Citation verification: re-fetch, compare, badge the result
Gadoes closes the loop on citations: a user can now click "Verify & read" and the system re-fetches the source URL, checks whether the stored excerpt actually appears in the page, and updates a `verification_status` badge. Four commits, two new tables columns, one new service, one new route.
Gadoes builds a control room for dispumike's outside connections
Operators can now see which data and tool sources are slow or failing before users feel it.
MCP telemetry: per-call logging, aggregation route, and admin dashboard
Gadoes adds end-to-end observability for MCP tool calls: a 17-line `mcp_events` migration, telemetry logging inside `McpClientManager.callTool()`, a `GET /admin/mcp-telemetry` aggregation endpoint, and a Next.js admin page that auto-refreshes every 60 seconds.
Gadoes stops dispumike asking the same legal database twice
A new caching layer means repeated research queries hit memory instead of re-fetching the same case law every session.
MCP result cache: SHA-256 keys, per-source TTLs, query normalizer
Gadoes adds a caching layer for MCP tool results to reduce repeated hits on external legal sources. Migration `004_cache_results.sql` defines the backing table; `queryNormalizer.ts` canonicalises inputs before hashing; `CacheManager` handles get/set/expiry with two TTL tiers.
Gadoes is giving dispumike its own offline arbitration library
Two major investment-treaty case sources now live inside the fork, scraped once and served locally instead of pinged live.
Portable DB framework with italaw and ICSID scrapers
Gadoes builds a self-hosted alternative to API-based MCP sources - a scraper framework for jurisdictions with no published MCP server - and ships two concrete implementations: italaw (international investment arbitration) and ICSID (World Bank arbitration awards). Three chunks, six commits.
Gadoes wires Mike into the EU's official law database
The fork can now pull and cite EU legislation straight from EUR-Lex, the bloc's authoritative legal repository.
EUR-Lex adapter added, plus a glyph fix that ships two commits later
Gadoes adds the EUR-Lex connector for EU law, regulations, and directives. It's 48 lines and needs no API key. There's a catch: the EU region glyph in both the migration seed and this adapter starts as `EU·27` and only gets corrected to `🇪🇺` in a later cleanup commit.
Al-Meezan adapter lands alongside a 6.3k-line planning doc dump
Gadoes adds a small MCP adapter for the Al-Meezan Pakistan legal database, but buries it inside a commit that accidentally publishes 6,300 lines of internal planning material - specs, roadmaps, mockups, and Claude skill files. The planning docs are deleted two commits later. The adapter itself is 53 lines.
Gadoes wires Mike into the federal rulebook
The dispumike fork can now pull and cite federal regulations and statutes straight from the U.S. government's official document service.
GovInfo adapter: wired but waiting on an upstream npm package
Gadoes adds the GovInfo adapter for federal publications (CFR, Federal Register, public laws), following the same template as CourtListener. The commit message flags it explicitly: the `govinfo-mcp` npm package hasn't been published yet, so the server config is scaffolding only.
Gadoes plugs Mike into the free case-law firehose
A new connector lets this fork pull real court opinions straight from CourtListener - no paid subscription, no API key required.
CourtListener MCP adapter with citation parser and fixture tests
Gadoes adds the CourtListener connector for federal and state caselaw in the United States: config builder, key validator, tool definitions, system prompt, two JSON fixtures, and 19 tests covering both citation parsing and a mock-MCP round trip.
Gadoes turns Mike into a research switchboard
Users can now connect their own legal data sources and choose which ones the AI consults on each question.
Source picker, per-query scope toggling, and API key encryption for MCP connections
Gadoes adds a full source-management layer on top of the MCP backend: a database schema for server registries, AES-256-GCM key storage, a region-grouped picker UI, and a per-message scope filter that restricts which MCP tools the LLM can call.
Gadoes is building a citation ledger for Mike's answers
Every source the AI cites gets tracked, deduplicated, and flagged for whether the link still works.
Citation data model and rendering, end to end
Gadoes builds the citation pipeline from MCP tool result to UI card: a `citations` table, a parser that maps each source type's response format into the schema, SSE emission at end of turn, and a React component with compact/expanded views and RTL support for Arabic excerpts.
Gadoes is teaching Mike to plug into outside tools
The fork now has the plumbing to let Mike reach external tools and data sources without falling over when one goes dark.
MCP host plumbing: lazy-spawn manager, mock server, and agent loop wiring
Gadoes builds the foundation the entire MCP feature set sits on: a singleton process manager for stdio-launched MCP servers, an in-process mock server for unit tests, and the tool-dispatch wiring in the existing assistant loop. Three commits, roughly 1,300 lines of new code, plus a large package-lock addition for `@modelcontextprotocol/sdk`.