-
-
Notifications
You must be signed in to change notification settings - Fork 143
Fix/contacts search fix #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix/contacts search fix #49
Conversation
…mization - Add ContactCache class with TTL expiration and memory management - Implement cache-first phone search with direct JXA fallback - Add phone number normalization utility for better format handling - Auto-cache individual phone search results for future lookups - Performance improvements: 99.7% faster cached contact access, 10.6x faster phone search Features: * Configurable cache with TTL (10min default), memory limits (50MB), and cleanup * Cache-first strategy: instant cache hits, fallback to direct JXA search * Phone number normalization supports multiple formats (+1, international, local) * Automatic caching of successful phone searches for future instant lookups * Memory-efficient with LRU eviction and automatic cleanup
Made this one, because while promising tool, this MCP server fails to fulfill most of its purported tasks. Started out with fixing contacts - they are correctly retrieved now and there's a cache mechanism implemented. |
I have pulled your branch and it runs standalone in the terminal but when i put it in my client config I get an error
i found this about the error |
@CupOfGeo - thanks for the comment. What's your client? I did try running it in Cursor before pushing this branch and it worked, so I'm curious (should have probably checked in Claude Desktop as well tbh). Anyway, I'll look into it :) |
yes I'm using claud hmmmm i just tried it again and now it works ... idk might just need to be a restart on my side
|
This pull request introduces significant enhancements to the contacts module, including improved error handling, a new caching system, and input validation utilities. These changes aim to improve performance, user experience, and data integrity.
Error Handling Improvements
initServer()
to provide detailed troubleshooting steps for contacts access issues and error scenarios. [1] [2]Performance Optimization
ContactCache
class inutils/ContactCache.ts
to cache contact data with a configurable TTL, memory limits, and automatic cleanup, significantly improving performance by reducing redundant data loading.Input Validation
ValidationUtils
inutils/ValidationUtils.ts
to validate and sanitize contact names and phone numbers, ensuring input integrity and preventing potential issues like log injection or invalid data.Solves #47 and #35