Skip to main content
Glama
wspotter

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


โญ Spread the Word

If you find MCPower useful, help us grow the community!

โญ Star this repo to show your support!

Share MCPower: Twitter/X โ€ข LinkedIn โ€ข Reddit


๐Ÿ“Š Project Status

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

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


โœจ 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

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

โš™๏ธ 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"
}

๐Ÿ”Œ 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're actively looking for contributors! Check out our good first issues and help wanted labels.

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

We're especially looking for contributors in these areas:

  • ๐ŸŽจ 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:


โ“ Getting Help

Need assistance? We're here to help!


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

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

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

Available Tools

2 tools
knowledge.listDatasetsB

List all registered knowledge datasets available for searching

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions the tool lists datasets but doesn't disclose behavioral traits like whether this is a read-only operation, if there are rate limits, what format the results come in, or if authentication is required. The description is minimal and lacks essential operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that clearly states the tool's purpose without any wasted words. It's front-loaded with the core action and resource, making it highly efficient and easy to understand.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 0 parameters and no output schema, the description adequately covers the basic purpose. However, without annotations or output schema, it lacks details on behavior, return format, or error handling. For a simple listing tool, this is minimally viable but leaves gaps in operational understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, making it efficient. Baseline for 0 parameters is 4, as it avoids unnecessary detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('List') and resource ('knowledge datasets'), and specifies scope ('all registered' and 'available for searching'). However, it doesn't explicitly differentiate from its sibling tool 'knowledge.search' beyond implying this is a listing rather than searching operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through 'available for searching,' suggesting this tool should be used to discover datasets before performing searches. However, it doesn't provide explicit guidance on when to use this versus 'knowledge.search' or any prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

knowledge.searchC

Search a knowledge dataset for relevant documents using semantic similarity

ParametersJSON Schema
NameRequiredDescriptionDefault
datasetYesDataset ID to search (must be a registered dataset)
queryYesNatural language search query
topKNoNumber of results to return (defaults to dataset's defaultTopK)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the search method ('semantic similarity') but doesn't cover important aspects like whether this is a read-only operation, potential rate limits, authentication requirements, or what happens with invalid dataset IDs. The description is minimal and lacks behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - a single sentence that directly states the tool's purpose. There's zero wasted language, and it's front-loaded with the core functionality. Every word earns its place in this minimal description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with 3 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns (document matches, scores, metadata), how results are ranked, error conditions, or provide any context about the knowledge dataset system. The description leaves too many questions unanswered for effective tool use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain parameter interactions, provide examples, or clarify concepts like 'semantic similarity' in relation to the query parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Search a knowledge dataset for relevant documents using semantic similarity'. It specifies the verb ('search'), resource ('knowledge dataset'), and method ('semantic similarity'), but doesn't explicitly differentiate from its sibling tool 'knowledge.listDatasets' beyond their different functions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention the sibling tool 'knowledge.listDatasets' or any other search methods, nor does it specify prerequisites like needing a registered dataset ID before searching.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updates
    • First observedknowledge.listDatasets
    • First observedknowledge.search

TDQS

B3.2/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: one lists available datasets, and the other searches within them. There is no overlap or ambiguity between these functions, making it easy for an agent to select the correct tool based on the task.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern with the 'knowledge.' prefix: 'listDatasets' and 'search'. The naming is uniform and predictable, using camelCase consistently throughout the set.

Tool Count2/5

With only two tools, the server feels thin for a 'Knowledge Search Server' that might imply more operations like dataset management (e.g., create, update, delete) or advanced search options. The count is too low for the apparent scope, limiting functionality.

Completeness2/5

The toolset is severely incomplete for knowledge search operations. It lacks basic CRUD operations for datasets (e.g., create, update, delete) and other essential functions like document retrieval or metadata handling, which are likely needed in this domain.

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Latest Blog Posts

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