Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

filter-mcp-server MCP server](https://glama.ai/mcp/servers/chohyerinn/filter-mcp-server/badges/score.svg)](https://glama.ai/mcp/servers/chohyerinn/filter-mcp-server) 🐍 🏠 - Compares approximate filter data structures (Bloom, Counting Bloom, Cuckoo, SuRF)...

README.md

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 Server | Data Structure | Description | |---|---|---| | filter-naive | Exact Set / Hash Table | Exact membership baseline | | filter-bloom | Bloom Filter | Memory-efficient approximate membership filter | | filter-counting-bloom | Counting Bloom Filter | Bloom Filter with deletion support | | filter-cuckoo | Cuckoo Filter | Fingerprint-based approximate filter | | filter-surf | Simplified SuRF | Approximate 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:

| Tool | Description | |---|---| | 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

| Structure | False Positives | Delete Support | Prefix/Range Query | Memory Efficiency | |---|---|---|---|---| | Exact Set | No | Yes | Yes | Low | | Bloom Filter | Yes | No | No | Very High | | Counting Bloom Filter | Yes | Yes | No | High | | Cuckoo Filter | Yes | Yes | No | High | | Simplified SuRF | Yes | No | Yes | Medium |

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/

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use Other servers.