@dosarjust/mcp-server
v1.0.0
Published
MCP server for DosarJust public API — AI agent tools over /api/public/*
Readme
DosarJust MCP Server
MCP server for AI agents (Cursor, Claude Desktop, etc.) that exposes all 14 operations from the DosarJust public API as MCP tools.
The server is a thin HTTP proxy — it forwards tool calls to /api/public/* with optional X-Api-Key. API key management stays unchanged (generate keys in Contul meu → API on dosarjust.ro).
Quick start
cd mcp-server
npm install --include=dev
npm run build
npm testCursor / Claude configuration
Add to .cursor/mcp.json (project or user-level) or claude_desktop_config.json:
{
"mcpServers": {
"dosarjust": {
"command": "npx",
"args": ["-y", "@dosarjust/mcp-server"],
"env": {
"DOSAR_API_BASE_URL": "https://dosarjust.ro",
"DOSAR_API_KEY": "dj_live_your_key_here"
}
}
}
}From a local checkout, use "command": "node", "args": ["/path/to/portal/mcp-server/dist/index.js"] instead.
For the staging API, set DOSAR_API_BASE_URL to https://test.dosarjust.ro.
Public documentation: https://dosarjust.ro/mcp-server
Environment variables
| Variable | Default | Description |
|----------|---------|-------------|
| DOSAR_API_BASE_URL | https://dosarjust.ro | API base URL |
| DOSAR_API_KEY | — | Optional X-Api-Key header (required for webhook tools) |
| DOSAR_OPENAPI_PATH | bundled spec, or ../backend/openapi/public-api.openapi.json in the monorepo | Path to OpenAPI spec (tools are generated from this) |
Available tools (14)
| Tool | REST endpoint |
|------|---------------|
| search_dosare | GET /api/public/search |
| search_parte | GET /api/public/parte/search |
| get_dosar | GET /api/public/dosar/{numar} |
| get_dosar_solutii | GET /api/public/dosar/{numar}/solutii |
| get_parte | GET /api/public/parte/{hash} |
| get_parte_dosare | GET /api/public/parti/{hash}/dosare |
| stats_solutii | GET /api/public/stats/solutii |
| webhook_subscribe | POST /api/public/webhooks/subscribe |
| list_webhooks | GET /api/public/webhooks |
| delete_webhook | DELETE /api/public/webhooks/{id} |
| renew_webhook | POST /api/public/webhooks/{id}/renew |
| create_search_alert | POST /api/public/webhooks/search-alerts |
| list_search_alerts | GET /api/public/webhooks/search-alerts |
| delete_search_alert | DELETE /api/public/webhooks/search-alerts/{id} |
Dosar numbers with slashes (e.g. 14039/301/2024) are automatically URL-encoded in path parameters.
Tool response format
Tools return JSON (not MCP errors) so agents can handle API errors gracefully:
{
"status": 200,
"headers": { "x-cache": "HIT" },
"data": { "...": "API response body" }
}Recommended agent workflow (RAG)
search_dosare— discover dosare by queryget_dosar— full context (parties, hearings)get_dosar_solutii— all solutions chronologically
Development
npm run dev # run via tsx (stdio)
npm run build # compile to dist/
npm test # vitest unit testsTools are generated at startup from backend/openapi/public-api.openapi.json — when the spec changes, restart the MCP server.
