todo-mcp / rules
Cursor rule2 starsChanged 18 months agoMITView on GitHub
@src/index.ts
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 1,533 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.
In this repository6 other files it gives its agents.
- .cursor/rules/database-patterns.mdcCursor rule
- .cursor/rules/development-workflow.mdcCursor rule
- .cursor/rules/pr-automation.mdcCursor rule
- .cursor/rules/README.mdCursor rule
- .cursor/rules/release-management.mdcCursor rule
- .cursor/rules/testing-standards.mdcCursor rule
The file
We split this mcp-development.mdc into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
When adding new MCP tools:
- Distinctive: line 22
Use Zod schemas for all parameters
- Distinctive: line 28
Always return structured responses
- Distinctive: line 30
Use consistent error handling
- Distinctive: line 40
Use camelCase for tool names
- Very specific: line 41
Start with verb: getTasks, createList, completeTask
- Very specific: line 46
Use formatRelativeTime() for timestamps
- Distinctive: line 56
Test edge cases (empty results, missing data)
- Distinctive: line 61
Use stdio transport for Claude integration
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 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: true
---
# MCP Development Patterns
## Tool Definition Structure
When adding new MCP tools:
1. **Tool Registration**:
```typescript
server.tool(
"toolName",
"Clear description of what this tool does",
{ /* Zod schema for parameters */ },
async (params) => { /* implementation */ }
);
```
2. **Parameter Validation**:
- Use Zod schemas for all parameters
- Provide clear descriptions for each parameter
- Include validation constraints (min/max length, etc.)
- Set sensible defaults where appropriate
3. **Response Format**:
- Always return structured responses
- Include metadata when helpful
- Use consistent error handling
- Format dates with relative timestamps
## Error Handling Patterns
- Throw descriptive errors for invalid inputs
- Include available options in error messages
- Handle database connection failures gracefully
- Validate foreign key relationships
## Tool Naming Conventions
- Use camelCase for tool names
- Start with verb: `getTasks`, `createList`, `completeTask`
- Be specific about what the tool does
- Match the function to the tool name
## Response Formatting
- Use `formatRelativeTime()` for timestamps
- Sort results consistently (priority first, then date)
- Include relevant metadata in responses
- Structure JSON responses with proper nesting
## Testing MCP Tools
- Test parameter validation
- Test error scenarios
- Test database interactions
- Verify response formats
- Test edge cases (empty results, missing data)
## MCP Server Configuration
- Set proper server name and version
- Initialize database before starting server
- Use stdio transport for Claude integration
- Include proper metadata in responses
@src/index.ts
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.

