Skip to content

Instantly share code, notes, and snippets.

@SoMaCoSF
Created July 23, 2025 18:21
Show Gist options
  • Save SoMaCoSF/30caaf9b5f1698ecad9b8ae212d0a14f to your computer and use it in GitHub Desktop.
Save SoMaCoSF/30caaf9b5f1698ecad9b8ae212d0a14f to your computer and use it in GitHub Desktop.
Everything MCP Server - Complete Implementation with Kiro IDE Integration
# Dependencies
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Build output
dist/
build/
# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
# IDE files
.vscode/
.idea/
*.swp
*.swo
# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Logs
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids/
*.pid
*.seed
*.pid.lock
# Coverage directory used by tools like istanbul
coverage/
*.lcov
# nyc test coverage
.nyc_output
# Temporary folders
tmp/
temp/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Stores VSCode versions used for testing VSCode extensions
.vscode-test

Everything MCP Server

A Model Context Protocol (MCP) server that integrates voidtools Everything search engine with AI assistants like Cursor, Kiro IDE, Claude, and other MCP-compatible tools. Provides lightning-fast file and folder search capabilities using Everything's powerful indexing.

Everything MCP Architecture

🚀 Features

  • Lightning Fast Search: Leverages Everything's instant search capabilities
  • Advanced Filtering: Filter by file types, size, date, and more
  • Multiple Sort Options: Sort by name, size, date, or path
  • Regex Support: Use regular expressions for complex searches
  • Service Health Checks: Verify Everything service status
  • Comprehensive Logging: Full trace logging for debugging
  • Easy Integration: Simple setup with Cursor, Kiro, and other MCP clients

📋 Prerequisites

  • Windows OS: Everything only runs on Windows
  • Everything Installed: Download from voidtools.com
  • Node.js 18+: Required for MCP server
  • es.exe Available: Command-line interface must be accessible

Everything Setup

  1. Install Everything from voidtools.com
  2. Ensure the Everything service is running
  3. Verify es.exe exists at: C:\Program Files\Everything\es.exe
  4. Test with: "C:\Program Files\Everything\es.exe" test

🛠️ Installation

Option 1: From Source

# Clone the repository
git clone https://github.com/yourusername/everything-mcp.git
cd everything-mcp

# Install dependencies
npm install

# Build the server
npm run build

Option 2: Global Install (Coming Soon)

npm install -g everything-mcp-server

🔧 Usage with AI Assistants

Cursor IDE

Add to your Cursor settings.json:

{
  "mcp": {
    "servers": {
      "everything-search": {
        "command": "node",
        "args": ["path/to/everything-mcp/dist/index.js"],
        "env": {
          "EVERYTHING_PATH": "C:\\Program Files\\Everything\\es.exe",
          "TRACE_DIRECTORY": "D:\\outputs\\traces"
        }
      }
    }
  }
}

Kiro IDE

Kiro is an agentic IDE that supports MCP servers for external tool integration. To add Everything search to Kiro:

  1. Open Kiro IDE and navigate to your project
  2. Create or edit your MCP configuration following Kiro's MCP documentation
  3. Add the Everything MCP server to your Kiro configuration:
{
  "mcpServers": {
    "everything-search": {
      "command": "node",
      "args": ["path/to/everything-mcp/dist/index.js"],
      "env": {
        "EVERYTHING_PATH": "C:\\Program Files\\Everything\\es.exe",
        "TRACE_DIRECTORY": "D:\\outputs\\traces"
      },
      "description": "Everything search integration for fast file/folder search"
    }
  }
}
  1. Restart Kiro to load the new MCP server
  2. Use Everything search through Kiro's agentic chat interface

Kiro-specific features:

  • Specs Integration: Use Everything search to find files when planning features with Kiro's spec-driven development
  • Hooks Automation: Set up automated file searches triggered by development events
  • Natural Language: Ask Kiro to "find all TypeScript files modified today" and it will use Everything search
  • Project Context: Kiro understands your project structure and can combine Everything search with its codebase knowledge

