How sakiphan/yargitay-mcp works
Yargıtay MCP is a local Go MCP server that lets an AI client search and retrieve decisions from Yargıtay, AYM, Danıştay, and AİHM/HUDOC. The main flow is client request → CLI startup → MCP tools → source-specific search/document access → official court sources; results return through the MCP server. An optional local viewer serves decision pages. The npm launcher obtains and verifies the Go binary before forwarding the client’s stdio. Edges reflect sampled calls or README statements; unsampled internals are represented at directory level.
Main entry points: courts/client.go Court Adapter · serve.go Serve Runtime · server.go MCP Tools · yargitay/client.go Yargıtay Adapter
Components 18
Local Runtime
- Go Entry
cmd/yargitay-mcp/main.go - CLI Commands
internal/cli/app.go - Serve Runtime
internal/cli/serve.go - MCP Tools
internal/server/server.go - Decision Viewer
internal/server/viewer.go - Client Setup
internal/setup/setup.go
Court Tools
- Court MCP Tools
internal/server/courts.go - Yargıtay Search
internal/server/server.go - Other Court Search
internal/courts/search.go - Court Documents
internal/courts/document.go - Yargıtay Adapter
internal/yargitay/client.go
Go Core
- Shared Core
internal/yargitay - Court Adapter
internal/courts/client.go
npm Launcher
- npm CLI
npm/bin/cli.mjs - Binary Launcher
npm/lib/launcher.mjs
Other components
- MCP Client
- Official Court Sources
- GitHub Releases
Connections 25
- MCP Client → Go Entry: starts server
README.md - Go Entry → CLI Commands: dispatches to
cmd/yargitay-mcp/main.go - CLI Commands → Serve Runtime: runs serve
internal/cli/app.go - CLI Commands → Client Setup: applies setup
internal/cli/app.go - Serve Runtime → MCP Tools: creates tools
internal/cli/serve.go - Serve Runtime → Court Adapter: creates sources
internal/cli/serve.go - MCP Client → MCP Tools: sends MCP requests
README.md - MCP Tools → Yargıtay Search: registers tools
internal/server/server.go - MCP Tools → Court MCP Tools: adds court tools
- Court MCP Tools → Other Court Search: calls search
internal/server/courts.go - Court MCP Tools → Court Documents: calls retrieval
internal/server/courts.go - Other Court Search → Court Adapter: uses fetcher
internal/courts/search.go - Court Documents → Court Adapter: uses fetcher
internal/courts/document.go - Yargıtay Search → Yargıtay Adapter: calls source
internal/server/server.go - Yargıtay Adapter → Shared Core: uses core
- Court Adapter → Shared Core: builds official client
internal/courts/client.go - Court Adapter → Official Court Sources: requests decisions
README.md - Yargıtay Adapter → Official Court Sources: fetches decisions
README.md - Serve Runtime → Decision Viewer: starts viewer
internal/cli/serve.go - Decision Viewer → Court Documents: retrieves court text
internal/server/viewer.go - Decision Viewer → Yargıtay Adapter: retrieves Yargıtay text
internal/server/viewer.go - npm CLI → Binary Launcher: ensures binary
npm/bin/cli.mjs - Binary Launcher → GitHub Releases: downloads binary
README.md - Binary Launcher → Go Entry: runs binary
npm/lib/launcher.mjs - MCP Client → npm CLI: starts via npx
README.md