FreeSearch MCP Server 是一个模型上下文协议(MCP)服务器,通过 DuckDuckGo 的 API 提供免费的网络搜索功能。它还包含智能摘要功能,利用 MCP 客户端内置的语言模型。
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"freesearch-mcpserver": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
FreeSearch MCP Server 是一个模型上下文协议(MCP)服务器,通过 DuckDuckGo 的 API 提供免费的网络搜索功能。它还包含智能摘要功能,利用 MCP 客户端内置的语言模型。
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in search
Web and local search using Brave Search API
Production ready MCP server with real-time search, extract, map & crawl.
mini cli search engine for your docs, knowledge bases, meeting notes, whatever. Tracking current sota approaches while being all local
MCP server for Firecrawl — search, scrape, and interact with the web. Supports both cloud and self-hosted instances. Features include web search, scraping, page interaction, batch processing, and LLM-powered content analysis.
MCP Security Weekly
Get CVE alerts and security updates for Freesearch Mcpserver and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
FreeSearch MCP Server 是一个模型上下文协议(MCP)服务器,通过 DuckDuckGo 的 API 提供免费的网络搜索功能。它还包含智能摘要功能,利用 MCP 客户端内置的语言模型。
本项目提供一个 JSON-RPC 2.0 服务器,具有以下功能:
/rpc - 客户端通过 JSON-RPC 协议调用服务器功能/ping - 用于服务器健康状态检测search - 通过 DuckDuckGo 进行免费网络搜索summarize - 使用 MCP 客户端的语言模型生成搜索结果摘要克隆代码仓库:
git clone https://your-repo-url.git
cd freesearch-mcpserver
安装项目依赖:
npm install
配置环境变量 (可选):
.env.example 为 .env 文件,配置端口号。PORT=3000
# OpenAI API key 当前不需要,已预留给未来扩展
# OPENAI_KEY=your-openai-api-key
编译项目:
npm run build
启动服务器:
npm start
服务器将运行在你配置的端口上 (默认 3000)。
运行测试来验证功能:
npm run test:rpc
你可以使用以下示例代码实例化和配置 MCP 服务器:
import express, { Request, Response } from 'express';
import bodyParser from 'body-parser';
import jsonrpc from 'jsonrpc-lite';
import dotenv from 'dotenv';
const { McpServer } = require('@modelcontextprotocol/sdk');
// 加载环境变量
dotenv.config();
const app = express();
app.use(bodyParser.json());
// 健康检查
app.get('/ping', (_req: Request, res: Response) =e {
res.status(200).send('PONG');
});
// JSON-RPC 端点
app.post('/rpc', async (req: Request, res: Response) =e {
try {
const rpcRequest = jsonrpc.parseObject(req.body);
if (rpcRequest.type === 'request' && rpcRequest.payload) {
const response = await server.handle(rpcRequest.payload);
res.json(jsonrpc.success(rpcRequest.payload.id, response));
} else {
res.status(400).send('Invalid RPC request');
}
} catch (error) {
res.status(500).send(error.message);
}
});
// 启动服务器
const port = process.env.PORT || 3000;
app.listen(port, () =e {
console.log(`Server started on port ${port}`);
});
此代码片段适合用于快速配置在类似 Cursor 这样的客户端中使用的 MCP 服务器。
{
"mcpServers": {
"freesearch": {
"command": "npx",
"args": [
"freesearch-mcpserver@latest"
]
}
}
}
如果你还需要有关如何在特定平台(例如 Windows、Linux)上进行配置的具体说明或需要进一步帮助,请随时告知我!
npm install
npm run dev # 监视模式
npm run build # 构建项目
npm run lint # 运行 ESLint
npm run lint:fix # 修复 ESLint 问题
npm run format # 使用 Prettier 格式化
npm run format:check # 检查格式
npm run type-check # 类型检查(不构建)
{
"jsonrpc": "2.0",
"method": "search",
"params": {
"query": "人工智能"
},
"id": 1
}
{
"jsonrpc": "2.0",
"method": "summarize",
"params": {
"query": "最新技术",
"results": [
{
"title": "AI 及其影响",
"url": "https://example.com/ai",
"snippet": "AI 正在改变各个行业..."
}
]
},
"id": 2
}
您可以通过修改 src/config/prompts.yml 文件来自定义提示模板:
# 提示词配置
summarize: |
请用要点形式总结以下关于"{{query}}"的搜索结果:
{{#each results}}
- {{this.title}}: {{this.snippet}}
{{/each}}
也可以通过命令行参数指定自定义提示文件:
npm run dev -- --prompt-file /path/to/your/prompts.yml