Skip to main content
Glama
shakaran

symfony-agent-mcp

symfony-agent-mcp

npm version License: MIT Node.js MCP PRs Welcome GitHub issues GitHub stars Build Status Coverage

기능빠른 시작통합사용법문서기여라이선스


Symfony 애플리케이션을 위한 프로덕션 준비 완료 Model Context Protocol (MCP) 서버입니다. AI 어시스턴트에게 전체 Symfony 코드베이스에 대한 심층적이고 읽기 전용(introspection) 접근을 제공합니다 — 라우트, 컨트롤러, 서비스, 엔티티, 데이터베이스 스키마, 마이그레이션, 이벤트, 폼, 보안, Doctrine, Messenger, Twig, API Platform 등을 포함합니다.

클라이언트

설치 방법

Claude Code

claude mcp add 실행 → 설정

Claude Desktop

claude_desktop_config.json에 추가 → 설정

Cursor

.cursor/mcp.json에 추가 → 설정

VS Code Copilot

.vscode/mcp.json에 추가 → 설정

모든 MCP 클라이언트

stdio 전송, command: npx @shakaran/symfony-agent-mcp


기능

16개 카테고리에 걸친 1,679개 도구

Available tool categories (16 categories, 1,679 tools total, ~164,729 tokens if all active)

  Category         │ Tools      │ Est. tokens    │ Description
  ─────────────────┼────────────┼────────────────┼────────────────────────────────────────────────────────
  symfony-core     │  549 tools │ ~ 53995 tokens │ Routes, services, controllers, events, commands, bundles, DI container, kernel
  database         │  176 tools │ ~ 17121 tokens │ Entities, migrations, Doctrine ORM, relationships, query patterns, indexes, DBAL
  security         │  133 tools │ ~ 13008 tokens │ Voters, firewalls, authenticators, JWT, OAuth, CSRF, access control, secrets vault
  frontend         │  121 tools │ ~ 11568 tokens │ Twig, translations, asset mapper, Symfony UX, Turbo, live components, Webpack
  testing          │  110 tools │ ~ 10559 tokens │ PHPUnit, Behat, Cypress, Playwright, Psalm, PHPStan, Rector, static analysis
  integrations     │  106 tools │ ~ 10939 tokens │ Stripe, Slack, Sentry, Elasticsearch, Twilio, SendGrid, Mailgun, Datadog, OpenAI
  serializer       │   91 tools │ ~  9031 tokens │ Serializer, validation, forms, constraints, DTOs, transformers, normalizers
  messaging        │   87 tools │ ~  8455 tokens │ Messenger, notifier, webhooks, Mercure, mailer, transports, stamps, failure handling
  api              │   68 tools │ ~  6438 tokens │ API Platform, OpenAPI, GraphQL, REST patterns, versioning, rate limits, Nelmio
  infrastructure   │   68 tools │ ~  6794 tokens │ Docker, CI/CD, Kubernetes, Terraform, Helm, Nginx, serverless, cloud platforms
  cache-sessions   │   62 tools │ ~  5945 tokens │ Cache pools, HTTP cache, sessions, rate limiter, lock, cache warmers, OPcache
  config           │   35 tools │ ~  3157 tokens │ Environment config, framework settings, Monolog, CORS, locale, feature flags
  code-quality     │   25 tools │ ~  2447 tokens │ Profiler, dead code detection, dependency graph, accessibility, code metrics
  cloud-aws        │   18 tools │ ~  1945 tokens │ AWS S3, SES, Cognito, ECS, Lambda/Bref, Parameter Store, Secrets Manager, CloudFront
  cloud-other      │   16 tools │ ~  1851 tokens │ Azure Blob/Pipelines, Google Cloud Run/Storage, Firebase, DigitalOcean, Consul
  queues           │   14 tools │ ~  1476 tokens │ RabbitMQ, Kafka, SQS FIFO/DLQ, Pusher, Redis pub/sub and streams

To activate a category: call activate_category(category: "<key>")
To search for specific tools: call search_tools(query: "what you want to do")

