agentleFS
MikeRobGITMikeRobGIT/lodgify-mcp/.cursor/rules/project-overview.mdc

lodgify-mcp / rules

Cursor rule4 starsChanged 16 months agoMITView on GitHub

  • Reads credentials

The file

We split this project-overview.mdc into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Closure-based DI: Use getClient() pattern for dependency injection

    line 47
  2. Distinctive:

    Error Handling: All errors go through centralized handler with sanitization

    line 49

≈ “Common” is an estimate: at least 1 in 5 of the 7,324 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
project-overview.mdc
# Lodgify MCP Server - Project Overview

## Project Purpose
This is a Model Context Protocol (MCP) server that exposes Lodgify Public API v2 endpoints as tools for AI assistants like Claude. It enables programmatic interaction with Lodgify's property management system through a modular, type-safe architecture.

## Core Architecture

### Technology Stack
- **Runtime**: Bun ≥ 1.3.13 (or Node.js ≥ 18)
- **Language**: TypeScript with strict mode
- **Protocol**: MCP over stdio
- **SDK**: @modelcontextprotocol/sdk
- **Validation**: Zod schemas
- **HTTP Client**: Native fetch with custom retry logic
- **Logging**: Pino with structured logging
- **Code Quality**: Biome for linting/formatting

### Key Components

1. **Entry Point**: [src/server.ts](mdc:src/server.ts) - Minimal MCP server entry point
2. **MCP Modules**: [src/mcp/](mdc:src/mcp/) - Registry-based modular architecture
   - **Tools**: [src/mcp/tools/](mdc:src/mcp/tools/) - Organized by category (property, booking, availability, rate, webhook, messaging)
   - **Resources**: [src/mcp/resources/](mdc:src/mcp/resources/) - Health checks and system monitoring
   - **Error Handling**: [src/mcp/errors/](mdc:src/mcp/errors/) - Centralized error processing
   - **Schemas**: [src/mcp/schemas/](mdc:src/mcp/schemas/) - Shared Zod validation schemas
3. **Orchestrator**: [src/lodgify-orchestrator.ts](mdc:src/lodgify-orchestrator.ts) - Unified API for all Lodgify endpoints
4. **Core Modules**: [src/core/](mdc:src/core/) - HTTP client, errors, rate limiting, retry logic
5. **API Modules**: [src/api/](mdc:src/api/) - Modular API client implementations (v1/v2)

## Development Commands
- `bun dev` - Run TypeScript directly with hot reload
- `bun run build` - Compile TypeScript to [dist/](mdc:dist/)
- `bun test` - Run unit tests
- `bun run check` - Lint, format, typecheck, build, and test
- `bun run lint` - Run Biome linting
- `bun run format` - Format code with Biome

## Environment Configuration
Required in `.env`:
- `LODGIFY_API_KEY` - Your Lodgify API key (required)
- `LOG_LEVEL` - Logging level (error|warn|info|debug, default: info)
- `DEBUG_HTTP` - Set to "1" for verbose HTTP debugging (optional)
- `LODGIFY_READ_ONLY` - Set to "1" to disable all write operations (optional)

## Key Design Patterns
- **Registry Pattern**: Central registries manage all tools and resources
- **Closure-based DI**: Use `getClient()` pattern for dependency injection
- **Module Size**: Each module must be <250 lines for maintainability
- **Error Handling**: All errors go through centralized handler with sanitization
- **Type Safety**: Strong TypeScript types with Zod validation schemas

## File Organization
- **Source**: [src/](mdc:src/) - All TypeScript source code
- **Tests**: [tests/](mdc:tests/) - Bun tests mirroring src structure
- **Build Output**: [dist/](mdc:dist/) - Compiled JavaScript
- **Documentation**: [docs/](mdc:docs/) - Project documentation
- **Examples**: [examples/](mdc:examples/) - Usage examples
- **Scripts**: [scripts/](mdc:scripts/) - Build and utility scripts
description:
globs:
alwaysApply: true
---

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.