Metadata-Version: 2.4
Name: mcp-remlezrd
Version: 0.2.0
Summary: Model Context Protocol (MCP) server for AI agents
Project-URL: Documentation, https://gitlab.com/gp3t1/ai/mcp-remlezrd/-/blob/master/README.md
Project-URL: Homepage, https://gitlab.com/gp3t1/ai/mcp-remlezrd
Project-URL: Issues, https://gitlab.com/gp3t1/ai/mcp-remlezrd/-/issues
Project-URL: Repository, https://gitlab.com/gp3t1/ai/mcp-remlezrd
Author-email: gp3t1 <jeremy.petit@gmail.com>
Maintainer-email: gp3t1 <jeremy.petit@gmail.com>
License-File: LICENSE.md
Keywords: ai,context,mcp,server
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.13
Requires-Dist: dependency-injector[pydantic2]>=4.48.3
Requires-Dist: fastmcp>=3.2.4
Requires-Dist: marko>=2.2.2
Requires-Dist: mcp[cli]>=1.16.0
Requires-Dist: pydantic
Requires-Dist: pydantic-settings>=2.13.1
Requires-Dist: python-frontmatter>=1.1.0
Requires-Dist: python-json-logger>=4.1.0
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: sqlalchemy>=2.0.48
Requires-Dist: sqlmodel
Requires-Dist: tiktoken>=0.12.0
Requires-Dist: typer
Requires-Dist: watchfiles>=1.1.1
Description-Content-Type: text/markdown

# mcp-remlezrd

