Skip to main content
Glama

MCP Power - Knowledge Search Server

by wspotter

๐Ÿ” MCPower

Semantic Knowledge Search, Simplified

Transform your documents into searchable knowledge bases with FAISS vector embeddings

TypeScript Node.js Python Tests License

๐Ÿš€ Quick Start โ€ข ๐Ÿ“š Documentation โ€ข ๐Ÿ› Report Bug โ€ข ๐Ÿ’ก Request Feature


โœจ What is MCPower?

MCPower is a Model Context Protocol (MCP) server that provides powerful semantic search over your document collections. Drop in any folder of .txt or .md files, and get instant AI-powered search capabilities through a beautiful web interface or programmatic API.

Perfect for:

  • ๐Ÿ“š Documentation sites

  • ๐Ÿ—‚๏ธ Knowledge bases

  • ๐Ÿ’ฌ Chatbot context

  • ๐Ÿ” Research papers

  • ๐Ÿ“ Note collections


๐ŸŽฏ Features at a Glance

๐Ÿ–ฑ๏ธ Drag & Drop Interface

Just drop folders into the web console to create searchable datasets. No CLI commands needed!

โšก Lightning Fast

FAISS-powered vector search with <500ms response times. Search thousands of documents instantly.

๐Ÿง  Semantic Understanding

Uses sentence transformers for intelligent matching beyond keyword search.

๐Ÿ”Œ MCP Compatible

Works with Claude Desktop, VS Code, Cherry Studio, and any MCP client.

๐Ÿ“ฆ Zero Config

One-click launcher automatically sets up everything. Just run ./launch.sh.

๐ŸŽจ Beautiful UI

Modern, responsive web console with real-time stats and visual feedback.



๐Ÿš€ Quick Start

# Clone the repository git clone https://github.com/wspotter/mcpower.git cd mcpower # Run the launcher - it does everything! ./launch.sh

The web console opens automatically at http://127.0.0.1:4173 ๐ŸŽ‰

# Clone the repository git clone https://github.com/wspotter/mcpower.git cd mcpower # Double-click launch.bat or run: launch.bat

Your browser opens automatically to http://127.0.0.1:4173 ๐ŸŽ‰

๐Ÿ“ธ What You'll See


โœจ Features

  • Semantic Search: Search knowledge datasets using natural language queries

  • Interactive Web Console: Manage datasets with drag-and-drop interface

  • Multiple Datasets: Manage and search across multiple knowledge bases

  • MCP Compatible: Works with any MCP client (VS Code, Cherry Studio, etc.)

  • Fast & Reliable: FAISS-powered vector search with <500ms p95 latency

  • Graceful Degradation: Continues working even with invalid datasets

  • Comprehensive Logging: Structured JSON logs with detailed diagnostics


๐Ÿ—๏ธ How It Works

graph TD A[๐Ÿ“„ Your Documents] -->|Python Indexer| B[๐Ÿงฎ Embeddings] B -->|FAISS| C[๐Ÿ’พ Vector Database] C -->|TypeScript MCP Server| D[๐Ÿ”Œ MCP Protocol] D --> E1[VS Code Copilot] D --> E2[Cherry Studio] D --> E3[Any MCP Client] style A fill:#e3f2fd style B fill:#fff3e0 style C fill:#f3e5f5 style D fill:#e8f5e9 style E1 fill:#fce4ec style E2 fill:#fce4ec style E3 fill:#fce4ec

The Magic Behind MCPower

  1. ๐Ÿ“š Document Processing

    • Python reads your documents (txt, md, pdf)

    • Splits them into semantic chunks

    • Generates embeddings using sentence-transformers

  2. โšก Fast Vector Search

    • FAISS indexes embeddings for lightning-fast similarity search

    • Sub-500ms query latency even on large datasets

    • Efficient memory usage with optimized index structures

  3. ๐Ÿ”Œ MCP Integration

    • TypeScript server exposes MCP tools

    • Clients send queries via stdio protocol

    • Python bridge handles FAISS operations

    • Results returned as JSON with relevance scores


โš™๏ธ Installation

Prerequisites

  • Node.js 18+ and npm

  • Python 3.10+

  • Git

Automatic Setup (Recommended)