보안 우선 설계

  • 읽기 전용 — 어떤 것도 쓰기, 수정, 실행하지 않습니다

  • 자동 정보 삭제(redaction) — 비밀번호, 토큰, API 키, 데이터베이스 자격 증명은 AI에 도달하기 전에 [REDACTED]로 대체됩니다

  • DLP 파이프라인 — 다중 계층 데이터 유출 방지(Data Loss Prevention) 스캐너 (신용카드, JWT, SSH 키, 클라우드 자격 증명 등을 위한 정규식 패턴 + 구조적 탐지)

  • 경로 검증 — 디렉토리 트래버설 공격은 입력 계층에서 차단됩니다

  • 코드 실행 없음 — PHP 파일은 정적으로 파싱됩니다 (eval 없음, PHP 런타임 없음)

  • 네트워크 호출 없음 — 모든 데이터는 로컬 파일에서만 가져옵니다

  • 프롬프트 인젝션 필터 — 도구 출력은 AI로 전달되기 전에 인젝션 패턴이 스캔됩니다


Related MCP server: phpustik MCP Server

빠른 시작

옵션 A: npx (설치 불필요)

npx @shakaran/symfony-agent-mcp

옵션 B: 전역 설치

npm install -g @shakaran/symfony-agent-mcp
symfony-agent-mcp

옵션 C: 소스에서

git clone https://github.com/shakaran/symfony-agent-mcp
cd symfony-agent-mcp
pnpm install
pnpm build
pnpm start

Node.js 설정, 문제 해결, 첫 사용 검증을 포함한 단계별 가이드는 GETTING_STARTED.md를 참조하세요.


통합

원클릭 설치

클라이언트

설치 방법

Cursor

Install in Cursor

VS Code

Install in VS Code

VS Code Insiders

Install in VS Code Insiders

Windsurf

Install in Windsurf

Claude Code

Install in Claude Code

Claude Desktop

Install in Claude Desktop

Claude Code

서버를 등록하려면 한 번 실행하세요:

# npx (no local install required)
claude mcp add symfony -- npx @shakaran/symfony-agent-mcp

# Or from a local source build
claude mcp add symfony -- node /path/to/symfony-agent-mcp/dist/server.js

모든 프로젝트에서 전역으로 사용하려면 --scope user 플래그를 추가하세요:

claude mcp add --scope user symfony -- npx @shakaran/symfony-agent-mcp

Claude Desktop

Claude Desktop 구성 파일(claude_desktop_config.json)에 추가하세요:

{
  "mcpServers": {
    "symfony": {
      "command": "npx",
      "args": ["@shakaran/symfony-agent-mcp"]
    }
  }
}

Cursor

.cursor/mcp.json에 추가하세요:

{
  "symfony": {
    "command": "npx",
    "args": ["@shakaran/symfony-agent-mcp"]
  }
}

VS Code Copilot

.vscode/mcp.json에 추가하세요:

{
  "servers": {
    "symfony": {
      "type": "stdio",
      "command": "npx",
      "args": ["@shakaran/symfony-agent-mcp"]
    }
  }
}

사용법

모든 도구는 Symfony 애플리케이션의 루트를 가리키는 app_path 매개변수를 허용합니다:

list_routes(app_path: "/var/www/myapp")
→ Found 42 routes: GET /api/users [api_users], POST /login [app_login], …

get_entity_details(app_path: "/var/www/myapp", entity_name: "User")
→ Entity: User  |  Table: users
  Properties: id (int, PK), email (string 180), isActive (bool)
  Relationships: OneToMany → Post (author)

get_error_summary(app_path: "/var/www/myapp")
→ Last 24h: 3 CRITICAL, 12 ERROR, 47 WARNING

get_code_quality_report(app_path: "/var/www/myapp")
→ God classes: UserManager (1240 lines), dead services: 4, N+1 risks: 7

Claude와 함께 사용할 수 있는 예시 프롬프트:

  • "POST 메서드가 있는 모든 라우트와 해당 컨트롤러를 보여줘"

  • "doctrine.event_listener 태그가 지정된 서비스는 무엇인가요?"

  • "프로덕션 로그의 마지막 50줄을 나열해줘"

  • "서비스 컨테이너에 순환 의존성이 있나요?"

  • "User와 관계가 있는 Doctrine 엔티티는 무엇인가요?"

  • "마이그레이션 기록과 파괴적인 마이그레이션이 있는지 보여줘"

  • "보안 속성이 없는 컨트롤러는 무엇인가요?"


