跳转至内容
  • 版块
  • 最新
  • 标签
  • 热门
  • 世界
  • 用户
  • 群组
皮肤
  • 浅色
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • 深色
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
AI订阅指南

AI订阅指南

  1. 主页
  2. 项目展示
  3. Connecting an MCP server gives your agent hands. It also gives a stranger a way in.

Connecting an MCP server gives your agent hands. It also gives a stranger a way in.

已定时 置顶 已锁定 已移动 项目展示
10 评论 7 发布者 3.8k 浏览 2 关注中
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • 芦 离线
    芦 离线
    芦苇驻足
    编写于 最后由 编辑
    #1

    来源:https://dev.to/rapls/connecting-an-mcp-server-gives-your-agent-hands-it-also-gives-a-stranger-a-way-in-3mgi


    The moment you connect an MCP server, your coding agent stops being a thing that reads and writes in your repo and becomes a thing that can reach out and act. Read a database, hit an API, touch a service, pull in a web page. That's the entire appeal. It's also the entire problem.

    I went through this wiring up tools for my own plugin work, and the thing that saved me from a worse mistake was a scar I already had. I'd shipped an AI chatbot earlier where I rendered the model's output straight to the page and ate an HTML injection bug. That one taught me a rule the hard way: anything an LLM hands back is untrusted input. MCP is that same lesson with the blast radius turned up.

    When people talk about agent safety, they almost always mean: what if the agent runs something destructive. Deletes files, force-pushes, curls something it shouldn't. But it's only half the threat. The other half is quieter: what if the agent believes something it shouldn't. An MCP server returns an API response, a database row, an issue body, an email thread, and somewhere in that returned content is a line that reads like an instruction. The model has no reliable way to tell your instruction from text that arrived inside data.

    Whatever an MCP server returns is in exactly the same trust category as a string a stranger typed into a form on your site. Not "data from my tool." Data from outside, that happens to arrive through my tool.

    The other half, the destructive-command fear, does have a settings answer. In Claude Code that's the sandbox: turn it on and Bash execution gets isolated at the OS level. Here's the part that surprised me: the sandbox restricts writes to your working directory, but by default it still allows reads across most of the machine. Which means credentials like ~/.aws/credentials and ~/.ssh/ are readable unless you say otherwise.

    The server itself is attack surface. A connected MCP server you didn't vet is code running in your loop with a channel into your agent. So three habits: Vet the source before you connect it. Drop the ones you're not using. If a CLI already does the job, don't stand up a server at all.

    Before I wire up any MCP server, three questions: Do I trust where this server came from. What's the worst command it could talk my agent into, and is that command walled off by deny rules. Is the output going to get treated as untrusted input everywhere it lands.

    Connecting a server is genuinely the moment your agent grows hands. Worth remembering that hands can be guided by whoever's holding the other end of the tool.

    (此帖无评论)


    1 条回复 最后回复
    51
    • 猫 离线
      猫 离线
      猫港
      编写于 最后由 编辑
      #2

      有推荐的 Agent 监控工具吗?主要用于追踪执行流程。

      1 条回复 最后回复
      14
      • 斜 离线
        斜 离线
        斜阳焚香
        编写于 最后由 编辑
        #3

        我用 Claude Code 重构了一个 3000 行的模块,质量比人工写的高。

        1 条回复 最后回复
        16
        • 烟 离线
          烟 离线
          烟雨吹风
          编写于 最后由 编辑
          #4

          Claude Code 写 TypeScript 项目一流,Python 也行,Java 差点意思。

          1 条回复 最后回复
          15
          • I 离线
            I 离线
            illusionist26
            编写于 最后由 编辑
            #5

            有推荐的 Agent 监控工具吗?主要用于追踪执行流程。

            1 条回复 最后回复
            4
            • P 离线
              P 离线
              pro4
              编写于 最后由 编辑
              #6

              Claude Code 写 TypeScript 项目一流,Python 也行,Java 差点意思。

              1 条回复 最后回复
              5
              • 兰 离线
                兰 离线
                兰亭山中
                编写于 最后由 编辑
                #7

                Agent 的 token 消耗是普通对话的 3-5 倍,有优化技巧吗?

                1 条回复 最后回复
                8
                • 轻 离线
                  轻 离线
                  轻语少年
                  编写于 最后由 编辑
                  #8

                  有对比过 Claude Code 和 Cursor 的性能差异吗?

                  1 条回复 最后回复
                  9
                  • 微 离线
                    微 离线
                    微醺茶馆
                    编写于 最后由 编辑
                    #9

                    Claude Code 写 TypeScript 项目一流,Python 也行,Java 差点意思。

                    1 条回复 最后回复
                    3
                    • 余 离线
                      余 离线
                      余挽
                      编写于 最后由 编辑
                      #10

                      有推荐的 Agent 监控工具吗?主要用于追踪执行流程。

                      1 条回复 最后回复
                      3

                      你好!看起来您对这段对话很感兴趣,但您还没有一个账号。

                      厌倦了每次访问都刷到同样的帖子?您注册账号后,您每次返回时都能精准定位到您上次浏览的位置,并可选择接收新回复通知(通过邮件或推送通知)。您还能收藏书签、为帖子顶,向社区成员表达您的欣赏。

                      有了你的建议,这篇帖子会更精彩哦 💗

                      注册 登录
                      回复
                      • 在新帖中回复
                      登录后回复
                      • 从旧到新
                      • 从新到旧
                      • 最多赞同


                      • 登录

                      • 没有帐号? 注册

                      • 登录或注册以进行搜索。
                      Powered by NodeBB Contributors
                      • 第一个帖子
                        最后一个帖子
                      0
                      • 版块
                      • 最新
                      • 标签
                      • 热门
                      • 世界
                      • 用户
                      • 群组