git clone https://github.com/wspotter/mcpower.git cd mcpower ./launch.sh # Does everything automatically!

The launcher will:

  • โœ… Create virtual environment

  • โœ… Install Python dependencies

  • โœ… Install Node.js dependencies

  • โœ… Configure environment variables

  • โœ… Start the web console

  • โœ… Open your browser

Manual Setup

1. Clone the repository

git clone https://github.com/wspotter/mcpower.git cd mcpower

2. Install Node.js dependencies

npm install

3. Create Python virtual environment

python3 -m venv .venv

4. Install Python dependencies

.venv/bin/pip install typer faiss-cpu sentence-transformers

5. Configure environment

cat > .env << EOF MCPOWER_PYTHON=$(pwd)/.venv/bin/python EOF

6. Build and run

npm run build npm run dev -- --datasets ./datasets

โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ execa (JSON over stdio) โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Python Bridge โ”‚ โ”‚ (Python) โ”‚ โ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ FAISS โ”‚ โ”‚ Vector search โ”‚ โ”‚ Index โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ Sentence โ”‚ โ”‚ Query encoding โ”‚ โ”‚Transformersโ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

## ๐Ÿ“ฆ Installation ### Prerequisites - **Node.js**: 18.x or higher - **Python**: 3.10 or higher - **npm**: 9.x or higher ### From Source ```bash # Clone the repository git clone https://github.com/yourusername/mcpower.git cd mcpower # Install dependencies npm install cd python && pip install -r requirements.txt && cd .. # Build npm run build # Optional: Link globally npm link

Verify Installation

npm run dev -- --version # Output: Starting MCP Knowledge Server v0.1.0...

โš™๏ธ Configuration

Command Line Options

npm run dev -- [options]

Options:

  • --datasets <path>: Path to datasets directory (default: ./datasets)

  • --log-level <level>: Log level: debug, info, warn, error (default: info)

  • --version: Show version information

Environment Variables

Create a .env file in the project root:

# Datasets directory path DATASETS_PATH=./datasets # Log level (debug, info, warn, error) LOG_LEVEL=info

๐Ÿ“š Dataset Management

Using the Web Console

The easiest way to create datasets is through the web console:

  1. Start the console: ./launch.sh

  2. Add a dataset:

    • Click Browse to open directory picker

    • Or drag & drop a folder into the input field

    • Or type the path manually

  3. Submit: Click "Create Dataset"

  4. Monitor: Watch real-time indexing progress

Dataset Structure

Each dataset has three components stored in datasets/<name>/:

datasets/ โ””โ”€โ”€ my-docs/ โ”œโ”€โ”€ config.json # Dataset configuration โ”œโ”€โ”€ index.faiss # FAISS vector index โ””โ”€โ”€ metadata.json # Chunk metadata and text

Manual Dataset Creation

# Index a directory of documents .venv/bin/python python/src/index.py index \ --source-path ./my-documents \ --dataset-name my-docs \ --output-dir ./datasets/my-docs # Supported file types: .txt, .md, .pdf

Configuration options:

--chunk-size 512 # Characters per chunk --chunk-overlap 50 # Overlap between chunks --model sentence-transformers/all-MiniLM-L6-v2

Dataset Operations

# List all datasets GET /api/datasets # Get dataset details GET /api/datasets/:name # Delete dataset DELETE /api/datasets/:name # Create dataset (via web console or API) POST /api/datasets { "name": "my-docs", "sourcePath": "/absolute/path/to/documents" }

โ””โ”€โ”€ your-dataset/ โ”œโ”€โ”€ manifest.json # Configuration โ”œโ”€โ”€ metadata.json # Document metadata โ””โ”€โ”€ index/ # FAISS index directory โ””โ”€โ”€ docs.index # FAISS index file

### Manifest Format `manifest.json`: ```json { "id": "your-dataset", "name": "Your Dataset Name", "description": "Description of your dataset", "index": "index", "metadata": "metadata.json", "defaultTopK": 5 }

Metadata Format

metadata.json:

[ { "id": "doc-1", "title": "Document Title", "path": "path/to/document.md", "content": "Full document content...", "snippet": "Short excerpt..." } ]

Creating a Dataset