🔍 Available Tools

1. everything_search

Basic file and folder search with Everything syntax support.

Parameters:

  • query (required): Search query using Everything syntax
  • maxResults (optional): Maximum results to return (default: 50)
  • fileOnly (optional): Search files only (default: false)
  • folderOnly (optional): Search folders only (default: false)

2. everything_search_advanced

Advanced search with comprehensive filtering and sorting options.

Parameters:

  • query (required): Search query
  • maxResults (optional): Maximum results (default: 50)
  • sortBy (optional): Sort by 'name', 'size', 'date', or 'path'
  • fileTypes (optional): Array of file extensions to filter
  • includeHidden (optional): Include hidden files/folders
  • regex (optional): Use regex search
  • caseSensitive (optional): Case sensitive search

3. everything_check_service

Verify Everything service is running and accessible.

🔤 Everything Search Syntax

The server supports full Everything search syntax:

  • Wildcards: *.txt, project*
  • Extensions: ext:js, ext:pdf
  • Size filters: size:>1mb, size:<100kb
  • Date filters: dm:today, dm:thisweek
  • Path filters: path:documents, path:"c:\projects"
  • Boolean operators: AND, OR, NOT
  • Exact phrases: "exact phrase"

📝 Examples

Basic Search

{
  "query": "*.py",
  "maxResults": 100
}

Advanced Search

{
  "query": "dm:lastweek",
  "fileTypes": ["mp4", "mkv", "avi"],
  "sortBy": "size"
}

Development Files

{
  "query": "component",
  "fileTypes": ["jsx", "tsx"],
  "caseSensitive": false
}

🔧 Troubleshooting

Common Issues

  1. "es.exe not found"

    • Verify Everything is installed
    • Check path: C:\Program Files\Everything\es.exe
    • Try running Everything as administrator
  2. "No results returned"

    • Ensure Everything database is indexed
    • Check if Everything service is running
    • Use everything_check_service tool
  3. "Permission denied"

    • Run Everything as administrator
    • Check Windows permissions
    • Verify Everything service is started

Debug Mode

The server logs all operations to the trace directory:

  • Default Location: D:\outputs\traces\everything-mcp-{timestamp}
  • Files: Operation logs, development diary, error traces
  • Use for debugging search queries and server issues

🏗️ Architecture

The Everything MCP Server provides a bridge between AI assistants and the Everything search engine:

  1. MCP Client (Cursor/Kiro/Claude) sends search requests
  2. MCP Server validates and processes requests
  3. es.exe executes the actual search
  4. Results are parsed and returned as structured JSON
  5. Trace System logs all operations for debugging

🚀 Development

# Run in development mode
npm run dev

# Build for production
npm run build

# Start built server
npm start

File Structure

everything-mcp/
├── src/
│   └── index.ts              # Main server implementation
├── dist/                     # Built files (generated)
├── package.json              # Dependencies and scripts
├── tsconfig.json             # TypeScript configuration
├── architecture.svg          # Architecture diagram
└── README.md                 # This file

📄 License

MIT License - See LICENSE file for details.

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

🙏 Acknowledgments


