onion-mcp-server
OfficialProvides web search capabilities using DuckDuckGo, enabling AI agents to search the web without an API key.
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., "@onion-mcp-serverTranslate 'Hello, world!' to French."
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.
onion-mcp-server
A feature-rich MCP Server for onion-ai — 30 tools across 6 categories.
✨ 工具列表(30 个)
分组 | 工具 | 说明 |
🤖 AI |
| 多轮对话,支持历史和 system prompt |
🤖 AI |
| 智能翻译,40+ 语言,自动检测源语言 |
🤖 AI |
| 长文摘要(要点/段落/一句话) |
🤖 AI |
| 文本改写(正式/口语/简洁/扩写) |
🤖 AI |
| 结构化信息提取(人名/地名/关键词等) |
🤖 AI |
| 文本分类(情感/主题/意图/自定义) |
💻 Code |
| 解释代码逻辑 |
💻 Code |
| 代码审查(Bug/安全/性能/风格) |
💻 Code |
| 根据描述生成代码 |
💻 Code |
| 代码语言转换 |
💻 Code |
| 修复代码错误 |
💻 Code |
| 生成文档注释 |
📝 Text |
| JSON/YAML/纯文本格式化 |
📝 Text |
| 文本差异对比(unified diff) |
📝 Text |
| 模板渲染( |
📝 Text |
| 字数/行数/Token 统计 |
📝 Text |
| 清理文本(去空行/去重/标准化) |
📊 Data |
| JSONPath 风格查询 |
📊 Data |
| CSV 数据分析与统计 |
📊 Data |
| 数据转 Markdown 表格 |
📊 Data |
| JSON/CSV/YAML/TOML 互转 |
🌐 Web |
| 抓取网页内容(返回纯文本) |
🌐 Web |
| DuckDuckGo 搜索(无需 API Key) |
🌐 Web |
| 提取网页结构化信息 |
⚙️ System |
| 获取当前时间(支持时区) |
⚙️ System |
| 生成 UUID(v1/v4) |
⚙️ System |
| 计算 Hash(md5/sha256 等) |
⚙️ System |
| Base64 编解码 |
⚙️ System |
| URL 编解码 |
⚙️ System |
| JSON 格式验证 |
Related MCP server: mcp-web-calc
🚀 快速开始
方式一:通过 onion CLI(推荐)
# 1. 设置 API Key
export ONION_MCP_API_KEY=sk-...
export ONION_MCP_MODEL=gpt-4o-mini # 可选,默认 gpt-4o-mini
export ONION_MCP_BASE_URL=https://... # 可选,兼容 DeepSeek/Qwen/Ollama
# 2. 添加到 onion
onion mcp add onion-mcp \
-c uvx \
-a '["onion-mcp-server"]' \
--env '{"ONION_MCP_API_KEY":"sk-...","ONION_MCP_MODEL":"gpt-4o-mini"}'
# 3. 测试
onion mcp inspect onion-mcp
onion mcp call onion-mcp sys_time '{}'
onion mcp call onion-mcp ai_translate '{"text":"Hello world","target_language":"中文"}'方式二:Claude Desktop / Cursor
# 导出配置
onion mcp config --claude-format或手动添加到 ~/.config/claude/claude_desktop_config.json:
{
"mcpServers": {
"onion-mcp": {
"command": "uvx",
"args": ["onion-mcp-server"],
"env": {
"ONION_MCP_API_KEY": "sk-...",
"ONION_MCP_MODEL": "gpt-4o-mini"
}
}
}
}方式三:本地开发
git clone https://github.com/onion-ai/mcp-server
cd mcp-server
pip install -e ".[all]"
export ONION_MCP_API_KEY=sk-...
python -m onion_mcp_server⚙️ 环境变量
变量 | 说明 | 默认值 |
| API Key(必填,AI 工具需要) | — |
| API Base URL |
|
| 模型名称 |
|
| 最大输出 Token |
|
兼容任何 OpenAI 格式接口:DeepSeek、通义千问、Moonshot、本地 Ollama 等
📦 依赖说明
依赖 | 用途 | 是否必须 |
| MCP 协议 | ✅ 必须 |
| AI 工具调用 LLM | AI 工具需要 |
| web 工具网络请求 | web 工具需要 |
| web 工具 HTML 解析 | web 工具需要 |
| YAML 格式支持 | data/text 工具可选 |
🔗 相关项目
onion-ai/onion — onion CLI 主项目
onion-ai/skill-hub — Skill 模板仓库
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
- 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/onion-ai/mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server