Skip to main content
Glama
robinafaruqia

ai-backend-performance-mcp

ai-backend-performance-mcp

Node.js 백엔드 성능 문제를 위한 정적 분석 MCP 서버입니다. AI 에이전트가 코드를 수정하지 않고도 프로젝트에서 데이터베이스 쿼리 안티패턴, 비동기 병목, 커넥션 풀링 실수, 의존성 위생 문제를 검사할 수 있습니다.

이 프로젝트를 만든 이유

백엔드 성능 문제는 흔히 눈에 띄지 않는 곳에 숨어 있습니다. 루프 안의 N+1 쿼리, 요청마다 생성되는 클라이언트, 병렬로 실행될 수 있는 순차 await, 또는 package.json에 잘못 분류된 의존성 같은 것들입니다. 이 MCP 서버는 이러한 패턴을 AI 코딩 어시스턴트가 추론할 수 있는 구조화된 증거 기반 결과로 노출합니다.

제공 기능

  • JavaScript/TypeScript 소스 파일에 대한 읽기 전용 정적 분석

  • 일반적인 백엔드 성능 범주를 다루는 6가지 집중형 MCP 도구

  • 심각도, 신뢰도, 코드 스니펫, 권장 사항을 포함한 구조화된 결과

  • 확정된 증거와 잠재적 문제를 구분

제공하지 않는 기능

  • 애플리케이션 또는 저장소 코드 실행

  • 파일 수정, 패키지 설치, 인덱스 변경

  • 프로파일링, 부하 테스트, 데이터베이스 EXPLAIN 분석 대체

Related MCP server: DepHealth MCP

아키텍처

flowchart TD
  Client[MCP Client / AI Agent]
  Server[MCP Server]
  Tools[MCP Tools]
  Engine[Analysis Engine]
  Analyzers[Individual Analyzers]
  Findings[Structured Findings]

  Client --> Server
  Server --> Tools
  Tools --> Engine
  Engine --> Analyzers
  Analyzers --> Findings
  Findings --> Tools
  Tools --> Server
  Server --> Client

레이어 세부 사항은 docs/architecture.md를 참조하세요.

분석기

분석기

감지 항목

데이터베이스 쿼리

N+1 패턴, 무제한 find/query

MongoDB 인덱스

일치하는 createIndex가 없는 필터/정렬 필드

비동기 패턴

루프 안의 await, 순차 await, 차단 동기 연산

커넥션 풀링

핸들러 또는 루프 안의 클라이언트/풀 생성

의존성

사용하지 않는 의존성, dev/prod 오분류, lockfile 통계

MCP 도구

도구

설명

analyze_project

그룹화된 결과와 요약이 포함된 전체 스캔

analyze_database_queries

MongoDB/PostgreSQL 쿼리 패턴

analyze_indexes

MongoDB 인덱스 커버리지 휴리스틱

analyze_async_patterns

async/await 성능 패턴

analyze_connection_pooling

커넥션 수명주기 안티패턴

analyze_dependencies

package.json / lockfile 위생

도구 참조: docs/tools.md

설치

npm install ai-backend-performance-mcp

또는 직접 실행:

npx ai-backend-performance-mcp

MCP 구성

MCP 클라이언트 구성에 추가하세요 (Cursor / Claude Desktop 예시):

{
  "mcpServers": {
    "backend-performance": {
      "command": "npx",
      "args": ["-y", "ai-backend-performance-mcp"],
      "env": {}
    }
  }
}

로컬 개발용:

{
  "mcpServers": {
    "backend-performance": {
      "command": "node",
      "args": ["/absolute/path/to/ai-backend-performance-mcp/dist/index.js"]
    }
  }
}

사용법

Node.js 백엔드 저장소를 가리키는 projectPath로 아무 도구나 호출하세요:

{
  "projectPath": "/path/to/your/api"
}

예시 출력 (일부 생략)