Made with ❤️ for the Everything and AI community

Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"//": "MCP Configuration for Everything Search",
"//": "Configuration examples for Cursor IDE and Kiro IDE",
"mcp": {
"servers": {
"everything-search": {
"command": "node",
"args": [
"path/to/everything-mcp/dist/index.js"
],
"env": {
"EVERYTHING_PATH": "C:\\Program Files\\Everything\\es.exe",
"TRACE_DIRECTORY": "D:\\outputs\\traces"
},
"description": "Everything search integration for fast file/folder search"
}
}
},
"//": "Cursor IDE alternative configurations:",
"mcp_global_install": {
"servers": {
"everything-search": {
"command": "everything-mcp-server",
"args": [],
"env": {
"EVERYTHING_PATH": "C:\\Program Files\\Everything\\es.exe",
"TRACE_DIRECTORY": "D:\\outputs\\traces"
}
}
}
},
"mcp_custom_path": {
"servers": {
"everything-search": {
"command": "node",
"args": [
"C:\\path\\to\\everything-mcp\\dist\\index.js"
],
"env": {
"EVERYTHING_PATH": "C:\\CustomPath\\Everything\\es.exe",
"TRACE_DIRECTORY": "D:\\outputs\\traces"
}
}
}
},
"//": "Kiro IDE configurations:",
"//": "Add to your Kiro MCP configuration file",
"kiro_mcp_config": {
"mcpServers": {
"everything-search": {
"command": "node",
"args": [
"path/to/everything-mcp/dist/index.js"
],
"env": {
"EVERYTHING_PATH": "C:\\Program Files\\Everything\\es.exe",
"TRACE_DIRECTORY": "D:\\outputs\\traces"
},
"description": "Everything search integration for agentic development"
}
}
},
"kiro_global_install": {
"mcpServers": {
"everything-search": {
"command": "everything-mcp-server",
"args": [],
"env": {
"EVERYTHING_PATH": "C:\\Program Files\\Everything\\es.exe",
"TRACE_DIRECTORY": "D:\\outputs\\traces"
},
"description": "Everything search with global npm install"
}
}
}
}
#!/usr/bin/env node
/**
* MCP Server for Everything Search (es.exe)
*
* Provides file search capabilities using voidtools Everything search engine
* via the es.exe command line interface.
*
* @author Everything MCP Server
* @version 1.0.0
* @license MIT
*/
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import {
CallToolRequestSchema,
ErrorCode,
ListToolsRequestSchema,
McpError,
} from '@modelcontextprotocol/sdk/types.js';
import { spawn } from 'child_process';
import fs from 'fs/promises';
import path from 'path';
const EVERYTHING_PATH = process.env.EVERYTHING_PATH || 'C:\\Program Files\\Everything\\es.exe';
const TRACE_DIRECTORY = process.env.TRACE_DIRECTORY || 'D:\\outputs\\traces';
interface SearchResult {
path: string;
name: string;
size?: number;
modified?: string;
type: 'file' | 'folder';
}
class EverythingMCPServer {
private server: Server;
private traceDir: string;
constructor() {
this.server = new Server(
{
name: 'everything-search',
version: '1.0.0',
},
{
capabilities: {
tools: {},
},
}
);
this.traceDir = path.join(TRACE_DIRECTORY, `everything-mcp-${Date.now()}`);
this.setupHandlers();
this.initializeTrace();
}
private async initializeTrace(): Promise<void> {
try {
await fs.mkdir(this.traceDir, { recursive: true });
const diaryPath = path.join(this.traceDir, 'development_diary.md');
const timestamp = new Date().toISOString();
const diaryContent = `# Everything MCP Server Session
## ${timestamp}
- Initialized MCP server for Everything search
- Created trace directory: ${this.traceDir}
- Server capabilities: file search, filtering, sorting
- Target: es.exe integration for AI assistants
## Architecture
- MCP Server with stdio transport
- Direct es.exe command execution
- Result parsing and formatting
- Error handling and validation
## Tools Available
- everything_search: General file/folder search
- everything_search_advanced: Advanced search with filters
- everything_check_service: Verify Everything service status
`;
await fs.writeFile(diaryPath, diaryContent);
console.error(`Trace initialized: ${this.traceDir}`);
} catch (error) {
console.error('Failed to initialize trace:', error);
}
}
private async logTrace(operation: string, data: any): Promise<void> {
try {
const timestamp = new Date().toISOString();
const logPath = path.join(this.traceDir, `${operation}_${Date.now()}.json`);
const logData = {
timestamp,
operation,
data,
traceDirectory: this.traceDir
};
await fs.writeFile(logPath, JSON.stringify(logData, null, 2));
} catch (error) {
console.error('Failed to log trace:', error);
}
}
private setupHandlers(): void {
this.server.setRequestHandler(ListToolsRequestSchema, async () => {
await this.logTrace('list_tools', { timestamp: new Date().toISOString() });
return {
tools: [
{
name: 'everything_search',
description: 'Search for files and folders using Everything search engine',
inputSchema: {
type: 'object',
properties: {
query: {
type: 'string',
description: 'Search query (supports Everything syntax)',
},
maxResults: {
type: 'number',
description: 'Maximum number of results to return (default: 50)',
default: 50,
},
fileOnly: {
type: 'boolean',
description: 'Search files only (exclude folders)',
default: false,
},
folderOnly: {
type: 'boolean',
description: 'Search folders only (exclude files)',
default: false,
},
},
required: ['query'],
},
},
{
name: 'everything_search_advanced',
description: 'Advanced search with filtering and sorting options',
inputSchema: {
type: 'object',
properties: {
query: {
type: 'string',
description: 'Search query',
},
maxResults: {
type: 'number',
description: 'Maximum results (default: 50)',
default: 50,
},
sortBy: {
type: 'string',
enum: ['name', 'size', 'date', 'path'],
description: 'Sort results by field',
default: 'name',
},
fileTypes: {
type: 'array',
items: { type: 'string' },
description: 'Filter by file extensions (e.g., ["js", "ts", "md"])',
},
includeHidden: {
type: 'boolean',
description: 'Include hidden files/folders',
default: false,
},
regex: {
type: 'boolean',
description: 'Use regex search',
default: false,
},
caseSensitive: {
type: 'boolean',
description: 'Case sensitive search',
default: false,
},
},
required: ['query'],
},
},
{
name: 'everything_check_service',
description: 'Check if Everything service is running and accessible',
inputSchema: {
type: 'object',
properties: {},
},
},
],
};
});
this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
await this.logTrace('call_tool', {
tool: request.params.name,
arguments: request.params.arguments,
});
switch (request.params.name) {
case 'everything_search':
return await this.handleSearch(request.params.arguments);
case 'everything_search_advanced':
return await this.handleAdvancedSearch(request.params.arguments);
case 'everything_check_service':
return await this.handleServiceCheck();
default:
throw new McpError(
ErrorCode.MethodNotFound,
`Unknown tool: ${request.params.name}`
);
}
});
}
private async executeEverything(args: string[]): Promise<string> {
return new Promise((resolve, reject) => {
const process = spawn(EVERYTHING_PATH, args, {
stdio: ['pipe', 'pipe', 'pipe'],
shell: true,
});
let stdout = '';
let stderr = '';
process.stdout.on('data', (data) => {
stdout += data.toString();
});
process.stderr.on('data', (data) => {
stderr += data.toString();
});
process.on('close', (code) => {
if (code === 0) {
resolve(stdout);
} else {
reject(new Error(`es.exe exited with code ${code}: ${stderr}`));
}
});
process.on('error', (error) => {
reject(new Error(`Failed to execute es.exe: ${error.message}`));
});
});
}
private async handleSearch(args: any) {
try {
const { query, maxResults = 50, fileOnly = false, folderOnly = false } = args;
const esArgs = ['-n', maxResults.toString()];
if (fileOnly) esArgs.push('-file');
if (folderOnly) esArgs.push('-folder');
esArgs.push(query);
const output = await this.executeEverything(esArgs);
const results = this.parseSearchResults(output);
await this.logTrace('search_results', {
query,
resultCount: results.length,
args: esArgs,
});
return {
content: [
{
type: 'text',
text: JSON.stringify({
query,
resultCount: results.length,
results: results.slice(0, maxResults),
}, null, 2),
},
],
};
} catch (error) {
await this.logTrace('search_error', { error: error.message });
throw new McpError(ErrorCode.InternalError, `Search failed: ${error.message}`);
}
}
private async handleAdvancedSearch(args: any) {
try {
const {
query,
maxResults = 50,
sortBy = 'name',
fileTypes = [],
includeHidden = false,
regex = false,
caseSensitive = false,
} = args;
const esArgs = ['-n', maxResults.toString()];
// Sort options
switch (sortBy) {
case 'size': esArgs.push('-sort', 'size'); break;
case 'date': esArgs.push('-sort', 'dm'); break;
case 'path': esArgs.push('-sort', 'path'); break;
default: esArgs.push('-sort', 'name'); break;
}
// Search options
if (regex) esArgs.push('-regex');
if (caseSensitive) esArgs.push('-case');
if (!includeHidden) esArgs.push('-no-hidden');
// Build query with file type filters
let finalQuery = query;
if (fileTypes.length > 0) {
const extensions = fileTypes.map(ext => `ext:${ext}`).join(' | ');
finalQuery = `(${extensions}) ${query}`;
}
esArgs.push(finalQuery);
const output = await this.executeEverything(esArgs);
const results = this.parseSearchResults(output);
await this.logTrace('advanced_search_results', {
query: finalQuery,
options: { sortBy, fileTypes, includeHidden, regex, caseSensitive },
resultCount: results.length,
});
return {
content: [
{
type: 'text',
text: JSON.stringify({
query: finalQuery,
options: { sortBy, fileTypes, includeHidden, regex, caseSensitive },
resultCount: results.length,
results: results.slice(0, maxResults),
}, null, 2),
},
],
};
} catch (error) {
await this.logTrace('advanced_search_error', { error: error.message });
throw new McpError(ErrorCode.InternalError, `Advanced search failed: ${error.message}`);
}
}
private async handleServiceCheck() {
try {
// Test with a simple query
const output = await this.executeEverything(['-n', '1', 'test']);
await this.logTrace('service_check', {
status: 'running',
everythingPath: EVERYTHING_PATH,
});
return {
content: [
{
type: 'text',
text: JSON.stringify({
status: 'running',
everythingPath: EVERYTHING_PATH,
message: 'Everything service is accessible and responding',
}, null, 2),
},
],
};
} catch (error) {
await this.logTrace('service_check_error', { error: error.message });
return {
content: [
{
type: 'text',
text: JSON.stringify({
status: 'error',
everythingPath: EVERYTHING_PATH,
message: `Everything service check failed: ${error.message}`,
troubleshooting: [
'Ensure Everything is installed and running',
'Check if es.exe exists at the specified path',
'Verify Everything service is started',
'Run Everything as administrator if needed',
],
}, null, 2),
},
],
};
}
}
private parseSearchResults(output: string): SearchResult[] {
const lines = output.trim().split('\n').filter(line => line.trim());
return lines.map(line => {
const fullPath = line.trim();
const name = path.basename(fullPath);
const isDirectory = !path.extname(fullPath);
return {
path: fullPath,
name,
type: isDirectory ? 'folder' : 'file',
};
});
}
async run(): Promise<void> {
const transport = new StdioServerTransport();
await this.server.connect(transport);
console.error('Everything MCP Server running on stdio');
console.error(`Trace directory: ${this.traceDir}`);
}
}
// Start the server
const server = new EverythingMCPServer();
server.run().catch(console.error);
MIT License
Copyright (c) 2025 Everything MCP Server Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
{
"name": "everything-mcp-server",
"version": "1.0.0",
"description": "MCP Server for voidtools Everything search integration with AI assistants",
"type": "module",
"main": "dist/index.js",
"bin": {
"everything-mcp-server": "dist/index.js"
},
"scripts": {
"build": "tsc",
"dev": "tsx src/index.ts",
"start": "node dist/index.js",
"prepare": "npm run build"
},
"keywords": [
"mcp",
"everything",
"search",
"files",
"cursor",
"ai",
"model-context-protocol",
"voidtools"
],
"author": "Everything MCP Server Contributors",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/yourusername/everything-mcp.git"
},
"bugs": {
"url": "https://github.com/yourusername/everything-mcp/issues"
},
"homepage": "https://github.com/yourusername/everything-mcp#readme",
"dependencies": {
"@modelcontextprotocol/sdk": "^0.4.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"tsx": "^4.0.0",
"typescript": "^5.0.0"
},
"engines": {
"node": ">=18.0.0"
},
"os": [
"win32"
]
}
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"allowJs": true,
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment