chohyerinn/filter-mcp-server

🧮 Data Science Tools🟢 Verified Active
0 Views
0 Installs

šŸ šŸ  - Compares approximate filter data structures (Bloom, Counting Bloom, Cuckoo, SuRF) via MCP

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "chohyerinn-filter-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "chohyerinn-filter-mcp-server"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

Approximate Filters using MCP Servers

Overview

This project compares several approximate filter data structures using MCP servers and LLM tool calls.

Approximate filters reduce memory usage by storing compressed summaries instead of full keys.
Because of this trade-off, some filters may return false positives or support limited operations.

The project compares:

  • Bloom Filter
  • Counting Bloom Filter
  • Cuckoo Filter
  • SuRF (Simplified Version)

An exact hash-set server is also included as a baseline for comparison.

Implemented MCP Servers

MCP ServerData StructureDescription
filter-naiveExact Set / Hash TableExact membership baseline
filter-bloomBloom FilterMemory-efficient approximate membership filter
filter-counting-bloomCounting Bloom FilterBloom Filter with deletion support
filter-cuckooCuckoo FilterFingerprint-based approximate filter
filter-surfSimplified SuRFApproximate prefix/range filter

Project Goal

The goal of this project is to compare how different filter structures behave under the same workload.

The comparison focuses on:

  • membership query accuracy
  • false positive rate
  • memory usage
  • query latency
  • insertion and deletion support
  • prefix and range query capability

All servers expose the same ADT-style interface through MCP tools so that they can be tested consistently.

Scenario

Search Keyword Dictionary Management

The servers simulate a keyword search system.

Examples:

  • search autocomplete
  • keyword lookup
  • blocked-word checking
  • dictionary membership testing

The same keyword dataset and queries are used across all filters to compare performance and behavior.

ADT

All MCP servers provide the following tools:

ToolDescription
build(items)Build filter from dataset
insert(x)Insert a key
contains(x)Membership query
delete(x)Delete a key if supported
range_query(lo, hi)Range query
prefix_query(prefix)Prefix query
memory_usage()Return estimated memory usage
false_positive_rate()Measure false positive rate

Theoretical / Qualitative Structure Comparison

StructureFalse PositivesDelete SupportPrefix/Range QueryMemory Efficiency
Exact SetNoYesYesLow
Bloom FilterYesNoNoVery High
Counting Bloom FilterYesYesNoHigh
Cuckoo FilterYesYesNoHigh
Simplified SuRFYesNoYesMedium

This table describes the expected qualitative behavior of each structure. It is not a measured benchmark result.

Benchmark Results

Measured results are available in docs/benchmark_results.md.

The benchmark uses fixed synthetic workloads from src/membership_filters/benchmark.py and compares all filters with the same build items and absent-query probes. It reports estimated memory from memory_usage(), measured false positive rate from false_positive_rate(), and average local contains() latency.

Run it locally:

PYTHONPATH=src python -m membership_filters.benchmark
$env:PYTHONPATH='src'; python -m membership_filters.benchmark

Run the smoke tests:

PYTHONPATH=src python -m unittest discover -s tests
$env:PYTHONPATH='src'; python -m unittest discover -s tests

Notes

  • filter-naive is included as the exact baseline.
  • The SuRF server is a simplified educational implementation, not a full LOUDS-based production SuRF.
  • The project focuses on comparison and experimentation rather than production optimization.

Example Claude Desktop MCP Configuration

{
  "mcpServers": {
    "filter-naive": {
      "command": "python",
      "args": ["src/filter_/filter_naive_server.py"]
    },
    "filter-bloom": {
      "command": "python",
      "args": ["src/filter_/filter_bloom_server.py"]
    },
    "filter-counting-bloom": {
      "command": "python",
      "args": ["src/filter_/filter_counting_bloom_server.py"]
    },
    "filter-cuckoo": {
      "command": "python",
      "args": ["src/filter_/filter_cuckoo_server.py"]
    },
    "filter-surf": {
      "command": "python",
      "args": ["src/filter_/filter_surf_server.py"]
    }
  }
}

System Flow

Claude / LLM
        ↓
MCP Tool Call
        ↓
mcp_server.py
        ↓
registry.py
        ↓
Selected Filter Class
        ↓
Bloom / Counting Bloom / Cuckoo / SuRF / Exact Set

Flow Description

  1. The LLM sends an MCP tool request.
  2. mcp_server.py exposes the common ADT-style tools.
  3. registry.py selects the requested filter implementation.
  4. The selected filter processes the query.
  5. The result is returned back through the MCP server.

This design allows all filters to be tested through the same interface and workload.

Repository Structure

src/
ā”œā”€ā”€ filter_/
│   ā”œā”€ā”€ filter_naive_server.py
│   ā”œā”€ā”€ filter_bloom_server.py
│   ā”œā”€ā”€ filter_counting_bloom_server.py
│   ā”œā”€ā”€ filter_cuckoo_server.py
│   └── filter_surf_server.py
│
└── membership_filters/
    ā”œā”€ā”€ base.py
    ā”œā”€ā”€ hashing.py
    ā”œā”€ā”€ mcp_server.py
    ā”œā”€ā”€ registry.py
    └── filters/

Related MCP Servers

98lukehall/renoun-mcp

šŸ ā˜ļø - Structural observability for AI conversations. Detects loops, stuck states, breakthroughs, and convergence across 17 channels without analyzing content.

🧮 Data Science Tools0 views
abhiphile/fermat-mcp

šŸ šŸ  šŸŽ 🪟 🐧 - The ultimate math engine unifying SymPy, NumPy & Matplotlib in one powerful server. Perfect for developers & researchers needing symbolic algebra, numerical computing, and data visualization.

🧮 Data Science Tools0 views
Archerkattri/mathlas

šŸ šŸ  - Airtight math for agents: 3.7M-theorem search, PSLQ constant ID, OEIS, real Lean kernel checks, applicability checklists. No LLM inside, no API key.

🧮 Data Science Tools0 views
arrismo/kaggle-mcp

šŸ ā˜ļø - Connects to Kaggle, ability to download and analyze datasets.

🧮 Data Science Tools0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Active

Recent health check succeeded.

Last checked: 7/28/2026, 9:07:01 PM

Unclaimed listing (imported or pending owner verification). Claim it →
ā˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.