See the sample dataset for a complete example.

To create embeddings from your documents, use a tool like:

๏ฟฝ MCP Integration

MCPower works with any MCP-compatible client. Here's how to connect it:

VS Code Copilot

Add to your VS Code settings.json:

{ "github.copilot.chat.codeGeneration.instructions": [ { "text": "Use the mcpower MCP server for knowledge search" } ], "mcp.servers": { "mcpower": { "command": "node", "args": ["/absolute/path/to/mcpower/dist/cli.js", "--datasets", "./datasets"], "env": { "MCPOWER_PYTHON": "/absolute/path/to/mcpower/.venv/bin/python" } } } }

Cherry Studio

Add to Cherry Studio's MCP configuration:

{ "mcpServers": { "mcpower": { "command": "node", "args": ["/absolute/path/to/mcpower/dist/cli.js", "--datasets", "./datasets"] } } }

Available Tools

๐Ÿ” knowledge.search

Search your knowledge bases using natural language.

{ dataset: string; // Dataset name (required) query: string; // Your search query (required) topK?: number; // Number of results (default: 5) }

Example:

{ "tool": "knowledge.search", "arguments": { "dataset": "my-docs", "query": "How do I configure authentication?", "topK": 3 } }

Response:

{ "results": [ { "score": 0.89, "title": "Authentication Guide", "path": "docs/auth.md", "snippet": "To configure authentication, set the AUTH_ENABLED=true..." } ] }

๐Ÿ“‹ knowledge.listDatasets

List all available datasets.

{} // No parameters

Response:

{ "datasets": [ { "id": "my-docs", "name": "My Documentation", "description": "Internal docs", "chunkCount": 1264, "defaultTopK": 5 } ], "metadata": { "total": 1, "ready": 1, "errors": 0 } }

๐Ÿ› ๏ธ Development

Project Structure

mcpower/ โ”œโ”€โ”€ src/ # TypeScript MCP server โ”‚ โ”œโ”€โ”€ cli.ts # Entry point โ”‚ โ”œโ”€โ”€ server.ts # MCP protocol handler โ”‚ โ”œโ”€โ”€ bridge/ # Python FAISS bridge โ”‚ โ”œโ”€โ”€ config/ # Dataset registry โ”‚ โ”œโ”€โ”€ store/ # Knowledge store cache โ”‚ โ””โ”€โ”€ tools/ # MCP tool implementations โ”œโ”€โ”€ python/src/ # Python indexer & search โ”‚ โ”œโ”€โ”€ index.py # CLI for indexing โ”‚ โ””โ”€โ”€ search.py # FAISS search operations โ”œโ”€โ”€ webapp/ # Web console โ”‚ โ”œโ”€โ”€ index.html # SPA interface โ”‚ โ”œโ”€โ”€ app.js # Frontend logic โ”‚ โ””โ”€โ”€ styles.css # Styling โ”œโ”€โ”€ tests/ # Test suites โ”‚ โ”œโ”€โ”€ unit/ # Unit tests โ”‚ โ””โ”€โ”€ integration/ # Integration tests โ””โ”€โ”€ datasets/ # Your knowledge bases โ””โ”€โ”€ sample-docs/ # Example dataset

Development Scripts

# Development mode (auto-reload) npm run dev -- --datasets ./datasets # Build TypeScript npm run build # Start web console npm run web # Run tests npm test # Run with coverage npm run test:coverage # Type checking & linting npm run lint

Creating a New Tool

  1. Define the tool in src/tools/yourTool.ts:

export const yourTool: Tool = { name: "knowledge.yourTool", description: "What your tool does", inputSchema: { type: "object", properties: { param: { type: "string", description: "Parameter description" } }, required: ["param"] } };
  1. Implement the handler in src/tools/handlers/yourTool.ts

  2. Register it in src/server.ts

  3. Add tests in tests/unit/tools/yourTool.test.ts


๐Ÿงช Testing

Quick Test

# Run all 86 tests npm test # Run with coverage report npm run test:coverage

Test Coverage

โœ… 86 tests passing across:

  • ๐Ÿ” 18 search edge cases (empty queries, special chars, large results)

  • ๐Ÿ› ๏ธ 15 search tool validations

  • ๐Ÿ“š 11 dataset registry operations

  • ๐Ÿ“‹ 9 listDatasets tool tests

  • ๐Ÿš€ 9 startup integration tests

  • ๐Ÿ’พ 8 knowledge store caching

  • โšก 6 performance benchmarks (<500ms p95)

  • ๐Ÿ”— 5+5 integration tests (search + listDatasets)

Integration Testing

# Test with real datasets ./test-search.sh # Test web console API ./test-web.sh

๐Ÿ› Troubleshooting

Error: Dataset not found: your-dataset

Solutions:

  • โœ… Verify dataset exists in datasets/ directory

  • โœ… Check config.json has correct name field

  • โœ… Restart server to reload dataset registry

  • โœ… Use web console to verify dataset list

Error: Python bridge command failed

Solutions:

  • โœ… Verify Python 3.10+ is installed: python3 --version

  • โœ… Check virtual environment: .venv/bin/python --version

  • โœ… Reinstall dependencies: .venv/bin/pip install -r python/requirements.txt

  • โœ… Test FAISS: .venv/bin/python -c "import faiss; print('OK')"

  • โœ… Check .env file has correct MCPOWER_PYTHON path

Issue: Queries taking >500ms

Solutions:

  • โœ… Check dataset size (>10k chunks may need optimization)

  • โœ… Verify FAISS index is properly trained

  • โœ… Reduce topK parameter (try 3-5 instead of 10+)

  • โœ… Consider using faster embedding model

  • โœ… Use GPU-accelerated FAISS for large datasets

Error: ERR_CONNECTION_REFUSED

Solutions:

  • โœ… Ensure web server is running: npm run web

  • โœ… Check port 4173 isn't blocked by firewall

  • โœ… Try accessing http://127.0.0.1:4173 directly

  • โœ… Check console logs for startup errors

Get detailed diagnostics:

npm run dev -- --log-level=debug --datasets ./datasets

This shows:

  • Dataset loading details

  • Python bridge communication

  • FAISS index operations

  • Search query execution

  • Error stack traces


๐Ÿค Contributing

We welcome contributions! Here's how to get started:

Quick Start

# Fork and clone git clone https://github.com/YOUR_USERNAME/mcpower.git cd mcpower # Create feature branch git checkout -b feature/amazing-feature # Install dependencies npm install .venv/bin/pip install -r python/requirements.txt # Make changes and test npm run build npm test # Commit with clear message git commit -m "feat: add amazing feature" # Push and create PR git push origin feature/amazing-feature

Areas We Need Help

  • ๐ŸŽจ UI/UX: Improve web console design

  • ๐Ÿ“š Documentation: Tutorials, examples, guides

  • ๐Ÿงช Testing: More test coverage, edge cases

  • ๐Ÿš€ Performance: Optimization, caching strategies

  • ๐Ÿ”Œ Integrations: New MCP clients, data sources

  • ๐Ÿ› Bug Fixes: See issues

Code Guidelines

  • Write tests for new features

  • Follow TypeScript/Python best practices

  • Update documentation for API changes

  • Use conventional commit messages

  • Keep PRs focused and atomic


๐Ÿ“„ License

MIT License - see LICENSE for details


๐Ÿ™ Acknowledgments

Built with amazing open-source tools:


โญ Star this repo if you find it useful!

Made with โค๏ธ by the MCPower team

๐Ÿ› Report Bug โ€ข โœจ Request Feature โ€ข ๐Ÿ“– Documentation

Look for error logs with:

  • manifestPath: Location of problematic manifest

  • errorType: Type of error (json_parse_error, file_not_found, validation_error)

  • error: Detailed error message

๐Ÿ“ License

ISC

๐Ÿค Contributing

Contributions welcome! Please read our contributing guidelines before submitting PRs.

๐Ÿ”— Links

๐Ÿ“Š Project Status

  • โœ… Phase 1-5: Complete (All user stories implemented)

  • ๐Ÿšง Phase 6: Polish & documentation (in progress)


Made with โค๏ธ for the MCP community

Deploy Server
A
security โ€“ no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wspotter/mcpower'

If you have feedback or need assistance with the MCP directory API, please join our Discord server