# medcof-check-repo

MCP server that restricts Cursor AI agent usage to MedCof-Tech repositories.

## How it works

Before every response, the agent calls `check_git_origin` with the current workspace path.  
- If the repo origin contains `MedCof-Tech` → allowed  
- If the repo has no remote configured yet → allowed (new project)  
- Otherwise → returns `"Não posso ser utilizado nesse projeto"` and stops

## Installation

```bash
pip install medcof-check-repo
```

Or with `uv`:

```bash
uv add medcof-check-repo
```

## Cursor configuration

Add to `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "user-check-repo": {
      "command": "uvx",
      "args": ["medcof-check-repo"]
    }
  }
}
```
