Mini Agent MCP
Mini Agent MCP is an intelligent agent server combining built-in utility tools, web search capabilities, and a ReAct-based autonomous agent to complete complex multi-step tasks. It supports client-side LLM reasoning via MCP Sampling or direct OpenAI-compatible API calls.
🤖 ReAct Autonomous Agent (run_agent)
Plans and executes multi-step tasks using a Thought → Action → Observation loop
Chains up to 8 tool calls, combining any available tools automatically
Falls back to a rule-based engine if no LLM is configured
🧮 Built-in Utility Tools
Calculator: Evaluate mathematical expressions (arithmetic, trig, logarithms, constants like pi/e)
Text Analysis (
text_stats): Get character/word/sentence/paragraph counts, average word length, and most frequent wordsText Transform (
text_transform): Apply uppercase, lowercase, titlecase, reverse, trim, sort lines, remove duplicates, count/replace substringsUnit Conversion (
unit_convert): Convert length, weight, temperature, and data storage unitsDate & Time (
datetime_info): Get current date/time (with timezone support), format dates, or calculate differences between datesRandom Generation (
random_gen): Generate random integers, UUID v4s, custom passwords, or pick/shuffle items from a list
🔍 AnySearch Web Tools
Search (
anysearch_search): General or vertical web searches (finance, academic, legal, health, etc.)Batch Search (
anysearch_batch_search): Run up to 5 parallel search queries in a single callURL Extraction (
anysearch_extract): Fetch and convert any webpage's content to clean Markdown (up to 50,000 characters)Domain Discovery (
anysearch_get_sub_domains): Discover available vertical search sub-domains and required parameters before performing specialized searches
Allows the MCP server to call an OpenAI-compatible API for LLM reasoning, enabling the agent to perform complex multi-step tasks using either client-side sampling or direct HTTP with OpenAI models.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Mini Agent MCPSearch for the area of Canada and convert to square kilometers."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mini Agent MCP
中文名称: Mini Agent MCP 智能代理服务器
英文名称: Mini Agent MCP
服务分类: 搜索工具 / AI Agent / 开发者工具
来源地址: https://github.com/Microbiosis/mini-agent-mcp
托管部署: 可托管部署(无本地环境依赖,支持云端一键部署)
服务介绍
Mini Agent MCP 是一个集成了 ReAct 小型 Agent 的 MCP (Model Context Protocol) 智能代理服务。Agent 可以自主调用多个工具完成复杂的多步任务,支持 LLM 驱动和规则引擎两种模式。
内置 AnySearch 搜索能力 — 网页搜索、域名搜索、批量搜索、URL 内容提取。Agent 支持多模型 LLM 通信,优先使用 MCP Sampling(客户端模型),也支持 Direct HTTP 回退。
Related MCP server: mcp-toolkit
服务描述
基于 MCP 协议的智能代理服务器,集成了 7 个内置工具(计算器、文本分析、文本转换、单位转换、日期时间、随机生成、ReAct Agent)和 4 个 AnySearch 搜索工具。支持多步推理(最多 8 步),可自主组合调用工具完成任务。支持 MCP Sampling 多模型通信,无需服务器端 API Key 即可调用 LLM。
✨ 核心功能
🧮 内置工具 — 计算器、文本分析、文本转换、单位转换、日期时间、随机生成,共 6 个无需 API Key 的本地工具
🤖 ReAct Agent — 支持 Thought → Action → Observation 多步推理循环,最多可组合调用 8 个工具步骤
🔍 AnySearch 搜索 — 通过 MCP Streamable HTTP 集成 AnySearch,支持通用搜索、批量搜索(1-5 并行)、URL 内容提取、垂直领域搜索
🔗 多模型通信 — 支持 MCP Sampling(客户端模型)和 Direct HTTP(自有 API)两种 LLM 通信方式,兼容 OpenAI / Anthropic 两种 API 格式
☁️ 可托管部署 — 无本地环境依赖,可一键部署到 ModelScope MCP 广场,自动生成 SSE 访问地址
🔁 自动重试 — 工具调用失败自动重试 3 次,指数退避(1s → 2s → 4s)
🚀 快速上手
方式 1: MCP 客户端配置(推荐)
ZCode
{
"mcpServers": {
"mini-agent-mcp": {
"type": "stdio",
"command": "npx",
"args": ["mini-agent-mcp"],
"env": {
"ANYSEARCH_API_KEY": "",
"LLM_API_FORMAT": "openai",
"LLM_API_KEY": "",
"LLM_BASE_URL": "",
"LLM_MODEL": ""
}
}
}
}在 ZCode 中使用时,Agent 优先使用 MCP Sampling(ZCode 的 LLM)。配置
LLM_*后可作为回退:Sampling 失败时自动切换到 Direct HTTP。
方式 2: .env 文件(fallback)
当 MCP 客户端不传递环境变量时,在服务器工作目录创建 .env 文件:
# 复制模板
cp .env.example .env
# 编辑 .env 填入值
ANYSEARCH_API_KEY=xs_xxxxx
LLM_API_KEY=lc_xxxxx
LLM_BASE_URL=https://api.longcat.chat/openai
LLM_MODEL=LongCat-2.0-Preview服务器启动时自动读取
.env文件,无需客户端传递变量。
方式 3: 本地开发
git clone https://github.com/Microbiosis/mini-agent-mcp.git
cd mini-agent-mcp
npm install
npm run build
node dist/index.js # 运行 MCP 服务器
node dist/index.js --test # 运行测试🛠️ 工具列表
内置工具
工具名称 | 说明 | 参数 |
| 安全数学表达式求值(支持 sqrt, sin, cos, pi 等) |
|
| 文本统计分析(字数、词频、句子数等) |
|
| 文本转换(大小写、反转、排序、去重等) |
|
| 单位转换(长度、重量、温度、数据) |
|
| 日期时间查询、格式化、差值计算 |
|
| 随机数、UUID、密码、列表抽取 |
|
| ReAct Agent — 自主调用上述工具完成多步任务 |
|
AnySearch 工具(自动发现)
启动时自动连接 https://api.anysearch.com/mcp 动态发现:
工具名称 | 说明 | 参数 |
| 通用搜索(支持金融、学术、法律等垂直领域) |
|
| 1-5 个独立查询并行搜索 |
|
| URL 网页内容提取(Markdown,最多 50,000 字符) |
|
| 查询垂直领域目录(领域搜索前必须先调用) |
|
🤖 Agent 工作流程
用户任务 → [Thought: 分析任务]
→ [Action: 选择工具] → [执行工具] → [Observation: 观察结果]
→ [Thought: 继续推理]
→ ... (最多 8 步)
→ [Final Answer: 最终答案]📡 LLM 通信模式
Agent 支持三种 LLM 通信方式,按优先级自动选择:
方式 1: MCP Sampling(推荐)
服务器通过 MCP 协议的 sampling/createMessage 请求,让**客户端(如 ZCode / Claude Desktop / Cursor)**代为调用 LLM。
零配置 — 服务器不需要 API Key,不需要知道模型名称
客户端决定模型 — 客户端使用用户选择的模型
支持多模型通信 — 客户端可以灵活选择不同的模型进行推理
这是 MCP 的原生多模型通信方式。只要客户端支持 sampling,Agent 就能使用客户端的 LLM。
方式 2: Direct HTTP(回退)
服务器直接调用 LLM API。需要设置环境变量:
变量 | 必需 | 说明 | 示例 |
| 是 | API 密钥 |
|
| 是 | API 端点 |
|
| 是 | 模型名称 |
|
| 否 |
|
|
方式 3: 规则引擎(兜底)
无 LLM 时自动启用,通过模式匹配处理常见任务(数学计算、单位转换、时间查询、密码/UUID 生成、文本分析、多步复合任务)。
总结
场景 | LLM 模式 |
在 ZCode / Claude / Cursor 中作为 MCP 服务器运行 | MCP Sampling(客户端模型)✅ |
独立运行 + 设置了 | Direct HTTP |
独立运行 + 未设置环境变量 | 规则引擎模式(无 LLM) |
🌐 支持的 LLM 供应商
OpenAI Chat Completions 格式
LLM_API_FORMAT=openai 或不设置(自动识别)
供应商 |
|
|
LongCat |
|
|
OpenAI |
|
|
DeepSeek |
|
|
SenseNova |
|
|
kimi |
|
|
Ollama |
|
|
Anthropic Messages 格式
LLM_API_FORMAT=anthropic 或不设置(URL 含 /anthropic 自动识别)
供应商 |
|
| 认证头 |
LongCat (Anthropic) |
|
|
|
SenseNova (Anthropic) |
|
|
|
Anthropic |
|
|
|
格式自动识别:代码从
LLM_BASE_URL自动判断用哪种格式发请求:
URL 含
/anthropic→ Anthropic 格式其他 → OpenAI 格式
🔧 环境变量
变量 | 必需 | 说明 | 默认值 |
| 否 | AnySearch API Key | 匿名访问(更低限额) |
| 否 | LLM API 密钥 | 无(回退到 Sampling) |
| 否 | LLM 端点 URL | 无 |
| 否 | LLM 模型名称 | 无 |
| 否 |
| 自动识别 |
传递方式:
MCP 客户端
env字段(标准方式).env文件(服务器启动时读取,fallback)
📋 使用示例
内置工具调用示例
Task: "Calculate 25 * 4 + sqrt(81) and then convert 500 grams to pounds"Agent 会自动:
调用
calculator计算25 * 4 + sqrt(81) = 109调用
unit_convert转换500 grams = 1.10 pounds返回完整的推理过程和最终答案
搜索任务示例
Task: "Search for the latest AI agent frameworks and summarize the top 3"Agent 会调用 anysearch_search 获取搜索结果,然后推理总结。
批量搜索示例
Task: "Search for 'React vs Vue' and 'TypeScript trends 2025' in parallel"Agent 会调用 anysearch_batch_search 同时发起多个查询。
🏗️ 项目结构
mini-agent-mcp/
├── LICENSE # Apache-2.0 许可证
├── README.md # 项目文档
├── .env.example # 环境变量模板
├── package.json # NPM 包配置
├── tsconfig.json # TypeScript 配置
├── assets/
│ └── icon.png # 项目图标 (512x512)
├── src/
│ ├── index.ts # MCP 服务器入口(含 .env 加载 + 重试)
│ ├── tools/
│ │ ├── types.ts # 工具类型定义
│ │ ├── registry.ts # 工具注册表
│ │ ├── calculator.ts # 数学计算器
│ │ ├── text.ts # 文本工具
│ │ ├── converter.ts # 单位转换
│ │ ├── datetime.ts # 日期时间
│ │ ├── random.ts # 随机生成
│ │ ├── anysearch-client.ts # AnySearch MCP 客户端封装
│ │ └── anysearch.ts # AnySearch 工具动态包装
│ └── agent/
│ ├── llm.ts # LLM 通信层 (采样 + HTTP + 多供应商)
│ ├── react.ts # ReAct 推理循环
│ └── index.ts # Agent 工具定义
└── dist/ # 编译输出🔐 安全说明
无本地数据存储
API Key 通过环境变量传递,不写入代码或日志
使用 MCP 标准协议通信
托管部署在阿里云函数计算 MicroVM 沙箱隔离环境中运行
SSE 访问地址为专属敏感信息,请勿泄露
⚠️ 使用限制
免费托管服务有调用配额限制(超限返回 HTTP 429)
匿名 AnySearch 访问有速率限制(建议配置 API Key)
Agent 单次任务最多 8 个工具调用步骤
工具调用超时 60 秒,LLM 推理超时 120 秒
工具失败后自动重试 3 次(指数退避)
📄 许可证
Apache License 2.0 © 2026 Microbiosis
本项目集成了 AnySearch(Apache-2.0 许可证)。
🤝 贡献
欢迎提交 Issue 和 PR:https://github.com/Microbiosis/mini-agent-mcp/issues
Fork → 修改 → 提交请求即可。
🔗 相关链接
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Microbiosis/mini-agent-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server