[![python](https://img.shields.io/badge/python-3.13%2B-blue)](https://www.python.org/)
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
[![latest](https://gitlab.com/gp3t1/ai/mcp-remlezrd/-/badges/release.svg?order_by=release_at&key_text=latest&key_width=55)](https://gitlab.com/gp3t1/ai/mcp-remlezrd/-/releases/permalink/latest)
[![coverage](https://gitlab.com/gp3t1/ai/mcp-remlezrd/badges/master/coverage.svg)](https://gitlab.com/gp3t1/ai/mcp-remlezrd)
[![license](https://img.shields.io/gitlab/license/75754026)](https://gitlab.com/gp3t1/ai/mcp-remlezrd/-/blob/master/LICENSE.md)

MCP server for AI agent collaboration through structured, shareable resources.

## Features

### 1. Agent Autonomy for Context Loading

The server empowers AI agents to self-discover and load team standards (development, design,
architecture, etc.) without hard-coding context:

- **Discovery tools** — Provide a searchable index of all project and shared standards so the agent
  knows what resources exist before reading them.
- **Native MCP resources** — Standards are exposed as MCP resources in Markdown format, directly
  accessible by the client.
- **Tool fallback** — If the MCP client does not support resources, the same content is available
  via dedicated read tools.

### 2. (Agent|Human)-Friendly Workflow

Designed for collaboration between developers and AI agents:

- **Human-first editing** — All resources are plain Markdown files with YAML frontmatter. Developers
  can read, edit, and version them with standard tools.
- **Agent consumption** — Agents read resources natively via MCP (or through tools when resource
  support is absent).
- **Agent-assisted maintenance** — Agents can create standards through composer tools, keeping
  conventions alive without manual boilerplate.

### 3. Modular Standards, Universal Access

- **Specialized resources** — Standards, procedures, and knowledge are stored in dedicated,
  maintainable files instead of monolithic `README.md` or `AGENTS.md` .
- **Universal format** — Uses the MCP protocol, avoiding IDE-specific formats such as `.cursorrules`
  , `.windsurfrules` , or `CLAUDE.md` .

### 4. Project-Only Resources (scoped to `cwd`)

| Resource | Status | Description |
|---|---|---|
| **ADR** | `experiment` | Architecture Decision Records — capture technical choices, trade-offs, and their rationale. |
| **Glossary** | `experiment` | Term definitions and domain vocabulary — ensure consistent language across the team. |

### 5. Shareable Resources (external directory)

| Resource | Status | Description |
|---|---|---|
| **Rule** | `experiment` | Coding standards and constraints — enforceable guidelines for agent behavior. |
| **Skill** | `experiment` | Actionable procedures and how-to guides — step-by-step recipes for common tasks. |

## Getting Started

### Starting RemLezrd MCP Server

Run with default settings:

```bash
uv run mcp-remlezrd
uv run mcp-remlezrd --no-shared
uv run mcp-remlezrd --disable-resource skill --disable-resource glossary
```

Run with custom paths and logging:

```bash
uv run mcp-remlezrd --log-file /tmp/remlezrd.log
uv run mcp-remlezrd --resource-as-tool
```

> **NOTE:** `--shared` controls whether the shared directory is mounted at startup (a physical
> storage concern). Use `--disable-resource` to hide a resource type entirely. Use the
> `REMLEZRD_ENABLE_COMPOSER` environment variable to control which compose tools (and their how-to
> guides) are exposed. By default, no composer is enabled — use `enable_composer` to activate them
> dynamically. These are independent mechanisms.

### Configure MCP Clients (IDE, Agents, etc)

- zed (does not support MCP resources directly)

```json settings.json
{
  ...
  "context_servers": {
    ...
    "remlezrd": {
      "enabled": true,
      "command": "uvx",
      "args": [ "mcp-remlezrd", "--resource-as-tool" ],
      "env": { }
    }
  }
}
```

- kimi-cli (does not support MCP resources directly)

```json mcp.json
{
  "mcpServers": {
    ...
    "remlezrd": {
      "command": "uvx",
      "args": [ "mcp-remlezrd", "--resource-as-tool" ],
      "env": { }
    }
  }
}
```

### CLI Options and Environment Variables

```txt
 Usage: mcp-remlezrd [OPTIONS]

 MCP RemLezrd server - Context manager for AI agents

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --shared              --no-shared                                         Enable/disable shared directory (Disable to use project-only   │
│                                                                           mode)                                                          │
│                                                                           [env var: REMLEZRD_ENABLE_SHARED_DIR]                          │
│                                                                           [default: shared]                                              │
│ --disable-resource                             [adr|glossary|rule|skill]  Resource type to disable (repeat for multiple)                 │
│                                                                           [env var: REMLEZRD_DISABLE_RESOURCES]                          │
│ --resource-as-tool    --no-resource-as-tool                               Only for CLIENT with NO 'MCP Resources' Support                │
│                                                                           [env var: REMLEZRD_RESOURCES_AS_TOOLS]                         │
│                                                                           [default: no-resource-as-tool]                                 │
│ --log-file                                     PATH                       Path to log file [env var: REMLEZRD_LOG_FILE]                  │
│ --help                                                                    Show this message and exit.                                    │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

 Other Environment Variables:
 🔹 REMLEZRD_LOG_LEVEL              Console handler log level  [default: 'WARNING']
 🔹 REMLEZRD_LOG_FILE_LEVEL         File handler log level     [default: 'INFO']
 🔹 REMLEZRD_DISABLE_RESOURCES      List of resource types completely disabled    [default: '[]']
 🔹 REMLEZRD_ENABLE_COMPOSER        List of resource types with composer enabled  [default: '[]']
 🔹 REMLEZRD_DISABLE_ONBOARDING     Disable onboarding components                 [default: 'False']
 🔹 REMLEZRD_OVERRIDE_CWD           Abs. path to Project dir
 🔹 REMLEZRD_SHARED_DIR             Abs. path to Shared dir    [default: '~/.local/share/remlezrd']
 🔹 REMLEZRD_SUBDIR_ADR             Subdir for ADRs            [default: 'docs/_adrs']
 🔹 REMLEZRD_SUBDIR_GLOSSARY        Subdir for Glossaries      [default: 'docs/_glossary']
 🔹 REMLEZRD_SUBDIR_RULE            Subdir for Rules           [default: 'docs/_rules']
 🔹 REMLEZRD_SUBDIR_SKILL           Subdir for Skills          [default: 'docs/_skills']
```