구성

모든 구성은 MCP 서버 프로세스에 전달되는 환경 변수를 통해 이루어집니다.

도구 검색

변수

기본값

설명

SYMFONY_MCP_DYNAMIC_TOOLS

true

동적 도구 검색을 활성화합니다. true인 경우 tools/list는 1,679개 전체 대신 5개의 메타 도구만 반환합니다. 레거시 동작(모든 도구 항상 표시)을 복원하려면 false로 설정하세요.

SYMFONY_MCP_TOKEN_BUDGET

40000

세션당 활성화할 수 있는 최대 예상 토큰 수입니다. 이 한도를 초과하면 활성화가 차단됩니다. 재정의하려면 activate_categoryforce=true를 전달하세요.

보안 및 접근

변수

기본값

설명

SYMFONY_MCP_ALLOWED_PATHS

(모두)

서버가 검사할 수 있는 절대 앱 경로의 콜론으로 구분된 목록입니다. 예: /var/www/app1:/var/www/app2

SYMFONY_MCP_REQUIRE_SYMFONY

true

Symfony 프로젝트 검증을 건너뛰려면 false로 설정하세요 (테스트에 유용).

SYMFONY_MCP_ALLOWED_TOOLS

(모두)

쉼표로 구분된 도구 이름 허용 목록입니다. 나열된 도구만 호출할 수 있습니다.

SYMFONY_MCP_BLOCKED_TOOLS

(없음)

쉼표로 구분된 차단 목록입니다. 허용 목록보다 우선합니다.

SYMFONY_MCP_SIGNING_SECRET

(꺼짐)

요청 서명을 위한 32자 이상의 비밀키입니다. 요청별 인증을 활성화합니다.

SYMFONY_MCP_SESSION_SECRET

(꺼짐)

세션 토큰 생성을 위한 비밀키입니다.

SYMFONY_MCP_SESSION_TOKEN

(꺼짐)

들어오는 요청에서 검증할 토큰입니다.

SYMFONY_MCP_SESSION_STRICT

false

유효한 세션 토큰이 없는 요청을 거부하려면 true로 설정하세요.

SYMFONY_MCP_SESSION_WINDOW

300

세션 토큰 유효 기간(초)입니다.

속도 제한

변수

기본값

설명

SYMFONY_MCP_RATE_LIMIT

60

창당 최대 요청 수입니다. 비활성화하려면 0으로 설정하세요.

SYMFONY_MCP_RATE_WINDOW_MS

60000

속도 제한 창(밀리초)입니다 (1분).

SYMFONY_MCP_RATE_BURST

10

1초 내 최대 버스트 요청 수입니다.

전송

변수

기본값

설명

SYMFONY_MCP_HTTP_PORT

(꺼짐)

HTTP/SSE 전송용 포트입니다. 설정하면 stdio 외에 HTTP 서버도 시작됩니다.

SYMFONY_MCP_STDIO

true

stdio 전송을 비활성화하려면 false로 설정하세요 (HTTP 전용 실행 시 유용).

SYMFONY_MCP_TOOL_TIMEOUT_MS

30000

도구별 실행 제한 시간(밀리초)입니다.

예시: 동적 도구가 비활성화된 Claude Code

{
  "mcpServers": {
    "symfony": {
      "command": "npx",
      "args": ["@shakaran/symfony-agent-mcp"],
      "env": {
        "SYMFONY_MCP_DYNAMIC_TOOLS": "false"
      }
    }
  }
}

예시: 토큰 예산을 80,000 토큰으로 증가

{
  "mcpServers": {
    "symfony": {
      "command": "node",
      "args": ["/path/to/symfony-agent-mcp/dist/server.js"],
      "env": {
        "SYMFONY_MCP_TOKEN_BUDGET": "80000"
      }
    }
  }
}

로컬 설치 (소스에서)

npm 게시 없이 로컬 클론에서 서버를 실행하려는 경우 사용합니다.

# 1. Clone the repo
git clone https://github.com/shakaran/symfony-agent-mcp
cd symfony-agent-mcp

# 2. Install dependencies (Node.js ≥ 22 required)
pnpm install         # or: npm install

