Gaz MCP

by jcastilloa

Not rated
GitHub

About

MCP server for read-only MySQL/PostgreSQL access, Jenkins administration, and live Go process diagnostics via pprof/expvar. Built for AI coding agents.

Details

Author
jcastilloa
Categories
Productivity

Setup

Install Gaz MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/jcastilloa/gaz-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

gaz-mcpis an MCP server for read-only MySQL/PostgreSQL access, Jenkins administration with configuration history, OpenRouter image generation, and diagnosis of running Go processes throughpprofandexpvar. It also ships the independentdiagnosticsGo module for adding those endpoints to target services.

It uses stdio transport: one binary, no daemon, and no listener opened by the MCP itself. SQL and Jenkins targets are configured once; a Go diagnostic target is supplied directly with each tool call.

- MCP stdio server— one binary, no daemon, no network ports.
- Multi-environment SQL and Jenkins— select the configured environment per call.
- Read-only SQL enforcement— application checks plus database read-only sessions.
- Dynamic database selection— the database belongs to each SQL request, not to static configuration.
- Jenkins toolset— 33 tools for jobs, builds, nodes, views, queue, plugins, credentials, script console, and snapshots.
- Configuration history— Jenkins snapshots are held in SQLite for the operations that support capture and rollback.
- SHA-256 deduplication— identical consecutive configuration snapshots are not stored twice.
- Controlled image generation— choose a configured OpenRouter image model per request, with prompt, seed references, dimensions, quality, format, seed, and provider routing controls.
- Go process diagnosis— pprof profiles, grouped goroutine stacks, raw runtime/process/host/cgroup metrics, and a separate list of evidence-backed heuristic suspicions.
- Structured JSON output— designed for programmatic consumption.
- YAML configuration— Viper-based configuration, with deployment-time secret rendering.
- Hexagonal architecture— domain, application, and platform layers remain separate.

- The Go version declared ingo.mod(currently Go1.26.0) to build from source, or a prebuilt binary.
- A MySQL/PostgreSQL server and/or Jenkins instance reachable from the host running the MCP.

# Latest release curl -fsSL https://raw.githubusercontent.com/jcastilloa/gaz-mcp/master/scripts/install.sh | sh # Specific version curl -fsSL https://raw.githubusercontent.com/jcastilloa/gaz-mcp/master/scripts/install.sh | VERSION=vX.Y.Z sh

Product-facing agent skills are distributed underskills/, separately from the.codex/skillsused to develop this repository:

Install the complete directory for every enabled capability. For example, from a gaz-mcp checkout, copy them into a separate project that consumes the MCP:

GAZ_MCP_DIR=/path/to/gaz-mcp CONSUMER_PROJECT=/path/to/project-using-gaz-mcp mkdir -p "$CONSUMER_PROJECT/.codex/skills" cp -R "$GAZ_MCP_DIR/skills/gaz-mcp-db" "$CONSUMER_PROJECT/.codex/skills/" cp -R "$GAZ_MCP_DIR/skills/gaz-mcp-jenkins" "$CONSUMER_PROJECT/.codex/skills/" cp -R "$GAZ_MCP_DIR/skills/gaz-mcp-diagnostics" "$CONSUMER_PROJECT/.codex/skills/"

See theskills catalogfor project/global paths in Claude Code, Codex, OpenCode, and Cursor, plus the boundary between product and contributor skills.

Createconfig.yamlin the working directory or at~/.config/gaz-mcp/config.yaml.

service: transport: stdio version: 0.4.0 # SQL environments (MySQL + PostgreSQL) environments: dev1: engine: mysql host: 127.0.0.1 port: 3306 user: readonly_user password: your-password analytics: engine: postgres host: 127.0.0.1 port: 5432 user: postgres password: your-password # Jenkins environments jenkins: production: url: https://jenkins.example.com user: admin api_key: "${JENKINS_PROD_API_KEY}" # Jenkins API token or password timeout: 30s insecure: false staging: url: https://jenkins-staging.example.com user: admin api_key: "${JENKINS_STAGING_API_KEY}" timeout: 30s insecure: true # allow self-signed TLS # Jenkins configuration history (SQLite, pure Go) snapshot: enabled: true db_path: ~/.config/gaz-mcp/jenkins_history.db max_versions: 50 # positive retention limit per object auto_prune: true # OpenRouter image generation. models is a closed allowlist: image_generate # rejects every model not declared here. image_generation: api_key: "${OPENROUTER_API_KEY}" base_url: https://openrouter.ai/api/v1 timeout: 2m models: - openai/gpt-image-1 - google/gemini-2.5-flash-image

enginedefaults tomysqlwhen it is omitted. The SQLdatabaseis selected by the tool call, not here. For images,image_model_listreturns the configured allowlist andimage_generateselects one of its entries per call. The Go diagnostictargetis likewise deliberately not configured here: the caller supplies the authorised process URL for each request.

Configuration note:image_generation.api_keyexpands${NAME}from the process environment. Keep all other secret placeholders under deployment-time configuration control.max_versionsis currently normalised to the default of 50 when configured as zero or another non-positive value, so use a positive value in YAML.

