permit-fastmcp
llms.txt17 starsChanged 17 months agoApache-2.0View on GitHub
To ensure consistent logging across the project, use the logger setup provided in: permit_fastmcp/logger_config.py from permit_fastmcp.logger_config import setup_logging setup_logging() import logging logger = logging.getLogger("permit_fastmcp.<your_module>") Replace <your_module> with the relevant module or submodule name. This ensures all logs are formatted and handled consistently throughout the project. The middleware configuration can be customized using environment variables with the PERMIT_MCP_ prefix: Create a .env file in your project root: This project uses UV for dependency management. When adding new modules or dependencies: When…
- Reads credentials
- Installs packages
In this repositoryOne other file it gives its agents.
- .cursor/rules/basic.mdcCursor rule
The file
Show its rules and text
We split this llms.txt into the rules it gives an agent
13 rules. About 0 are common, 7 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Import and call the setup function at the top of your main script or module:
- Very specific: line 48
Create a .env file in your project root:
- Distinctive: line 92
When adding new Python modules or packages:
- Very specific: line 94
Add the dependency to pyproject.toml or use uv add
- Very specific: line 95
Run uv sync to install the new dependency
- Distinctive: line 96
Update any import statements in your code
- Distinctive: line 97
Test that the new module works correctly
- Distinctive: line 101
Always work within the virtual environment
- Very specific: line 102
Use uv add instead of pip install for consistency
- Very specific: line 103
Keep pyproject.toml and uv.lock in version control
- Very specific: line 104
Run uv sync after pulling changes to ensure dependencies are up to date
- Distinctive: line 105
Use environment variables for configuration in production
- Distinctive: line 106
Keep sensitive values like API keys in environment variables, not in code
≈ “Common” is an estimate: at least 1 in 5 of the 1,484 llms.txt 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.
Files
# Logging Instructions for permit-fastmcp
To ensure consistent logging across the project, use the logger setup provided in:
permit_fastmcp/logger_config.py
## How to use
1. Import and call the setup function at the top of your main script or module:
from permit_fastmcp.logger_config import setup_logging
setup_logging()
2. Get a logger in your module using:
import logging
logger = logging.getLogger("permit_fastmcp.<your_module>")
Replace `<your_module>` with the relevant module or submodule name.
This ensures all logs are formatted and handled consistently throughout the project.
## Configuration
### Environment Variables
The middleware configuration can be customized using environment variables with the `PERMIT_MCP_` prefix:
```bash
# Permit.io configuration
export PERMIT_MCP_PERMIT_PDP_URL="http://localhost:7766"
export PERMIT_MCP_PERMIT_API_KEY="your-api-key"
# Method configuration
export PERMIT_MCP_KNOWN_METHODS='["tools/list","tools/call"]'
export PERMIT_MCP_BYPASSED_METHODS='["initialize","ping"]'
# Prefix configuration
export PERMIT_MCP_ACTION_PREFIX="mcp_"
export PERMIT_MCP_RESOURCE_PREFIX="mcp_"
# Logging configuration
export PERMIT_MCP_ENABLE_AUDIT_LOGGING="true"
```
### Using .env file
Create a `.env` file in your project root:
```env
PERMIT_MCP_PERMIT_PDP_URL=http://localhost:7766
PERMIT_MCP_PERMIT_API_KEY=your-api-key
PERMIT_MCP_ENABLE_AUDIT_LOGGING=true
```
## Development Environment Setup
### Virtual Environment Management with UV
This project uses UV for dependency management. When adding new modules or dependencies:
1. **Activate the virtual environment:**
```bash
uv venv
source .venv/bin/activate # On macOS/Linux
# or
.venv\Scripts\activate # On Windows
```
2. **Add new dependencies:**
```bash
uv add <package-name>
```
3. **Install all dependencies:**
```bash
uv sync
```
4. **Update dependencies:**
```bash
uv update
```
5. **Run the project:**
```bash
uv run python main.py
```
### Adding New Modules
When adding new Python modules or packages:
1. Add the dependency to `pyproject.toml` or use `uv add`
2. Run `uv sync` to install the new dependency
3. Update any import statements in your code
4. Test that the new module works correctly
### Best Practices
- Always work within the virtual environment
- Use `uv add` instead of `pip install` for consistency
- Keep `pyproject.toml` and `uv.lock` in version control
- Run `uv sync` after pulling changes to ensure dependencies are up to date
- Use environment variables for configuration in production
- Keep sensitive values like API keys in environment variables, not in code 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
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.

