Enterprise Data MCP Server
엔터프라이즈 데이터 에이전트 🗄️
Groq LLM 도구 호출과 로컬 SQLite 데이터베이스로 구동되며, Streamlit 프론트엔드와 Model Context Protocol (MCP) 서버 백엔드를 갖춘 엔터프라이즈 직원 데이터베이스용 자연어 인터페이스입니다.
아키텍처
flowchart TD
%% Styling
classDef client fill:#2d3748,stroke:#94a3b8,stroke-width:1px,color:#f8fafc,rx:10px
classDef core fill:#0f172a,stroke:#3b82f6,stroke-width:2px,color:#eff6ff,rx:6px
classDef db fill:#064e3b,stroke:#10b981,stroke-width:2px,color:#ecfdf5,rx:6px
classDef ai fill:#312e81,stroke:#8b5cf6,stroke-width:2px,color:#eef2ff,rx:6px
%% Nodes
User(["👤 User Browser"]):::client
ExtAI(["🤖 MCP Client (Claude, Cursor)"]):::client
App["⚡ Streamlit App"]:::core
Server["🔌 MCP Server"]:::core
DBLayer["⚙️ Shared DB Layer"]:::core
Groq{"🧠 Groq LLM"}:::ai
SQLite[("💾 SQLite Database")]:::db
%% Connections
User <-->|"Chat Interface"| App
App <-->|"Prompts & Tools"| Groq
App -->|"Execute Tools"| DBLayer
ExtAI <-->|"MCP / stdio"| Server
Server -->|"Execute Tools"| DBLayer
DBLayer <-->|"SQL Operations"| SQLiteRelated MCP server: OCP AI Custom HR MCP Server
빠른 시작
1. 사전 요구 사항
Python 3.11+
2. 복제 및 설정
git clone <your-repo-url>
cd mcp_project
# Create and activate a virtual environment
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # macOS/Linux
# Install dependencies
pip install -r requirements.txt3. 환경 구성
프로젝트 루트(F:\PROJECTS\MCP\.env)에 .env 파일을 생성합니다:
GROQ_API_KEY=gsk_your_key_here
GROQ_MODEL=llama-3.3-70b-versatile # optional, this is the default4. 데이터베이스 초기화
# From the project root (F:\PROJECTS\MCP\)
sqlite3 enterprise_data.db < schema.sql5. 앱 실행
# From F:\PROJECTS\MCP\
streamlit run mcp_project/app.py브라우저에서 http://localhost:8501을 엽니다.
사용 가능한 도구
LLM은 사용자의 쿼리에 따라 다음 도구를 자동으로 호출할 수 있습니다:
도구 | 설명 |
| 모든 활성 사용자와 그들의 역할 나열 |
| 새 사용자 추가 (이름 + 역할) |
| 이름으로 활성 사용자 비활성화 |
| 전체, 활성 및 비활성 사용자 수 가져오기 |
| 이름 조각으로 사용자 검색 |
예시 쿼리
"현재 활성 사용자는 누구인가요?"
"Jane Doe를 관리자로 추가해줘"
"총 사용자가 몇 명인가요?"
"Alice라는 이름의 사용자를 검색해줘"
"Bob Jones를 비활성화해줘"
"사용자 통계를 보여줘"
MCP 서버 실행 (독립형)
server.py는 Model Context Protocol을 통해 동일한 도구를 노출합니다. 로컬 stdio 연결과 HTTP 기반 sse 전송을 모두 지원합니다!
현재 노출되는 항목:
도구: DB 쿼리 및 업데이트 작업
리소스: MCP를 통해
schema.sql노출프롬프트:
hr-assistant와 같이 미리 구성된 프롬프트 제공
AI 데스크톱 앱(Claude Desktop / Cursor 등)에서 로컬로 실행하려면:
python mcp_project/server.py --transport stdio포트 8000에서 HTTP SSE 서버로 실행하려면:
python mcp_project/server.py --transport sse --port 8000프로젝트 구조
F:\PROJECTS\MCP\
├── .env # ← API key (never commit this!)
├── .gitignore
├── requirements.txt
├── schema.sql # DB schema — use to recreate the database
├── enterprise_data.db # SQLite database (gitignored)
└── mcp_project\
├── app.py # Streamlit frontend
├── server.py # MCP stdio server
└── db.py # Shared database access layer보안 참고 사항
.env파일을 절대 커밋하지 마십시오..gitignore에 제외되어 있습니다.enterprise_data.db를 절대 커밋하지 마십시오.schema.sql을 사용하여 재생성하십시오.Groq API 키가 노출된 경우 console.groq.com에서 키를 교체하십시오.
This server cannot be deployed
Maintenance
Related MCP Connectors
- mcpOAuthcom.gibsonai
GibsonAI MCP server: manage your databases with natural language
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
- mcp-serverOAuthio.klokin
MCP server exposing klokin time-tracking operations (employees, time entries, stores) to AI clients.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn open-source MCP server that imports HR CSV data into an in-memory SQLite database for structured querying and metadata retrieval. It enables users to perform read-only SQL queries and structured searches on employee data through natural language.MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server for interacting with an HR database, enabling querying employee data and HR operations via natural language.-
- FlicenseNot gradedqualityDmaintenanceA comprehensive MCP server that enables database operations, schema management, and statistics via natural language through SQL queries and resources.18 npm-
- FlicenseNot gradedqualityDmaintenanceMCP server for managing users in PostgreSQL, enabling CRUD operations and search via natural language commands.-