从零写一个 MCP Server:文件搜索工具实战
用 100 来行 TypeScript 写一个能在 Claude Code、Cursor 里直接使用的文件搜索 MCP Server:工具定义、参数校验、路径安全、接入配置和调试方法,一篇跑通全流程。
用 100 来行 TypeScript 写一个能在 Claude Code、Cursor 里直接使用的文件搜索 MCP Server:工具定义、参数校验、路径安全、接入配置和调试方法,一篇跑通全流程。
给 AI 接上 MCP Server,等于给它装了能读写真实系统的插件——能力和风险同时放大。本文梳理 MCP 的四类主要安全风险:过度授权、提示注入、恶意/仿冒 Server、数据外泄,并给出接入前的安全清单。
读 MCP 文档最容易被 Host、Client、Server 三个词绕晕。本文用一张清晰的角色图讲透三者各自负责什么、消息怎么流动、为什么要这么分,看完再也不会把 Client 和 Server 搞混。
Function Calling 是模型的能力,MCP 是工具的分发协议,两者不在同一层,也不互相替代。本文讲清两者的关系、MCP 解决的 M×N 集成问题,以及「自研应用、接入生态、对外分发」三种场景下的选择建议。
Multiple agents collaborating sounds more capable than one, but many multi-agent systems are simply slower, more expensive, and harder to debug. This guide explains where they offer real value, their hidden costs, and one pragmatic rule: optimize a single agent before splitting the work among several.
When an Agent runs away, stalls, or returns the wrong answer, which layer actually failed? This guide groups eight causes across task definition, tools, context, and loop control, then gives diagnostic signals and fixes for each so you can locate the specific fault instead of deciding that the Agent simply does not work.
让 AI 自己点网页、填表单、订机票,Browser Agent 背后是一套「看页面 → 决定动作 → 执行 → 再看」的循环。本文讲清它感知网页的两条路线(截图视觉 vs DOM 结构)、动作是怎么执行的、以及为什么它又慢又容易失败。
Claude Code、Cursor Agent 这类工具凭什么能自己读代码库、改多个文件、跑测试?本文拆开 Code Agent 的内部循环:它如何在一个装不下整个项目的上下文里定位代码、制定计划、执行编辑、验证结果并回滚,讲清能力与边界。
Agent memory is not simply a record of every conversation. This guide separates memory into task state, cross-session long-term memory, and vector retrieval, then explains what each layer should store, how entries are written and retired, and how to prevent memory poisoning.
ReAct thinks and acts one step at a time, Plan-and-Execute plans before moving, and Reflection checks the work afterward. This guide explains the problem each common Agent pattern solves, the cost it introduces, and how to combine the three in practice.
Agent loss of control is not a science fiction problem but an engineering one: overly broad tool permissions, injection of instructions via external content, contaminated memory, and undefined task boundaries. This article dissects the four most common failure modes and provides a practical framework for protective design.
A guide for technical and product professionals changing direction or upgrading their capabilities, ranking the AI skills worth investing in during 2026 by employment value, learning difficulty, salary premium, and future demand.
Showing 12 of 12 articles