{
  "projectPath": "/app/examples/sample-node-api",
  "technologies": ["express", "mongodb"],
  "metadata": {
    "packageName": "sample-node-api",
    "packageVersion": "1.0.0",
    "sourceFileCount": 4
  },
  "findings": [
    {
      "category": "pooling",
      "severity": "critical",
      "title": "Connection or client created in request handler",
      "evidence": {
        "kind": "confirmed",
        "snippet": "const client = await MongoClient.connect(...)"
      },
      "confidence": 0.9,
      "recommendation": "Create a shared client/pool at module scope and reuse it."
    }
  ],
  "summary": {
    "totalFindings": 6,
    "confirmedCount": 3,
    "potentialCount": 3
  }
}

포함된 데모 프로젝트 examples/sample-node-api를 사용해 보세요.

안전성

  • 읽기 전용: 분석 대상 프로젝트에 절대 쓰지 않음

  • 경로 검증: projectPath 밖으로의 트래버설 방지

  • 코드 실행 없음: 소스 텍스트만 파싱하며 저장소 코드를 실행하지 않음

  • 신뢰할 수 없는 입력: 분석 대상 저장소는 신뢰할 수 없는 것으로 취급

제한 사항

  • 정적 분석만 수행하므로 클러스터 상태에 의존하는 결과는 potential로 유지됨

  • 동적 require() / 런타임 생성 쿼리는 완전히 추적되지 않음

  • 인덱스 분석은 저장소 내 createIndex 호출만 비교하며(Atlas/운영 관리 인덱스 제외), 저장소에 정의된 인덱스가 없으면 침묵함

  • Array.find, 배치 $in/ANY(), _id 조회, 모듈 스코프 DB 클라이언트는 문제로 간주하지 않음

  • 순차 await는 이전 바인딩을 소비하지 않는 경우에만 플래그 처리되며, Promise.all은 결과로 보고되지 않음

  • 의존성 미사용 감지는 import 스캔 기반

  • Redis 관련 규칙은 계획되어 있지만 v0.1.0에는 구현되지 않음

개발

git clone https://github.com/robinafaruqia/ai-backend-performance-mcp.git
cd ai-backend-performance-mcp
npm install
npm run typecheck
npm run lint
npm test
npm run build

docs/development.md를 참조하세요.

테스트

npm test

tests/fixtures/ 아래의 픽스처 프로젝트는 N+1 쿼리, 인덱스, 비동기, 풀링, 의존성에 대해 문제가 있는 코드와 유효한 코드를 짝지어 제공하므로 분석기가 모든 await, 쿼리, 루프, 커넥션에 반응하지 않습니다.

로드맵

  • Redis/캐시 분석기

  • Prisma/TypeORM 특화 쿼리 규칙

  • ProjectContext 캐싱

  • SARIF/JSON 리포트 내보내기

  • 구성 가능한 심각도 임계값

기여

기여는 언제나 환영합니다! CONTRIBUTING.mdCODE_OF_CONDUCT.md를 참조하세요.

라이선스

MIT — LICENSE 참조.

Install Server
A
license - permissive license
A
quality
B
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
    Not graded
    quality
    A
    maintenance
    Enables AI assistants to perform sophisticated static code analysis using Joern's Code Property Graph technology. Supports multi-language analysis, security vulnerability detection, and code quality assessment through isolated Docker environments.
    151
    GPL 3.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP-compatible clients to inspect Next.js codebases, analyze App Router and Pages Router structure, discover API routes, and audit build performance through controlled tools.
    8
    MIT

View all related MCP servers

Related MCP Connectors

  • Provide AI-powered real-time analysis and intelligence on NPM packages, including security, depend…

  • Package intelligence for AI agents across npm, PyPI, crates.io and deps.dev. No API keys.

  • Lints + auto-fixes how AI coding agents discover any new product. 24 rules, 6 tools, score 0-100.

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/robinafaruqia/ai-backend-performance-mcp'

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