Repository navigation
Conversation
Add a setup and troubleshooting guide (docs/gti_remote_server.md) for the Google Threat Intelligence Agentic Streamable HTTP MCP server at https://www.virustotal.com/api/v3/agentspace/mcp/, alongside a theme-neutral SVG architecture comparison diagram and cross-links from README.md, docs/index.md, docs/toc.md, docs/usage_guide.md, docs/servers/gti_mcp.md, and server/gti/README.md.
…tool mapping parity
…tool mappings - Wire GTI_MCP_URL and SECOPS_MCP_URL to StreamableHTTPConnectionParams in run-with-google-adk (trailing slash normalization, thread-safe ADC header_provider refresh, 49 unit tests) - Clarify VTAI Hosted MCP OAuth 2.1 scopes vs vtai_... Agent Tokens, standalone VTAI account caveats, Gemini CLI extension setup, portable bash/zsh API key prompt, and 403 Invalid Agent Token troubleshooting - Fix local gti-mcp COLLECTION_RELATIONSHIPS and descriptors_only signatures in hunt/SKILL.md and docs/servers/gti_mcp.md, reconcile local server/secops tool names in TOOL_MAPPING.md, and wire optional GTI/VT enrichment in triage/investigate skills
…and extension configs - Replace McpToolset header_provider with origin-pinned _GoogleCloudMcpAuth(httpx.Auth) client factory wrapping create_mcp_http_client for SECOPS_MCP_URL and SCC_MCP_URL so ADC credentials attach on get_tools(None) and rotate expired OAuth tokens on a single pooled session - Wire MINIMAL_LOGGING=Y in bootstrap_environment() and SSE routes, add remote URL scheme/origin validation, wire SECOPS_SOAR_MCP_URL, and expand hermetic + loopback HTTP test suite to 52 passing tests - Align remote-mcp-secops server key, 60s timeouts, regional <region>-chronicle.googleapis.com/mcp endpoints, and TOOL_MAPPING / skill contracts across docs and extensions
…ten remote MCP tests - Normalize origin pins via httpx.URL so explicit :443 endpoints attach Authorization and x-goog-user-project, add ADC quota_project_id fallback and 1-shot 401 refresh, and reject embedded URL userinfo - Force follow_redirects=False in MCP HTTP client factories across Google Cloud and GTI toolsets so x-apikey and x-goog-user-project never follow cross-origin or http:// 307 redirects even on mcp 1.24.0 - Auto-enable SCC_MCP_URL, preserve local SOAR stdio when SECOPS_SOAR_MCP_URL is set, set ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS=false under MINIMAL_LOGGING=Y, align lowest-direct floors, and expand tests to 54 passing
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents how to configure and verify the managed Remote MCP Server for Google Threat Intelligence (
https://www.virustotal.com/api/v3/agentspace/mcp/, documented upstream at Agentic MCP Server Configuration) and the VirusTotal AI Hosted MCP (https://ai.virustotal.com/mcp, documented at Install VirusTotal for your agent), and wires remote Streamable HTTP MCP support intorun-with-google-adkand the Google SecOps Extension skills.docs/gti_remote_server.mdmirroringdocs/remote_server.mdfor Google SecOps:docs/img/gti_remote/gti_remote_vs_local.svggenerated bydocs/img/gti_remote/render_diagrams.py, 880x464 with#0f172aouter card,#1e293binner cards,#94a3b8borders, and >= 11.8:1 text contrast across both light and dark modes without relying oncurrentColor) comparing the 7-tool remote GTI Agentic server (gti-agentic), the 11-tool VirusTotal AI Hosted MCP (virustotalathttps://ai.virustotal.com/mcp), and the 35+ tool localstdiogti-mcppackage (gti), including running multiple servers side by side under distinct server keys.share_sessionbearershare_tokenprecautions, and portablebash/zshprintf+read -rsandcurl -i --config -secret handling.x-apikeywith noMcp-Session-Idtransport header paired with application-layersession_idcontinuity acrossask_gti_agentandcontinue_chat, mandatory trailing/to avoid cross-schemeHTTP 307redirects, dualAccept: application/json, text/event-streammedia types to avoidHTTP 406 Not Acceptable, and 300-second client timeouts for 45 to 180 second server-side specialist-agent investigations."mcpServers"+${env:VT_APIKEY}), VS Code (.vscode/mcp.jsontop-level"servers"+"inputs"passwordpromptString+"type": "http"), Cline (cline_mcp_settings.json"type": "streamableHttp","timeout": 300,chmod 600), Gemini CLI ($GEMINI_CLI_VT_APIKEYprefix for header env sanitization +"type": "http"+"timeout": 300000), Antigravity (~/.gemini/config/mcp_config.jsonwith"serverUrl","timeoutSeconds": 300,chmod 600), Claude Code (single-quoted--header 'x-apikey: ${VT_APIKEY}'+ persistentMCP_TOOL_TIMEOUT=300000), Claude Desktop (mcp-remote"x-apikey:${VT_APIKEY}",chmod 600/--header-file, and 60-second SDK timeout session recovery vialist_sessions/get_session_history), Codex CLI (~/.codex/config.tomlenv_http_headers+tool_timeout_sec = 300), Goose (~/.config/goose/config.yamlstreamable_http+env_keys: [VT_APIKEY]),curl -i --config -verification, and Python Google Agent Development Kit (McpToolset+StreamableHTTPConnectionParams, notingMINIMAL_LOGGING=Yso ADK debug tracing does not logx-apikey).ask_gti_agent,continue_chat,list_sessions,get_session_history,delete_session,share_session,copy_shared_session), multi-turn investigation examples (distinguishing standard YARA file rules from Chronicle YARA-L 2.0 UDM detection rules), VirusTotal AI Hosted MCP coverage (browser OAuth 2.1 withvt:reports:read/vt:submissions:write/vt:network-analysis:writeand headlessvtai_...Agent Token authentication, standalone unlinked VTAI account caveats, all 11 hosted tools including base64submit_fileandsubmit_attachment, 24 MB decoded upload limit and quotas,get_url_reportURL privacy notes, Antigravity / Gemini CLI / Claude Code / Codex / Cursor / VS Code setup), and a troubleshooting matrix includingHTTP 403 Invalid Agent TokenandX-VTAI-Error: unexpanded_credential.run-with-google-adkand updatesdocs/remote_server.md:run-with-google-adk/pyproject.toml,run-with-google-adk/src/mcp_security_agent/config.py,toolsets.py,cli.py,server/routes.py,.env.example,README.md, and tests (test_config.py,test_toolsets.py,test_server.py): ImplementsGTI_MCP_URL(with automatic/api/v3/agentspace/mcp/trailing-slash normalization,www.virustotal.com/ai.virustotal.comhost-pinnedx-apikeypropagation,vtai_token guard onai.virustotal.com/mcp,follow_redirects=Falseclient factory to block cross-origin andhttp://redirect leaks across allmcp1.x versions, and 300s timeouts),SECOPS_MCP_URLandSCC_MCP_URL(withhttps://*.googleapis.comand URL-userinfo validation plus anhttpx.URL-normalized_GoogleCloudMcpAuth(httpx.Auth)client factory wrappingcreate_mcp_http_clientso ADC /SECOPS_SA_PATH/ impersonated credentials andx-goog-user-projectattach on bothget_tools(None)andget_tools(ctx), handle explicit:443ports, fall back to ADCquota_project_id, and rotate expired or401-rejected OAuth bearer tokens on a single pooled MCP session), andMINIMAL_LOGGING=Ylogger/telemetry/span/SSE sanitization.docs/remote_server.md: Standardizes Gemini CLI server key on"remote-mcp-secops"and"timeout": 60000, documents regional endpoints (https://<region>-chronicle.googleapis.com/mcp) for non-US Google SecOps tenants, addsroles/serviceusage.serviceUsageConsumerand Chronicle data role prerequisites, and updates the ADK Python snippet to useSecOpsGoogleAuth(httpx.Auth)+create_mcp_http_clientwithhttpx.URLorigin normalization, 1-shot401refresh, andfollow_redirects=False.extensions/google-secops/TOOL_MAPPING.md,docs/servers/gti_mcp.md, andserver/gti/README.md: Reconciles localserver/secopstool names (get_security_alerts,get_security_alert_by_id,do_update_security_alert,list_security_rules,search_security_rules,get_detection_rule,get_rule_detections,test_rule,get_stats), maps RemoteUDM Stats / Aggregationtoudm_search(stats.results), maps RemoteAssign CaseandChange Case Stagetoupdate_case, fixes validCOLLECTION_RELATIONSHIPS(files,domains,ip_addresses,urls, etc.) anddescriptors_onlysignatures acrossdocs/servers/gti_mcp.mdandserver/gti/README.md, and maps 3-way GTI / VirusTotal capabilities.gemini-extension.json,extensions/google-secops/GEMINI.md,extensions/google-secops/skills/hunt/SKILL.md,triage/SKILL.md,investigate/SKILL.md,setup-gemini-cli/SKILL.md,setup-antigravity/SKILL.md,setup-antigravity/mcp_config.template.json,docs/google_secops_extension.md,docs/personas/cti_researcher.md,docs/personas/threat_hunter.md,README.md,docs/index.md,docs/toc.md, anddocs/usage_guide.md: Unifies"remote-mcp-secops"across Gemini CLI docs andgemini-extension.json, adds 60s timeouts across Gemini CLI and Antigravity (remote-secops-investigate/remote-secops-admin) configs, fixesgemini extensions install .root path and regional endpoint derivation, fixesget_entities_related_to_a_collectionrelationship arguments and UDM hash/IP fields insecops-hunt, wires optional GTI / VirusTotal IoC enrichment (with URL token privacy, submission confirmation, and session batching guards) intosecops-triage,secops-investigate, andcti_researcher.md, and addsgti-agenticto the Threat Hunter and CTI Researcher persona guides.Related PRs
gti-mcpPython wrappers for/api/v3/agentspace/sessionsand workflow guides).MD001,MD025,MD042,MD045,MD059); if docs: add WCAG 2.1 AA accessibility checks and reconcile documentation with main #340 merges first,docs/index.mdrequires merging the Remote MCP Server for Google Threat Intelligence entry at 3 sites (Choose your setup, theMCP serverstable, and{toctree}), alongside 1-line additions indocs/toc.mdanddocs/usage_guide.md.Verification
tools/listand tool execution via ADKbuild_mcp_toolsetsagainst bothhttps://www.virustotal.com/api/v3/agentspace/mcp(7 tools, stateless response with noMcp-Session-Idheader,list_sessions(limit=1)isError=False) and Google SecOps Remote MCP (https://us-chronicle.googleapis.com/mcpandhttps://chronicle.us.rep.googleapis.com:443/mcp,get_tools(None)=74,get_tools(ctx)=74on 1 pooled session, SIEMlist_rulesisError=False, SOARlist_casesisError=False, and SOARlist_integrationsisError=False), plus cross-schemeHTTP 307trailing-slash redirect behavior,HTTP 406Acceptheader validation, andai.virustotal.com/mcpHTTP 403 Invalid Agent Tokenbehavior.run-with-google-adkhermetic unit and loopback HTTP test suite (pytest tests/):54 passedacross both latest dependencies (google-adk 2.14.1,mcp 1.30.0, Python 3.12) and--resolution=lowest-directfloor dependencies (google-adk==2.0.0,google-auth[requests]==2.48.1,google-genai==1.72.0,httpx==0.28.1,mcp==1.24.0,typer==0.16.0, Python 3.11), including mutation-verified origin-pinning, host-allowlist, no-redirect,:443port normalization, 1-shot401token refresh, andMINIMAL_LOGGING=YSSE tests.sphinx-build -b html -E docs ...) with zeromyst.xref_missingor syntax warnings introduced across modified pages, and verified self-contained SVG contrast (>= 5.7:1 border contrast and >= 11.8:1 text contrast across light and dark backgrounds).docs/gti_remote_server.md,docs/remote_server.md,run-with-google-adk/README.md,docs/google_secops_extension.md,gemini-extension.json, andmcp_config.template.json, AST-verified every local tool and relationship name againstserver/gti,server/secops, andserver/secops-soar, and passedgit diff --check.