# 3. Build TypeScript → dist/
pnpm build           # or: npm run build

# 4. Test the server responds
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | node dist/server.js

그런 다음 MCP 클라이언트가 빌드된 파일을 가리키도록 구성하세요:

Claude Code (한 번 실행):

claude mcp add symfony -- node /absolute/path/to/symfony-agent-mcp/dist/server.js

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "symfony": {
      "command": "node",
      "args": ["/absolute/path/to/symfony-agent-mcp/dist/server.js"]
    }
  }
}

VS Code (.vscode/mcp.json):

{
  "servers": {
    "symfony": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/symfony-agent-mcp/dist/server.js"]
    }
  }
}

팁: 다시 빌드(pnpm build)한 후에는 변경 사항을 적용하려면 MCP 클라이언트를 다시 시작하세요.


읽어오는 대상

서버는 Symfony 앱에서 파일을 직접 읽습니다 — 데이터베이스 연결이나 PHP 런타임이 필요 없습니다:

  • config/routes.yaml, config/routes/*.yaml — YAML 라우트

  • src/Controller/의 PHP 8 #[Route] 어트리뷰트

  • config/services.yaml — DI 컨테이너 서비스

  • config/packages/*.yaml — 프레임워크, 보안, doctrine, messenger, mailer 설정

  • src/Entity/*.php — Doctrine 엔티티 파일 (PHP 8 어트리뷰트 + 어노테이션)

  • var/log/*.log — 애플리케이션 로그

  • migrations/, src/Migrations/ — Doctrine 마이그레이션 파일

  • composer.json, composer.lock — 패키지 정보

  • .env, .env.local, .env.*.local — 환경 변수 (민감한 값은 자동으로 마스킹됨)


Symfony 호환성

Symfony

PHP

ORM 매핑

5.4 LTS

8.0+

어노테이션 또는 어트리뷰트

6.x

8.0+

어트리뷰트

7.x

8.2+

어트리뷰트

8.x

8.2+

어트리뷰트


요구 사항

  • Node.js ≥ 22.0.0

  • pnpm ≥ 11.0.0 (개발 시 npm/yarn 사용 가능)


개발

pnpm install
pnpm dev            # watch mode (TypeScript → dist/)
pnpm test           # run all tests
pnpm lint           # ESLint
pnpm typecheck      # tsc --noEmit

전체 개발 가이드는 DEVELOPMENT.md를 참조하세요: 아키텍처 개요, 새 도구 추가, 테스트 전략, 기여 지침.


문서

문서

설명

GETTING_STARTED.md

단계별 설치, Node.js 사전 요구 사항, 문제 해결

ARCHITECTURE.md

시스템 설계, 보안 파이프라인, 구성 요소 개요, 16개 카테고리의 전체 1,679개 도구 문서화

DEVELOPMENT.md

개발 워크플로우, 도구 추가, 테스트, 기여

SECURITY.md

위협 모델, DLP 파이프라인, 책임 있는 공개 정책

CHANGELOG.md

릴리스 내역 및 로드맵

PROJECT_SUMMARY.md

프로젝트 개요 및 통계


기여

이슈와 풀 리퀘스트는 github.com/shakaran/symfony-agent-mcp에서 환영합니다.

PR을 제출하기 전에 DEVELOPMENT.md를 읽고, 책임 있는 공개 정책은 SECURITY.md를 참조하세요.


라이선스

MIT © Ángel Guzmán Maeso

Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
3Releases (12mo)
Commit activity

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    A production-ready Model Context Protocol (MCP) server that bridges your Symfony/PHP project with LLMs such as Claude. It exposes tools that let the AI read your project's routes, services, Twig templates, and PHP source code.
    8
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    Enables AI assistants to deeply interact with the PHP ecosystem, including runtime, static analysis, security scanning, testing, Composer, and frameworks like Laravel and Symfony. It exposes over 30 tools, 8 resources, and 7 prompts via MCP, allowing natural language commands to run PHP linting, static analysis, audits, tests, and project initialization.
    41
    MIT

View all related MCP servers

Related MCP Connectors

  • Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.

  • Scans MCP servers for tool poisoning, prompt injection and supply chain risks.

  • Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.

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/shakaran/symfony-agent-mcp'

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