Skip to main content
Glama
manohar135

Local Database Analytics MCP Server

by manohar135

Local Database Analytics MCP Server

Python 기반의 Model Context Protocol (MCP) 서버로, 로컬 SQLite 전자상거래 데이터베이스를 Claude 같은 AI 어시스턴트에 노출합니다. FastMCP, SQLAlchemy, Pandas로 구축되었습니다.

MCP란 무엇인가요? Model Context Protocol (Anthropic 제공)은 AI 모델이 로컬 도구와 데이터에 안전하게 상호작용할 수 있게 해줍니다. 이 서버는 Claude에게 데이터베이스에 대해 알려주어, Claude가 자연어만으로 데이터를 쿼리하고, 분석하고, 설명할 수 있게 합니다.


기능

도구 (총 11개)

도구

설명

list_tables

데이터베이스의 모든 테이블 나열

describe_table

특정 테이블의 스키마/컬럼 표시

get_sample_rows

테이블에서 N개의 샘플 행 반환

get_row_count

선택적 WHERE 필터로 행 수 계산

run_sql_query

안전한 SELECT 쿼리 실행

summarize_column

모든 컬럼의 통계: min/max/mean/nulls/unique

find_top_n

컬럼 기준 정렬된 상위 N개 행 반환

group_and_aggregate

GROUP BY + SUM/AVG/COUNT/MIN/MAX

detect_nulls

누락된 데이터가 있는 컬럼 찾기

compute_correlation

두 컬럼 간의 Pearson 상관계수 계산

time_series_summary

일/주/월 단위 데이터 집계

리소스

URI

설명

db://schema

전체 데이터베이스 스키마

db://tables/{name}

특정 테이블의 스키마

프롬프트

  • analyze_table — 모든 테이블의 전체 통계 분석

  • business_summary — 경영진 수준의 전자상거래 보고서

  • find_anomalies — 데이터 품질 및 이상치 감지


Related MCP server: SQLite MCP Server

데이터베이스 스키마

customers ──< orders ──< order_items >── products
  • customers: 이름, 이메일, 도시, 가입일이 포함된 레코드 15개

  • products: Electronics, Books, Sports, Home, Stationery 카테고리에 걸친 상품 15개

  • orders: 상태(completed/pending/cancelled)와 합계가 포함된 주문 60개

  • order_items: 주문과 상품을 연결하는 라인 항목


프로젝트 구조

MCP_Server/
├── server.py               # FastMCP server entry point
├── requirements.txt        # Python dependencies
├── database/
│   ├── engine.py           # SQLAlchemy DB connection
│   └── seed_data.py        # Seed script (creates + populates DB)
├── tools/
│   ├── query.py            # Core SQL tools (Phase 2)
│   └── analytics.py        # Analytics tools (Phase 3)
├── resources/
│   └── schema.py           # DB schema as MCP resources
├── prompts/
│   └── templates.py        # Pre-built analyst prompts
├── tests/
│   └── test_tools.py       # Unit tests
└── data/
    └── analytics.db        # SQLite database (auto-created)

시작하기

1. 저장소 클론하기

git clone https://github.com/manohar135/Local-Database-Analytics-MCP-Server.git
cd Local-Database-Analytics-MCP-Server

2. 가상 환경 생성 및 의존성 설치

python -m venv .venv
source .venv/bin/activate       # On Windows: .venv\Scripts\activate
pip install -r requirements.txt

3. 데이터베이스 시드

python database/seed_data.py

4. MCP Inspector 실행 (개발 모드)

fastmcp dev server.py

5. 테스트 실행

pytest tests/ -v

기술 스택

기술

역할

FastMCP

MCP 서버 프레임워크

SQLite

설정이 필요 없는 로컬 데이터베이스

SQLAlchemy

DB 엔진 및 ORM

Pandas

분석 및 집계

Pydantic

입력 검증

Pytest

단위 테스트


Claude 대화 예시

Claude Desktop에 연결한 후 다음을 시도해 보세요:

  • "어떤 테이블에 접근할 수 있나요?"

  • "판매 데이터에 대한 비즈니스 요약을 알려주세요"

  • "어떤 상품이 가장 많이 판매되고 있을까요?"

  • "orders 테이블에 데이터 품질 문제가 있나요?"

  • "지난 1년간의 월별 매출 추세를 보여 주세요"

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    Enables Claude to connect to and interact with SQLite, SQL Server, PostgreSQL, and MySQL databases through natural language. Supports executing queries, managing tables, exporting data, and storing business insights with authentication options including AWS IAM.
    853
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    Enables natural language interaction with local SQLite databases through Claude Desktop, translating plain English queries into SQL for data analysis and exploration.
    3
    MIT
  • A
    license
    -
    quality
    B
    maintenance
    Enables LLMs to interact with a SQLite e-commerce database via safe, typed MCP tools with read-only guards and auth-gated mutations, plus a Claude agent for answering business questions.
    1
    MIT
  • F
    license
    -
    quality
    C
    maintenance
    Enables natural-language querying of an e-commerce dataset by providing a LangChain agent that uses tools to execute parameterized SQL queries on a SQLite database, with short-term memory and Streamlit or Claude Desktop interfaces.

View all related MCP servers

Related MCP Connectors

  • Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…

  • Manage your Savanto store from your AI: catalog, content, prompts, and analytics, by chat.

  • Amazon brand, seller, niche & buy-box intelligence inside your own Claude or ChatGPT.

View all 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/manohar135/Local-Database-Analytics-MCP-Server'

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