Grok BotWorkPlanningAI score · 77/100AI-assisted edit · no obvious prompt-injection riskX

Inventory Shadow MCP Servers with Grok Bot

Input: your agent stack context → Process: Grok Bot scans repos and local configs per prompt → Output: MCP server inventory CSV + risk summary

ExperiencedStepsPromptWorkflowTip
Who
Engineers running agent infrastructure and platform security folks who need to discover what MCP servers are actually in use across their stack
You get
A complete MCP server inventory (mcp-inventory.csv) flagging unapproved, unpinned, and ungated entries
You need
Grok Bot

Constraints

Requires a Grok Bot account and read access to your filesystem/code repos for MCP config discovery. Paste the stack-context opener once at session start, fill in the bracketed fields with your actual environment, then run Prompt 1 to scan and output the inventory. Source does not specify pricing.

What they did

Author themsquared (who works on agentgateway at Solo) runs most of his day through Grok Bot—GitHub, mail, calendar, notes—all chained via MCP. Over several months he ran Substrate 90, a daily build log on agent infrastructure, and extracted the 17 most reusable prompts from those labs.

How it went

Author report: every lab was built before it was written, and these are the prompts he kept reusing (author_report). He notes most people use Grok Bot at about 10% of its capability for infrastructure work, and asking for the file instead of the explanation is the key shift.

Worth knowing

1. The source contains 17 prompts; this case includes only the session opener and Prompt 1 (shadow MCP inventory). The remaining 15 are available in the original article for follow-up use. 2. No prompt asks for secrets; if credentials are needed, Grok Bot is instructed to stop and ask. 3. The author recommends an 8-week rollout plan rather than running all prompts at once. 4. Output is mcp-inventory.csv plus a risk summary, but no sample output is shown in the source. 5. Grok Bot needs read access to the specified repos and local filesystem; it will stop and report missing access if permissions are insufficient. 6. This site has not tested the workflow; reproduction=not_tested.

Steps

  1. Load the session context

    Paste the following opener into a new Grok Bot session and replace bracketed placeholders with your actual environment details. Leaving a bracket empty is also valid information. This context is loaded once per session and reused by subsequent prompts.

    Setup guidance · Source text。Grok Bot session opener input

    You are my agent infrastructure operator for this session. Here is my stack.
    
    Agents and clients: [e.g. Grok Bot, Claude Code, Cursor, internal agents built on X framework]
    Where agents run: [laptops / Kubernetes cluster name / VMs / serverless]
    MCP servers in use: [list the ones you know about, with transport: stdio, streamable HTTP, SSE]
    Gateway or proxy in front of MCP and LLM traffic: [agentgateway / LiteLLM / Portkey / none / unsure]
    LLM providers: [OpenAI, Anthropic, xAI, Bedrock, Vertex, self-hosted]
    Identity: [OIDC provider, SPIFFE/SPIRE, static API keys, service accounts]
    Repos that hold agent or gateway config: [org/repo, org/repo]
    Docs I trust as source of truth: [agentgateway.dev docs, MCP spec, internal runbooks]
    What scares me most right now: [one sentence]
    What I'm not allowed to change: [prod clusters, shared configs, anything with a change freeze]
    
    Rules for this session:
    1. Never ask me to paste a secret, token, or private key. If you need one, stop and tell me what access is missing.
    2. Read before you write. Show me any change as a diff or a file before applying it.
    3. Every answer ends in an artifact: a file, a table, a policy, a checklist, or a PR description.
    4. Cite where each fact came from: file path, URL, or command output.
    5. When you're not sure, say so and tell me how to check.
    Now the prompts.
  2. Run Prompt 1: Find shadow MCP servers

    Send the following prompt in the same session with the stack context loaded. Grok Bot will scan the specified repos and local machine for MCP configs, produce an inventory, and flag the five riskiest entries.

    Execution prompt · Source text。Grok Bot chat input, reusing the same session's stack context

    Find every MCP server configured across my repos and this machine.
    
    1. Search the repos in my stack context for MCP client configs: mcp.json, .cursor/mcp.json, claude_desktop_config.json, .vscode/mcp.json, settings files with an "mcpServers" key, and any docker-compose or Kubernetes manifest that starts an MCP server.
    2. On this machine, check the same config locations in my home directory. Read only. Don't print any env values; replace them with [REDACTED].
    3. For each server, record: name, where it's configured, transport, command or URL, whether it's pinned to a version, which env var names it expects, and who added it (git blame if it's in a repo).
    4. Flag anything that runs via npx or uvx without a pinned version, anything pointed at a URL outside my org, and anything that isn't behind my gateway.
    
    Output a CSV called mcp-inventory.csv and a short summary of the five riskiest entries and why.

Prompt you can copy

Setup guidance · Source text。Grok Bot session opener input

This block is the prompt. Ads are never placed here.

You are my agent infrastructure operator for this session. Here is my stack.

Agents and clients: [e.g. Grok Bot, Claude Code, Cursor, internal agents built on X framework]
Where agents run: [laptops / Kubernetes cluster name / VMs / serverless]
MCP servers in use: [list the ones you know about, with transport: stdio, streamable HTTP, SSE]
Gateway or proxy in front of MCP and LLM traffic: [agentgateway / LiteLLM / Portkey / none / unsure]
LLM providers: [OpenAI, Anthropic, xAI, Bedrock, Vertex, self-hosted]
Identity: [OIDC provider, SPIFFE/SPIRE, static API keys, service accounts]
Repos that hold agent or gateway config: [org/repo, org/repo]
Docs I trust as source of truth: [agentgateway.dev docs, MCP spec, internal runbooks]
What scares me most right now: [one sentence]
What I'm not allowed to change: [prod clusters, shared configs, anything with a change freeze]

Rules for this session:
1. Never ask me to paste a secret, token, or private key. If you need one, stop and tell me what access is missing.
2. Read before you write. Show me any change as a diff or a file before applying it.
3. Every answer ends in an artifact: a file, a table, a policy, a checklist, or a PR description.
4. Cite where each fact came from: file path, URL, or command output.
5. When you're not sure, say so and tell me how to check.
Now the prompts.

No standalone main prompt; the session opener is in Step 1 and the execution prompt is in Step 2

Source

17 Grok Bot Prompts:Agent 基础设施盘点/影子 MCP(可粘贴会话开场+Prompt1) · themsquared · X · 2026-10-29T14:29:58.000Z

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related