
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
MySQL用のModel Context Protocol (MCP) サーバー。SELECTクエリの実行に特化しています。
# パッケージをインストール
npm install
# ビルド
npm run build
# 実行
npx -y mysql-client
# または環境変数を設定して実行
MYSQL_HOST=localhost MYSQL_PORT=3306 MYSQL_USER=root MYSQL_PASSWORD=password MYSQL_DATABASE=test npx -y mysql-client
select
: SELECT SQLクエリを実行し、結果をJSON形式で返しますこのMCPサーバーは、セキュリティ上の理由からSELECTクエリのみを許可しています。データ変更操作(INSERT、UPDATE、DELETE等)は実行できません。
.vscode/mcp.json
ファイルを作成します{
"inputs": [
{
"type": "promptString",
"id": "mysql-password",
"description": "MySQLパスワード",
"password": true
}
],
"servers": {
"mysql-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mysql-mcp@1.0.2"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_DATABASE": "データベース名",
"MYSQL_USER": "ユーザー名",
"MYSQL_PASSWORD": "${input:mysql-password}"
}
}
}
}
すべてのワークスペースでMCPサーバーを利用するには、VS Codeのユーザー設定に追加します:
Ctrl+Shift+P
または Cmd+Shift+P
)を開き、MCP: Add Server
を選択しますUser Settings
を選択して追加しますsettings.json
に直接追加することもできます:{
"mcp": {
"servers": {
"mysql-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mysql-mcp@1.0.1"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_DATABASE": "データベース名",
"MYSQL_USER": "ユーザー名",
"MYSQL_PASSWORD": "パスワード"
}
}
}
}
}
Ctrl+Alt+I
)を開きますAgent
モードを選択しますTools
ボタンをクリックして利用可能なツールを確認しますselect
ツールが自動的に呼び出されますMCP: List Servers
を実行するとMCPサーバーの一覧が表示されますFAQs
MySQL MCP server for executing SELECT queries
The npm package mysql-mcp receives a total of 658 weekly downloads. As such, mysql-mcp popularity was classified as not popular.
We found that mysql-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.