Grok Bot工作计划AI 评分 · 77/100AI 辅助编辑·未发现明显提示词注入风险X

用 Grok Bot 盘点影子 MCP 服务器

输入:你的 Agent 技术栈信息 → 处理:Grok Bot 按提示词扫描代码仓库与本地配置 → 输出:MCP 服务器清单 CSV + 风险摘要

经验丰富步骤提示词流程贴士
给谁
运行 Agent 基础设施的工程师、平台安全人员,需要清点团队实际在用的 MCP 服务器
你会得到
获得一份完整的 MCP 服务器清单(mcp-inventory.csv),标记未审批、未固定版本、未过网关的高风险条目
你需要
Grok Bot

硬约束

需要 Grok Bot 账号及 MCP 文件系统/代码仓库读取权限。在会话开始时粘贴一次「stack context」模板,填写你的 Agent 客户端、运行环境、已知 MCP 服务器、网关、代码仓库等信息;随后运行 Prompt 1 让 Grok Bot 扫描并输出清单。来源未说明具体费用条件。

他们做了什么

作者 themsquared(Solo 公司 agentgateway 项目成员)在日常工作中通过 Grok Bot 串联 GitHub、邮件、日历、笔记等 MCP 工具。过去数月,他在 Substrate 90 系列实验中反复测试 Agent 基础设施场景,从中筛选出 17 个可复用的提示词,整理为模板发布。

效果如何

作者报告:每个实验都是「先搭建、后写作」,这些提示词是实际复用率最高的(author_report)。他提到多数团队只用到 Grok Bot 能力的约 10%,而直接要求输出文件而非解释能显著提升实操效率。

值得知道

1. 来源共 17 条提示词,本案例仅收录会话开场词与 Prompt 1(影子 MCP 盘点),其余 15 条需从原文按需取用。2. 所有提示词均不索要密钥;如需凭证会明确要求用户补充或改用脱敏副本。3. 作者建议按 8 周计划逐步执行,而非一次性跑完。4. 输出为 mcp-inventory.csv 及风险摘要,但来源未展示具体样例。5. 需要 Grok Bot 具备读取指定代码仓库和本地文件系统的权限,权限不足时它会停止并说明缺失项。6. 本站未实测该流程,reproduction=not_tested。

步骤

  1. 配置会话上下文

    在 Grok Bot 新会话中粘贴以下启动模板,用你实际的环境信息替换方括号内容。留空表示「未知」,这也是有效信息。该上下文只需在会话开始时加载一次,后续所有提示词都会复用。

    搭建指导 · 来源原文。Grok Bot 会话开场输入框

    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. 运行 Prompt 1:盘点影子 MCP 服务器

    在已加载上下文的同一会话中,发送以下提示词。Grok Bot 将扫描你指定的代码仓库和本地机器上的 MCP 配置文件,生成一份清单并标记风险最高的五项。

    运行提示词 · 来源原文。Grok Bot 对话输入框,复用同一会话的 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.

可复制提示词

搭建指导 · 来源原文。Grok Bot 会话开场输入框

这一段是提示词,页面不会在这里插入广告。

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.

无独立主提示词;搭建启动词(session opener)已放入步骤 1,执行提示词已放入步骤 2

来源

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

留言与反馈

试过这个方法吗?分享效果、遇到的问题或改进建议。留言审核后公开,请勿填写敏感信息。

正在加载…

    相关用例