mcp-odoo-panda / rules
Cursor rule8 starsChanged 19 months agoMITView on GitHub
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,183 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
Show its rules and text
We split this mcp-server-rules.mdc into the rules it gives an agent
80 rules. About 0 are common, 79 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈79
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
- Very specific: line 11
All MCP servers must inherit from the base Server class
- Distinctive: line 12
Must implement all abstract methods defined in the base class
- Distinctive: line 13
Must provide proper initialization with server name and version
- Distinctive: line 14
Must maintain protocol version compatibility
- Distinctive: line 15
Must follow MCP's client-server architecture where:
- Distinctive: line 23
Must support at least one of the following protocols:
- Distinctive: line 27
Must handle protocol-specific initialization and cleanup
- Distinctive: line 28
Must implement JSON-RPC 2.0 message format
- Distinctive: line 29
Must support stateful connections
- Distinctive: line 30
Must implement server and client capability negotiation
- Distinctive: line 33
Must declare server capabilities during initialization
- Distinctive: line 39
Must maintain capability list consistency
- Distinctive: line 40
Must support feature flags:
- Distinctive: line 50
Must implement proper resource URI parsing
- Distinctive: line 51
Must support resource listing and retrieval
- Distinctive: line 52
Must handle resource updates and notifications
- Distinctive: line 53
Must validate resource access permissions
- Distinctive: line 54
Must follow MCP's resource primitives:
- Distinctive: line 60
Must support standard resource types:
- Distinctive: line 65
Must provide proper MIME type handling
- Distinctive: line 66
Must implement resource caching when appropriate
- Distinctive: line 67
Must support Odoo-specific resources:
- Distinctive: line 76
Must implement tool registration and discovery
- Distinctive: line 77
Must validate tool parameters
- Distinctive: line 78
Must handle tool execution errors
- Distinctive: line 79
Must provide proper tool documentation
- Distinctive: line 80
Must follow MCP's tool primitives:
- Distinctive: line 86
Must implement rate limiting
- Distinctive: line 87
Must validate tool access permissions
- Distinctive: line 88
Must sanitize tool inputs
- Distinctive: line 89
Must handle sensitive data appropriately
- Distinctive: line 90
Must implement Odoo-specific security:
- Distinctive: line 99
Must implement prompt registration
- Distinctive: line 100
Must support prompt templates
- Distinctive: line 101
Must handle prompt arguments
- Distinctive: line 102
Must provide prompt documentation
- Distinctive: line 103
Must follow MCP's prompt primitives:
- Distinctive: line 109
Must support standard prompt types:
- Distinctive: line 115
Must support Odoo-specific prompts:
- Distinctive: line 124
Must support configuration via:
- Distinctive: line 129
Must validate configuration values
- Distinctive: line 130
Must provide default values for optional settings
- Distinctive: line 131
Must support Odoo configuration:
- Distinctive: line 145
Must support Odoo-specific settings:
- Distinctive: line 155
Must implement proper error handling for:
- Distinctive: line 161
Must provide meaningful error messages
- Distinctive: line 162
Must maintain error logging
- Distinctive: line 163
Must handle Odoo-specific errors:
- Distinctive: line 170
Must use standard error codes
- Distinctive: line 171
Must implement custom error types when needed
- Distinctive: line 172
Must handle both synchronous and asynchronous errors
- Distinctive: line 173
Must support Odoo error types:
- Distinctive: line 182
Must implement proper logging for:
- Distinctive: line 187
Must support multiple logging handlers
- Distinctive: line 188
Must allow log level configuration
- Distinctive: line 189
Must log Odoo-specific events:
- Distinctive: line 202
Must include Odoo-specific context:
- Distinctive: line 212
Must implement connection pooling
- Distinctive: line 213
Must handle connection timeouts
- Distinctive: line 214
Must implement proper cleanup
- Distinctive: line 215
Must support connection limits
- Distinctive: line 216
Must optimize Odoo connections:
- Distinctive: line 223
Must implement caching for:
- Distinctive: line 227
Must handle cache invalidation
- Distinctive: line 228
Must respect cache TTL settings
- Distinctive: line 229
Must implement Odoo-specific caching:
- Distinctive: line 238
Must implement proper authentication
- Distinctive: line 239
Must handle session management
- Distinctive: line 240
Must support multiple authentication methods
- Distinctive: line 241
Must implement proper token handling
- Distinctive: line 242
Must support Odoo authentication:
- Distinctive: line 249
Must implement access control
- Distinctive: line 251
Must handle role-based access
- Distinctive: line 252
Must implement proper security headers
- Distinctive: line 253
Must enforce Odoo security:
- Distinctive: line 262
Must include tests for:
- Distinctive: line 269
Must test Odoo integration:
- Distinctive: line 282
Must include Odoo-specific tests:
- Distinctive: line 297
Must document Odoo integration:
- Distinctive: line 310
Must include Odoo-specific documentation:
≈ “Common” is an estimate: at least 1 in 5 of the 6,668 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.
Files
---
description:
globs:
alwaysApply: false
---
# MCP Server Implementation Rules
## Core Architecture Rules
1. **Server Base Class**
- All MCP servers must inherit from the base `Server` class
- Must implement all abstract methods defined in the base class
- Must provide proper initialization with server name and version
- Must maintain protocol version compatibility
- Must follow MCP's client-server architecture where:
- MCP Hosts: Programs that want to access data through MCP
- MCP Clients: Protocol clients that maintain 1:1 connections with servers
- MCP Servers: Lightweight programs exposing specific capabilities
- Local Data Sources: Computer's files, databases, and services
- Remote Services: External systems available over the internet
2. **Protocol Support**
- Must support at least one of the following protocols:
- Stdio Protocol (default)
- Streamable HTTP Protocol
- Protocol selection must be configurable
- Must handle protocol-specific initialization and cleanup
- Must implement JSON-RPC 2.0 message format
- Must support stateful connections
- Must implement server and client capability negotiation
3. **Capabilities Declaration**
- Must declare server capabilities during initialization
- Must include:
- Resources support and templates
- Tools support and list
- Prompts support and list
- Experimental features (if any)
- Must maintain capability list consistency
- Must support feature flags:
- prompts.listChanged
- resources.subscribelistChanged
- tools.listChanged
- logging
- completion
## Resource Management Rules
1. **Resource Handling**
- Must implement proper resource URI parsing
- Must support resource listing and retrieval
- Must handle resource updates and notifications
- Must validate resource access permissions
- Must follow MCP's resource primitives:
- Application-controlled contextual data
- Managed by the client application
- Examples: File contents, API responses
2. **Resource Types**
- Must support standard resource types:
- Text resources
- Binary resources
- List resources
- Record resources
- Must provide proper MIME type handling
- Must implement resource caching when appropriate
- Must support Odoo-specific resources:
- Model records
- Binary fields
- Related records
- Computed fields
## Tool Management Rules
1. **Tool Implementation**
- Must implement tool registration and discovery
- Must validate tool parameters
- Must handle tool execution errors
- Must provide proper tool documentation
- Must follow MCP's tool primitives:
- Model-controlled functions
- Exposed to the LLM for actions
- Examples: API calls, data updates
2. **Tool Security**
- Must implement rate limiting
- Must validate tool access permissions
- Must sanitize tool inputs
- Must handle sensitive data appropriately
- Must implement Odoo-specific security:
- User authentication
- Record access rights
- Field access rights
- Method access rights
## Prompt Management Rules
1. **Prompt Handling**
- Must implement prompt registration
- Must support prompt templates
- Must handle prompt arguments
- Must provide prompt documentation
- Must follow MCP's prompt primitives:
- User-controlled interactive templates
- Invoked by user choice
- Examples: Slash commands, menu options
2. **Prompt Types**
- Must support standard prompt types:
- Analyze record prompts
- Create record prompts
- Update record prompts
- Search prompts
- Method call prompts
- Must support Odoo-specific prompts:
- Record creation workflows
- Record update workflows
- Record search workflows
- Method execution workflows
## Configuration Rules
1. **Configuration Management**
- Must support configuration via:
- YAML files
- JSON files
- Environment variables
- Command line arguments
- Must validate configuration values
- Must provide default values for optional settings
- Must support Odoo configuration:
- Database connection
- Authentication credentials
- API endpoints
- Protocol selection (XML-RPC/JSON-RPC)
2. **Required Configuration**
- Must include:
- Server name and version
- Protocol settings
- Connection settings
- Authentication settings
- Rate limiting settings
- Logging settings
- Must support Odoo-specific settings:
- Database name
- User credentials
- API version
- Connection timeout
- Retry policies
## Error Handling Rules
1. **Error Management**
- Must implement proper error handling for:
- Protocol errors
- Authentication errors
- Resource errors
- Tool execution errors
- Configuration errors
- Must provide meaningful error messages
- Must maintain error logging
- Must handle Odoo-specific errors:
- Connection errors
- Authentication failures
- Record access errors
- Method execution errors
2. **Error Types**
- Must use standard error codes
- Must implement custom error types when needed
- Must handle both synchronous and asynchronous errors
- Must support Odoo error types:
- AccessError
- ValidationError
- UserError
- MissingError
## Logging Rules
1. **Logging Implementation**
- Must implement proper logging for:
- Server initialization
- Request handling
- Error conditions
- Performance metrics
- Must support multiple logging handlers
- Must allow log level configuration
- Must log Odoo-specific events:
- API calls
- Record operations
- Method executions
- Authentication events
2. **Log Format**
- Must include:
- Timestamp
- Log level
- Component name
- Message
- Context information when relevant
- Must include Odoo-specific context:
- User ID
- Database name
- Model name
- Record ID
- Method name
## Performance Rules
1. **Connection Management**
- Must implement connection pooling
- Must handle connection timeouts
- Must implement proper cleanup
- Must support connection limits
- Must optimize Odoo connections:
- Connection reuse
- Batch operations
- Caching strategies
- Request batching
2. **Caching**
- Must implement caching for:
- Resources
- Authentication tokens
- Tool results
- Must handle cache invalidation
- Must respect cache TTL settings
- Must implement Odoo-specific caching:
- Record cache
- Field cache
- Method result cache
- Permission cache
## Security Rules
1. **Authentication**
- Must implement proper authentication
- Must handle session management
- Must support multiple authentication methods
- Must implement proper token handling
- Must support Odoo authentication:
- User/password authentication
- API key authentication
- Session management
- Token refresh
2. **Authorization**
- Must implement access control
- Must validate permissions
- Must handle role-based access
- Must implement proper security headers
- Must enforce Odoo security:
- Record access rules
- Field access rules
- Method access rules
- User group permissions
## Testing Rules
1. **Test Coverage**
- Must include tests for:
- Core functionality
- Protocol handling
- Resource management
- Tool execution
- Error handling
- Security features
- Must test Odoo integration:
- API connectivity
- Record operations
- Method execution
- Error handling
2. **Test Types**
- Must implement:
- Unit tests
- Integration tests
- Protocol tests
- Security tests
- Performance tests
- Must include Odoo-specific tests:
- API integration tests
- Record operation tests
- Permission tests
- Error handling tests
## Documentation Rules
1. **Code Documentation**
- Must include:
- Module documentation
- Class documentation
- Method documentation
- Type hints
- Examples
- Must document Odoo integration:
- API usage
- Record operations
- Method calls
- Error handling
2. **API Documentation**
- Must document:
- Available resources
- Available tools
- Available prompts
- Protocol specifications
- Error codes
- Must include Odoo-specific documentation:
- Model descriptions
- Field descriptions
- Method descriptions
- Permission requirements
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.