Security:use${OPENROUTER_API_KEY}(or another deployment-time secret mechanism) forimage_generation.api_key; it is masked in JSON output. The image tools are registered only whenimage_generation.modelsis non-empty, and an API key is then required. Jenkinsapi_keyaccepts a Jenkins API token (recommended, created inUser → Configure → API Token) or a password. Keep resolved secrets out of version control and use restricted deployment-time configuration.

Seeconfig.sample.yamlfor the complete sample, including the OpenAI provider settings used by the application.

cp config.sample.yaml config.yaml # Edit the environments, jenkins, snapshot, and image_generation sections, then render secret placeholders.
go run ./cmd/server/ --transport stdio # Or with the built binary: ./gaz-mcp --transport stdio

Claude Desktop, Cursor, and JSON-based clients

{ "mcpServers": { "gaz-mcp": { "command": "/absolute/path/to/gaz-mcp", "args": ["--transport", "stdio"] } } }
[mcp_servers.gaz-mcp] command = "/absolute/path/to/gaz-mcp" args = ["--transport", "stdio"] startup_timeout_sec = 20.0
codex mcp add gaz-mcp -- /absolute/path/to/gaz-mcp --transport stdio

Follow the prompts: project or global, namegaz-mcp, typelocal, then command/absolute/path/to/gaz-mcp --transport stdio.

Always use an absolute binary path and stdio transport.

The root document contains installation, configuration, client setup, architecture, and development. The complete operational references live in the focused guides below; none of the tool reference is intentionally duplicated here.

The service-side module is released independently using module-compatible tags such asdiagnostics/v0.1.0; MCP server release tags (v0.4.x) are not module versions forgithub.com/jcastilloa/gaz-mcp/diagnostics.

To move the service endpoints from/debug/...to a custom prefix, usediagnostics.WithBasePath("/internal/diagnostics"); then passhttp://service:6060/internal/diagnosticsas the diagnostic tooltarget.

gaz-mcp/ ├── cmd/server/ # Entry point ├── diagnostics/ # Independent service-side instrumentation Go module ├── skills/ # Product-facing agent skills distributed to gaz-mcp users ├── mcp/ │ ├── application/ │ │ ├── diagnostics/ # Go process diagnosis use cases │ │ ├── image/ # Image-generation use cases │ │ ├── jenkins/ # Jenkins use cases + NoopSnapshotRepository │ │ └── sql/ # SQL use case (read-only enforcement) │ └── domain/ │ ├── diagnostics/ # Diagnostic target and profile-store ports │ ├── image/ # Image-generation repository port │ ├── jenkins/ # Repository + SnapshotRepository ports │ └── sql/ # Repository port ├── platform/ │ ├── config/ # Viper config reader │ ├── di/ # Dependency injection container │ └── mcp/ │ ├── commands/ # Cobra runner + tool wiring │ ├── diagnostics/ # HTTP pprof/expvar adapter + profile store │ ├── image/ # OpenRouter image API adapter │ ├── jenkins/ # gojenkins infrastructure adapter │ ├── server/ # MCP server wrapper │ ├── snapshot/ # SQLite snapshot repository │ ├── sql/ # MySQL + PostgreSQL adapters │ └── tools/ # MCP tool definitions └── shared/ ├── ai/domain/ # AI provider contracts └── config/domain/ # Configuration contracts

Dependency rule:platform → shared + mcp/application + mcp/domain. Never reverse that direction.

go build ./... # Build all packages go vet ./... # Static analysis go test ./... # All tests go test ./mcp/application/jenkins/... -v # Jenkins service unit tests go test ./platform/mcp/snapshot/... -v # SQLite snapshot integration tests go test ./mcp/application/diagnostics/... -v # Diagnostic service tests go test ./platform/mcp/diagnostics/... -v # HTTP adapter and profile-store tests (cd diagnostics && go test ./...) # Service-side instrumentation module

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The 1Password MCP server creates a bridge that allows MCP clients such as Codex and Kiro to manage your 1Password Environments with secure authorization prompts.

This is the 1st, easiest, and cheapest PPT, slides, presentation AI generation MCP Server in the world.

Persistent memory for any AI assistant. Zero token cost until recall. Stores memories in local SQLite, ranks by 6-factor scoring, returns results 79% smaller than JSON. Works with Claude, ChatGPT, Grok, Cursor, Windsurf, and any MCP client.

A MCP server that enables AI assistants to interact with Anki, the spaced repetition flashcard application.

Enables LLM clients to interact with macOS applications through AppleScript. Built using the @beyondbetter/bb-mcp-server library, this server provides safe, controlled execution of predefined scripts with optional support for arbitrary script execution.

An MCP server for WordPress plugin audits

Turn your AI assistant into a digital marketing hub that creates, organizes, and analyzes links and QR Codes on demand.

Connect AI clients to Cal.com scheduling through the Model Context Protocol using the hosted server at mcp.cal.com or a local instance.

Sync Calendars, Scheduling Links, AI Executive Scheduling Assistant, Unified Calendar

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.