Cursor IDE's AI is powerful, but it struggles with calculations, date math, and validations. By adding TinyFn MCP tools, you give Cursor access to 500+ deterministic utilities that return accurate results every time. This guide walks you through the complete setup.
Prerequisites
Before you begin, make sure you have:
- Cursor IDE installed: Version 0.40 or later (MCP support required)
- TinyFn API key: Get your free API key if you don't have one
- 5 minutes: That's all the time you need for setup
Cursor MCP Configuration
Cursor uses a configuration file to manage MCP servers. The location depends on your operating system:
Configuration File Locations
| OS | Configuration Path |
|---|---|
| macOS | ~/.cursor/mcp.json |
| Windows | %APPDATA%\Cursor\mcp.json |
| Linux | ~/.config/cursor/mcp.json |
Alternative: Cursor Settings UI
You can also configure MCP through Cursor's settings:
- Open Cursor Settings (
Cmd/Ctrl + ,) - Search for "MCP" in the settings search bar
- Click "Edit in settings.json" or find the MCP configuration section
Adding TinyFn as MCP Server
Cursor IDE limits you to 40 MCP tools total across all servers. TinyFn's /mcp/all/ endpoint has 541 tools—way over the limit. You must use individual category servers instead. Choose small categories like /mcp/validate/ (~25 tools) or /mcp/hash/ (~15 tools).
Step 1: Create or Edit the Configuration File
Create the mcp.json file if it doesn't exist, or edit it if it does. For Cursor, use a single small category:
{
"mcpServers": {
"tinyfn-validate": {
"url": "https://api.tinyfn.io/mcp/validate/",
"headers": {
"X-API-Key": "your-api-key-here"
}
}
}
}
Replace your-api-key-here with your actual TinyFn API key.
Category Tool Counts (Cursor Compatibility)
| Category | URL | Tools | Cursor? |
|---|---|---|---|
| Password | /mcp/password/ | ~10 | ✅ |
| Hash | /mcp/hash/ | ~15 | ✅ |
| Encode | /mcp/encode/ | ~15 | ✅ |
| Validate | /mcp/validate/ | ~25 | ✅ |
| String | /mcp/string/ | ~20 | ✅ |
| Convert | /mcp/convert/ | ~40 | ⚠️ At limit |
| Math | /mcp/math/ | ~55 | ❌ Over |
| All | /mcp/all/ | 541 | ❌ Way over |
Step 2: Restart Cursor
After saving the configuration:
- Close Cursor completely
- Reopen Cursor
- The MCP tools will be loaded automatically
Optional: Use Specific Tool Categories
If you only need certain types of tools, you can use category-specific endpoints for faster loading:
{
"mcpServers": {
"tinyfn-math": {
"url": "https://api.tinyfn.io/mcp/math/",
"headers": {
"X-API-Key": "your-api-key-here"
}
},
"tinyfn-datetime": {
"url": "https://api.tinyfn.io/mcp/datetime/",
"headers": {
"X-API-Key": "your-api-key-here"
}
},
"tinyfn-validate": {
"url": "https://api.tinyfn.io/mcp/validate/",
"headers": {
"X-API-Key": "your-api-key-here"
}
}
}
}
Testing Tools in Cursor
Once configured, you can test that TinyFn tools are working in Cursor's chat:
Test 1: Math Calculation
You: What's 17.5% of 823.40?
// Cursor should call TinyFn math/percentage tool
// and respond with the accurate result: 144.10
Test 2: Date Calculation
You: What date is 15 business days from today?
// Cursor should call TinyFn datetime/add-business-days
// and respond with the correct future date
Test 3: Validation
You: Is "user@example" a valid email address?
// Cursor should call TinyFn validate/email
// and respond that it's invalid (missing TLD)
Verifying Tool Calls
When Cursor uses an MCP tool, you should see an indicator in the chat showing the tool was called. Look for:
- A tool call indicator or badge
- The tool name (e.g., "math/percentage")
- The response containing exact values rather than approximations
Productivity Tips
Tip 1: Use Tools in Code Generation
When generating code that needs calculations, ask Cursor to use the tools:
You: Generate a function that calculates compound interest.
Use TinyFn to verify the formula with sample values.
// Cursor will generate the function AND test it
// against TinyFn's finance/compound-interest tool
Tip 2: Validate Data Formats
When working with user input, have Cursor validate formats:
You: Check if these test email addresses are valid:
- user@domain.com
- invalid@
- test+tag@example.org
// Cursor calls validate/email for each and reports results
Tip 3: Generate Test Data
Use TinyFn tools to generate test data for your code:
You: Generate 5 valid UUIDs for my test fixtures
// Cursor calls generate/uuid five times
// and returns actual valid UUIDs
Tip 4: Convert Units During Development
Quick conversions without leaving your editor:
You: I have a constant of 1048576 bytes.
What's that in megabytes and mebibytes?
// Cursor calls convert/data-size and explains the difference
Tip 5: Date Math for Scheduling Code
When writing scheduling logic:
You: I need to calculate the next billing date, which is
the first business day of next month. What would
that be if today is January 30, 2025?
// Cursor uses datetime tools to find the correct date
Troubleshooting
Tools Not Loading
- Check the config path: Make sure mcp.json is in the correct location for your OS
- Validate JSON syntax: Use a JSON validator to check for syntax errors
- Verify API key: Test your API key directly with curl or a browser
- Restart Cursor: MCP config changes require a restart
API Key Errors
curl "https://api.tinyfn.io/v1/math/add?a=5&b=3" \
-H "X-API-Key: your-api-key-here"
# Should return: {"result": 8}
Cursor Not Using Tools
If Cursor gives approximations instead of using tools:
- Be explicit: "Use the TinyFn tools to calculate this"
- Check that MCP is enabled in Cursor settings
- Verify tools are loaded: ask Cursor "What TinyFn tools do you have access to?"
Rate Limiting
If you hit rate limits:
- Free tier: 100 requests/month
- Consider upgrading for higher limits
- Use category-specific endpoints to reduce unnecessary tool loading
Get Started with Cursor + TinyFn
Supercharge your Cursor IDE with 500+ deterministic tools.
Get Free API Key