How barvhaim/remy-mcp works
Project Type and Purpose
• This is a single‐service (monolithic) backend API server implementing the Model Context Protocol (MCP).
• Its purpose is to expose both dynamic (“tools”) and static (“resources”) endpoints that surface Israeli Land Authority public tender data, integrating live government APIs and local reference data.
File Structure
• Top‐level:
• main.py – entry point
• src/remy_mcp/server.py – FastMCP server bootstrap
• src/remy_mcp/client/… – API‐client wrapper around external government APIs
• src/remy_mcp/models/… – Pydantic models for request/response validation
• src/remy_mcp/tools/… – dynamic MCP operations (e.g., search_tenders)
• src/remy_mcp/resources/… – static MCP resources (e.g., regions list)
• src/remy_mcp/utils & data/… – helper utilities and local reference data (e.g., settlement codes)
• Configuration & build: pyproject.toml, uv.lock, pytest.ini, scripts/run_tests.py
• Examples & tests validate end‐to‐end behavior.
README for Insights
• Confirms FastMCP framework, Pydantic, Requests with retry & rate‐limiting.
• Lists dynamic functions vs. static resources.
• Provides the external base‐URL: https://apps.land.gov.il/MichrazimSite/api
Main Components
a. Clients
• Claude Desktop (via MCP client) or any HTTP/MCP‐capable client
b. MCP Server (Python 3.11+)
• FastMCP framework
• Server bootstrap (server.py → main.py)
c. API‐Client Layer
• israeli_land_api.py uses Requests + retry + rate limiting
d. Business Logic
• Tools modules (tender_tools, settlement_tools)
• Resources modules (reference_resources, server_resources)
e. Data Layer
• Pydantic models (arg_models, tender_models, reference_models)
• Local reference data (data/kod_yeshuv.py)
f. External Dependencies
• Israeli Land Authority public REST API
g. Dev/Test & Deployment
• Examples, test suite (pytest), uv CLI tool
Relationships and Data Flows
• Within Server: Incoming request → Router (FastMCP) →
• If dynamic: Tools module → API‐Client → External Gov API → Response → Pydantic model → Return
• If static: Resources module → Local data or pre‐loaded reference → Pydantic model → Return
• All outbound HTTP → https://apps.land.gov.il/MichrazimSite/api
• Throttling/rate‐limit enforced in API‐Client layer
Architectural Patterns & Principles
• Layered separation (API client, business logic, models, utils)
• Protocol‐driven design (MCP dynamic vs. static endpoints)
• Type safety and validation with Pydantic
• Retry & exponential backoff for resilience
• Configuration via uv/pyproject.toml