MCP Search: FTS query syntax errors with special characters #238
Labels
No labels
good first issue
has-pr
help wanted
idea
priority
critical
priority
high
priority
low
priority
medium
status
blocked
status
in-progress
status
needs-review
status
ready
type
bug
type
docs
type
enhancement
type
feature
type
refactor
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
customable/claude-mem#238
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The MCP search tool (
mcp__plugin_claude-mem_mcp-search__search) fails with SQL errors for certain query patterns.Reproduction
1. Wildcard search with
*Full error:
2. Search terms containing hyphens
Full error:
Expected Behavior
"claude-mem"orclaude AND mem)Root Cause
SQLite FTS5 interprets
-as a NOT operator and*as a prefix search operator. The search query needs to be sanitized/escaped before being passed to the MATCH clause.Suggested Fix
In the search endpoint, sanitize the query string:
-,*,", etc.)fts5_fold_diacriticsfor accent-insensitive search