# ansvar-systems/greek-law-mcp architecture

> Architecture diagram of the GitHub repository ansvar-systems/greek-law-mcp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ansvar-systems/greek-law-mcp
- Repository: https://github.com/ansvar-systems/greek-law-mcp

## Overview

Greek Law MCP Server exposes Greek statute research and EU-law cross-reference tools to MCP clients. A client request enters through stdio or HTTP, is dispatched by the shared registry to a research tool, and returns database-backed results; tools also cover citation validation and formatting, legal-stance aggregation, currency checks, and EU implementation/compliance. The README documents these capabilities, while sampled source confirms the stdio/HTTP registration pattern and specific search queries. Several tool implementations were not sampled, so their internal calls are not expanded here.

Main entry points: [`src/tools/registry.ts`](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/registry.ts) (Tool registry), [`src/index.ts`](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/index.ts) (Stdio server), [`api/mcp.ts`](https://github.com/ansvar-systems/greek-law-mcp/blob/main/api/mcp.ts) (HTTP endpoints), [`src/tools/search-legislation.ts`](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/search-legislation.ts) (Legislation search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["MCP access"]
  node_stdio["Stdio server<br/>[index.ts]"]
  node_http["HTTP endpoints<br/>[mcp.ts]"]
  node_registry["Tool registry<br/>[registry.ts]"]
end

subgraph group_research["Greek law research"]
  node_search["Legislation search"]
  node_provision["Provision retrieval<br/>[get-provision.ts]"]
  node_citation_check["Citation validation"]
  node_stance["Legal stance"]
  node_currency["Currency check<br/>[check-currency.ts]"]
  node_format["Citation formatting<br/>[format-citation.ts]"]
  node_sources["Source catalogue<br/>[list-sources.ts]"]
  node_about["Coverage and status<br/>[about.ts]"]
end

subgraph group_eu["EU law integration"]
  node_eu_search["EU implementation search"]
  node_eu_basis["Statute EU basis<br/>[get-eu-basis.ts]"]
  node_greek_impl["Greek implementations"]
  node_provision_basis["Provision EU basis"]
  node_eu_compliance["EU compliance"]
end

subgraph group_data["Legal corpus"]
  node_db[("SQLite corpus<br/>[database.db]")]
end

node_client(("MCP client"))

node_client -->|"sends MCP requests"| node_stdio
node_client -->|"sends MCP requests"| node_http
node_stdio -->|"registers tools"| node_registry
node_http -->|"registers tools"| node_registry
node_registry -->|"dispatches search"| node_search
node_registry -->|"dispatches retrieval"| node_provision
node_registry -->|"dispatches validation"| node_citation_check
node_registry -->|"dispatches aggregation"| node_stance
node_registry -->|"dispatches status check"| node_currency
node_registry -->|"dispatches formatting"| node_format
node_registry -->|"dispatches listing"| node_sources
node_registry -->|"dispatches information"| node_about
node_registry -->|"dispatches search"| node_eu_search
node_registry -->|"dispatches lookup"| node_eu_basis
node_registry -->|"dispatches lookup"| node_greek_impl
node_registry -->|"dispatches lookup"| node_provision_basis
node_registry -->|"dispatches validation"| node_eu_compliance
node_search -->|"queries provisions"| node_db
node_eu_search -->|"queries EU references"| node_db

click node_stdio "https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/index.ts"
click node_http "https://github.com/ansvar-systems/greek-law-mcp/blob/main/api/mcp.ts"
click node_registry "https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/registry.ts"
click node_db "https://github.com/ansvar-systems/greek-law-mcp/blob/main/data/database.db"
click node_search "https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/search-legislation.ts"
click node_provision "https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/get-provision.ts"
click node_citation_check "https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/validate-citation.ts"
click node_stance "https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/build-legal-stance.ts"
click node_currency "https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/check-currency.ts"
click node_format "https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/format-citation.ts"
click node_sources "https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/list-sources.ts"
click node_about "https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/about.ts"
click node_eu_search "https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/search-eu-implementations.ts"
click node_eu_basis "https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/get-eu-basis.ts"
click node_greek_impl "https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/get-greek-implementations.ts"
click node_provision_basis "https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/get-provision-eu-basis.ts"
click node_eu_compliance "https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/validate-eu-compliance.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_stdio,node_http,node_registry,node_client toneBlue
class node_search,node_provision,node_citation_check,node_stance,node_currency,node_format,node_sources,node_about toneAmber
class node_eu_search,node_eu_basis,node_greek_impl,node_provision_basis,node_eu_compliance toneMint
class node_db toneRose
```

## Components

### MCP access

- [Stdio server](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/index.ts): `src/index.ts`
- [HTTP endpoints](https://github.com/ansvar-systems/greek-law-mcp/blob/main/api/mcp.ts): `api/mcp.ts`
- [Tool registry](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/registry.ts): `src/tools/registry.ts`

### Greek law research

- [Legislation search](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/search-legislation.ts): `src/tools/search-legislation.ts`
- [Provision retrieval](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/get-provision.ts): `src/tools/get-provision.ts`
- [Citation validation](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/validate-citation.ts): `src/tools/validate-citation.ts`
- [Legal stance](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/build-legal-stance.ts): `src/tools/build-legal-stance.ts`
- [Currency check](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/check-currency.ts): `src/tools/check-currency.ts`
- [Citation formatting](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/format-citation.ts): `src/tools/format-citation.ts`
- [Source catalogue](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/list-sources.ts): `src/tools/list-sources.ts`
- [Coverage and status](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/about.ts): `src/tools/about.ts`

### EU law integration

- [EU implementation search](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/search-eu-implementations.ts): `src/tools/search-eu-implementations.ts`
- [Statute EU basis](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/get-eu-basis.ts): `src/tools/get-eu-basis.ts`
- [Greek implementations](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/get-greek-implementations.ts): `src/tools/get-greek-implementations.ts`
- [Provision EU basis](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/get-provision-eu-basis.ts): `src/tools/get-provision-eu-basis.ts`
- [EU compliance](https://github.com/ansvar-systems/greek-law-mcp/blob/main/src/tools/validate-eu-compliance.ts): `src/tools/validate-eu-compliance.ts`

### Legal corpus

- [SQLite corpus](https://github.com/ansvar-systems/greek-law-mcp/blob/main/data/database.db): `data/database.db`

### Other components

- **MCP client**

## Connections

- MCP client → Stdio server: sends MCP requests
- MCP client → HTTP endpoints: sends MCP requests
- Stdio server → Tool registry: registers tools
- HTTP endpoints → Tool registry: registers tools
- Tool registry → Legislation search: dispatches search
- Tool registry → Provision retrieval: dispatches retrieval
- Tool registry → Citation validation: dispatches validation
- Tool registry → Legal stance: dispatches aggregation
- Tool registry → Currency check: dispatches status check
- Tool registry → Citation formatting: dispatches formatting
- Tool registry → Source catalogue: dispatches listing
- Tool registry → Coverage and status: dispatches information
- Tool registry → EU implementation search: dispatches search
- Tool registry → Statute EU basis: dispatches lookup
- Tool registry → Greek implementations: dispatches lookup
- Tool registry → Provision EU basis: dispatches lookup
- Tool registry → EU compliance: dispatches validation
- Legislation search → SQLite corpus: queries provisions
- EU implementation search → SQLite corpus: queries EU references
