
Research
Shai-Hulud Descends to Hades: Miasma Worm Campaign Spreads with New PyPI Wave
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.
@j0hanz/code-assistant
Advanced tools
Gemini-powered MCP server for code analysis with structured outputs for findings, risk assessment, and focused patch suggestions.
Code Assistant is a Model Context Protocol server that connects AI assistants to the Google Gemini API for automated code review, refactoring suggestions, complexity analysis, breaking-change detection, and test plan generation. It operates over stdio transport and exposes 13 tools, 7 resources, and 2 prompts.
linux/amd64 and linux/arm64GEMINI_API_KEY or GOOGLE_API_KEY){
"mcpServers": {
"code-assistant": {
"command": "npx",
"args": ["-y", "@j0hanz/code-assistant@latest"],
"env": {
"GEMINI_API_KEY": "<your-api-key>"
}
}
}
}
[!TIP] Use the one-click install badges above for automatic setup in VS Code, Cursor, Goose, or LM Studio.
Or add manually to .vscode/mcp.json:
{
"servers": {
"code-assistant": {
"command": "npx",
"args": ["-y", "@j0hanz/code-assistant@latest"],
"env": {
"GEMINI_API_KEY": "<your-api-key>"
}
}
}
}
Or via CLI:
code --add-mcp '{"name":"code-assistant","command":"npx","args":["-y","@j0hanz/code-assistant@latest"]}'
For more info, see VS Code MCP docs.
Or via CLI:
code-insiders --add-mcp '{"name":"code-assistant","command":"npx","args":["-y","@j0hanz/code-assistant@latest"]}'
Or add to ~/.cursor/mcp.json:
{
"mcpServers": {
"code-assistant": {
"command": "npx",
"args": ["-y", "@j0hanz/code-assistant@latest"],
"env": {
"GEMINI_API_KEY": "<your-api-key>"
}
}
}
}
For more info, see Cursor MCP docs.
Add to claude_desktop_config.json:
{
"mcpServers": {
"code-assistant": {
"command": "npx",
"args": ["-y", "@j0hanz/code-assistant@latest"],
"env": {
"GEMINI_API_KEY": "<your-api-key>"
}
}
}
}
For more info, see Claude Desktop MCP docs.
claude mcp add code-assistant -- npx -y @j0hanz/code-assistant@latest
For more info, see Claude Code MCP docs.
Add to your Windsurf MCP config:
{
"mcpServers": {
"code-assistant": {
"command": "npx",
"args": ["-y", "@j0hanz/code-assistant@latest"],
"env": {
"GEMINI_API_KEY": "<your-api-key>"
}
}
}
}
For more info, see Windsurf MCP docs.
amp mcp add code-assistant -- npx -y @j0hanz/code-assistant@latest
For more info, see Amp MCP docs.
Add to cline_mcp_settings.json:
{
"mcpServers": {
"code-assistant": {
"command": "npx",
"args": ["-y", "@j0hanz/code-assistant@latest"],
"env": {
"GEMINI_API_KEY": "<your-api-key>"
}
}
}
}
{
"mcpServers": {
"code-assistant": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GEMINI_API_KEY",
"ghcr.io/j0hanz/code-assistant:latest"
],
"env": {
"GEMINI_API_KEY": "<your-api-key>"
}
}
}
}
Or run directly:
docker run -i -e GEMINI_API_KEY="<your-api-key>" ghcr.io/j0hanz/code-assistant:latest
generate_diffGenerate a diff of current changes and cache it server-side. Must be called before diff-based analysis tools.
| Name | Type | Required | Description |
|---|---|---|---|
mode | string | yes | 'unstaged' or 'staged' diff capture. |
analyze_pr_impactAssess severity, categories, breaking changes, and rollback complexity.
| Name | Type | Required | Description |
|---|---|---|---|
repository | string | yes | Repository identifier (owner/repo). |
language | string | no | Primary language hint. |
generate_review_summaryProduce PR summary, risk rating, and merge recommendation.
| Name | Type | Required | Description |
|---|---|---|---|
repository | string | yes | Repository identifier (owner/repo). |
language | string | no | Primary language hint. |
generate_test_planGenerate prioritized test cases and coverage guidance.
| Name | Type | Required | Description |
|---|---|---|---|
repository | string | yes | Repository identifier (owner/repo). |
language | string | no | Primary language hint. |
testFramework | string | no | Framework hint (jest, pytest, etc). |
maxTestCases | number | no | Max test cases (1-30). |
analyze_time_space_complexityAnalyze Big-O complexity and detect degradations in changed code.
| Name | Type | Required | Description |
|---|---|---|---|
language | string | no | Primary language hint. |
detect_api_breaking_changesDetect breaking API/interface changes in a diff.
| Name | Type | Required | Description |
|---|---|---|---|
language | string | no | Primary language hint. |
load_fileRead a single file from disk and cache it server-side. Must be called before file analysis tools.
| Name | Type | Required | Description |
|---|---|---|---|
filePath | string | yes | Absolute path to the file to load. |
refactor_codeAnalyze cached file for naming, complexity, duplication, and grouping improvements.
| Name | Type | Required | Description |
|---|---|---|---|
language | string | no | Primary language hint. |
ask_about_codeAnswer natural-language questions about a cached file.
| Name | Type | Required | Description |
|---|---|---|---|
question | string | yes | Question about the loaded file. |
language | string | no | Primary language hint. |
verify_logicVerify algorithms and logic in cached file using Gemini code execution sandbox.
| Name | Type | Required | Description |
|---|---|---|---|
question | string | yes | Question about the loaded file. |
language | string | no | Primary language hint. |
web_searchPerform a Google Search with Grounding to get up-to-date information.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Search query. |
index_repositoryWalk a local repository, upload source files to a Gemini File Search Store for RAG queries.
| Name | Type | Required | Description |
|---|---|---|---|
rootPath | string | yes | Absolute path to the repository root. |
displayName | string | no | Display name for the store. Default: dir name. |
query_repositoryQuery the indexed repository search store using natural language.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Natural-language question about the repo. |
language | string | no | Primary language hint. |
| URI Pattern | MIME Type | Description |
|---|---|---|
internal://instructions | text/markdown | Complete server usage instructions. |
internal://tool-catalog | text/markdown | Tool reference: models, params, data flow. |
internal://workflows | text/markdown | Recommended workflows and tool sequences. |
internal://server-config | text/markdown | Runtime configuration and limits. |
internal://tool-info/{toolName} | text/markdown | Per-tool reference (supports completions). |
internal://diff/current | text/x-patch | Most recently generated diff (cached). |
internal://file/current | text/plain | Most recently loaded file (cached). |
| Prompt | Arguments | Description |
|---|---|---|
get-help | none | Server instructions. |
review-guide | tool, focusArea | Workflow guide for tool/focus area. |
| Variable | Default | Required | Description |
|---|---|---|---|
GEMINI_API_KEY | N/A | yes | Google Gemini API key. |
GOOGLE_API_KEY | N/A | yes* | Alternative API key variable (*either one required). |
GEMINI_MODEL | gemini-3-flash-preview | no | Model override for all tools. |
MAX_DIFF_CHARS | 120000 | no | Max diff size in characters. |
GEMINI_HARM_BLOCK_THRESHOLD | BLOCK_NONE | no | Safety threshold (BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE). |
GEMINI_INCLUDE_THOUGHTS | false | no | Include model thinking in responses. |
GEMINI_BATCH_MODE | off | no | Batch mode: off or inline. |
GEMINI_BATCH_POLL_INTERVAL_MS | N/A | no | Poll cadence for batch status checks. |
GEMINI_BATCH_TIMEOUT_MS | N/A | no | Max wait for batch completion. |
MAX_CONCURRENT_CALLS | 10 | no | Max concurrent Gemini calls. |
MAX_CONCURRENT_BATCH_CALLS | 2 | no | Max concurrent batch calls. |
MAX_CONCURRENT_CALLS_WAIT_MS | 2000 | no | Wait timeout for concurrency queue (ms). |
GEMINI_DIFF_CACHE_ENABLED | false | no | Enable Gemini-side diff caching. |
GEMINI_DIFF_CACHE_TTL_S | N/A | no | Cache TTL in seconds. |
| Flag | Short | Maps to env var | Description |
|---|---|---|---|
--model | -m | GEMINI_MODEL | Override default model. |
--max-diff-chars | MAX_DIFF_CHARS | Override diff budget. |
| Control | Status | Evidence |
|---|---|---|
| Non-root Docker user | confirmed | Dockerfile — adduser -D mcp, USER mcp |
| Read-only volume mount | confirmed | docker-compose.yml — :ro flag |
| Diff budget enforcement | confirmed | src/lib/diff.ts — MAX_DIFF_CHARS |
| Noisy file exclusion | confirmed | src/lib/diff.ts — NOISY_EXCLUDE_PATHSPECS |
| Configurable safety filters | confirmed | src/lib/gemini/config.ts — GEMINI_HARM_BLOCK_THRESHOLD |
| npm publish provenance | confirmed | .github/workflows/release.yml — --provenance flag |
| Script | Command | Purpose |
|---|---|---|
build | npm run build | Compile TypeScript to dist/. |
dev | npm run dev | Watch mode (tsc --watch). |
start | npm run start | Run built server. |
type-check | npm run type-check | Type-check src and tests. |
lint | npm run lint | ESLint. |
format | npm run format | Prettier. |
test | npm run test | Run tests (node:test). |
knip | npm run knip | Dead-code detection. |
inspector | npm run inspector | MCP Inspector. |
npx @modelcontextprotocol/inspector npx -y @j0hanz/code-assistant@latest
workflow_dispatch) with version bump type (patch/minor/major) or custom version.@j0hanz/code-assistant with OIDC trusted publishing and provenance attestation.linux/amd64, linux/arm64) pushed to ghcr.io/j0hanz/code-assistant.io.github.j0hanz/code-assistant.docker build -t code-assistant .
GEMINI_API_KEY or GOOGLE_API_KEY in your environment or client config.MAX_DIFF_CHARS or use --max-diff-chars flag. Lock files and build artifacts are excluded automatically.npm run build before running the inspector.E_NO_DIFF error: call generate_diff before any diff-based analysis tool.E_NO_FILE error: call load_file before refactor_code, ask_about_code, or verify_logic.FAQs
Gemini-powered MCP server for code analysis.
The npm package @j0hanz/code-assistant receives a total of 33 weekly downloads. As such, @j0hanz/code-assistant popularity was classified as not popular.
We found that @j0hanz/code-assistant 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.

Research
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.