Skip to main content
Glama
README.md
# rekabet-karar-mcp

Yargı MCP'nin **ABD** muadili: ABD federal içtihadında rekabet/antitröst kararlarını
resmi ve açık veritabanından (CourtListener, Free Law Project) arayan bir MCP sunucusu.
Rekabet hukuku tezi için ABD kararlarının doğrulanmış künyesini ve tam metnini getirir.
(AB tarafı — CURIA/EUR-Lex — ikinci sürümde eklenecek.)

## Araçlar

- **us_karar_ara** — ABD federal içtihadında İngilizce tam metin arama. Dava adı,
  mahkeme, tarih (dateFiled), atıf (citation), docket ve `opinion_id` döndürür.
- **us_karar_getir** — `opinion_id` ile bir görüşün tam metnini + künyesini getirir.
  Dipnottaki birebir doğrulama pasajları bu metinden alınır.

Künye, dava adı, tarih ve alıntılar API'den gelen ham veridir; sunucu bunları uydurmaz.

## Gereksinim

- Node.js 22.18+ / 24 (`.ts` dosyasını derlemeden çalıştırmak için). Kurulu sürüm: v24.
- CourtListener **ücretsiz API token'ı** (tam metin getirme için zorunlu; arama token'sız da çalışır ama düşük hız limitiyle).

## Kurulum

```powershell
cd C:\Users\acer\Desktop\rekabet-karar-mcp
npm install
```

### Ücretsiz token alma (tek seferlik, kullanıcı yapar)

1. https://www.courtlistener.com/ adresinde ücretsiz hesap oluştur.
2. Profil → **Profile → API** bölümünden bir **API token** üret.
3. Token'ı `mcp-config-ornek.json` içindeki `COURTLISTENER_TOKEN` alanına yapıştır.

> Not: Hesap açma ve şifre girme işlemlerini yalnızca kullanıcı yapar; sunucu token'ı
> ortam değişkeninden (env) okur, kod içinde token saklanmaz.

## Hızlı test (MCP'siz)

```powershell
# token'sız (yalnızca arama çalışır)
node server.ts --selftest "consumer welfare Sherman Act"

# token ile (arama + tam metin)
$env:COURTLISTENER_TOKEN = "SENIN_TOKENIN"
node server.ts --selftest "predatory pricing recoupment"
```

## Claude'a ekleme

`mcp-config-ornek.json` içindeki `mcpServers` bloğunu Claude'un MCP yapılandırmasına
ekle, token'ı gir, oturumu yeniden başlat. Sonraki oturumda `us_karar_ara` ve
`us_karar_getir` araçları — Yargı MCP gibi — hazır gelir.

## Veri kaynağı

CourtListener REST API v4 (https://www.courtlistener.com/api/rest/v4/) — Free Law Project.

TDQS

A4/5.0

Scored across 2 tools

Disambiguation5/5

The search tool and retrieval tool have clearly distinct functions: one queries by keywords and returns metadata, the other takes an opinion_id and returns the full text. There is no overlap or ambiguity between them.

Naming Consistency5/5

Both tools follow a consistent verb-noun pattern: 'us_karar_ara' (search) and 'us_karar_getir' (get), sharing the 'us_karar_' prefix. This makes the toolset's structure predictable and easy to learn.

Tool Count3/5

With only two tools, the server feels thin but is not inappropriate for its narrow purpose. The calibration suggests 1-2 tools are borderline, so this score reflects the minimalism while acknowledging the clear scope.

Completeness4/5

The server covers the essential search-and-retrieve workflow for US antitrust decisions. There are minor gaps such as lack of filtering options, but the core lifecycle (find a case, fetch its text) is complete for the stated purpose.

Maintenance

ActivityStale
ResponsivenessNo issues