MCP server that converts text files into searchable Model Context Protocol servers. Supports uploading files or remote URLs with full-text search capabilities.
txt2mcp provides a single search tool with a clear verb-based name ('search') and reasonable description. The tool has a properly typed input schema using Zod with a string query parameter and numeric k parameter, both with descriptions. However, the server lacks several key quality patterns: no pagination support despite potentially returning many results, no explicit output schema documentation, limited error handling guidance, no tool annotations for read-only operations, and minimal parameter constraints. The description is adequate (92 characters) but could be more specific about use cases and limitations. Overall, this is a functional but sparse implementation that follows basic patterns but misses production-grade refinements.
Token efficient search through the text content using Orama full-text search
No pagination support despite potentially returning unbounded search results. The k parameter caps individual requests, but the tool rebuilds the search index on every call (inefficient) and has no cursor/offset mechanism for iterating large result sets.
Output schema is inferred from the code (formatResults returns plain text wrapped in MCP content type), but not explicitly documented in tool description or schema definition. LLMs cannot know the structure or plan downstream actions reliably.
Tool lacks readOnlyHint annotation despite being a read-only operation. Modern MCP spec (2026-07-28) supports tool annotations to signal idempotency and safety to clients, but this server does not use them.
Parameter 'k' has no min/max constraints documented. The description says 'Number of results to return' but does not specify valid range (e.g., 1-100). LLMs may pass absurd values.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 56 | 2026-07-28+ | v2 |
| 2026-03-09 | D | 52 | - | v1 |
Error handling lacks recovery guidance. If no content is loaded, the tool returns a generic message ('No content available') but does not tell the LLM how to recover (e.g., 'Upload a document first') or what prerequisites exist.
Search index is rebuilt on every call to the tool (buildSearchIndex is called inside the handler). This is extremely inefficient and suggests the stateful initialization pattern should be used or the index should be cached. The current approach defeats the efficiency claim ('Token efficient search').