Content
# MCP Proxy Search Tools



A multifunctional MCP Search Server tool developed in TypeScript, supporting proxy and browser modes, capable of URL crawling or multi-search engine and content parsing.
## ✨ Main Features
- 🔍 Multi-search engine support
- Brave Search (official API)
- Bing
- Google
- 百度 (Baidu)
- 360搜索 (360 Search)
- 🌐 Web content extraction
- Raw HTML content retrieval
- Intelligent body extraction
- Dynamic page rendering
- ⚡ Advanced features
- Proxy support (HTTP/SOCKS)
- Request rate limiting
- Browser automation
- 🔄 Dual mode support
- Command line mode
- SSE (Server-Sent Events) network mode
## 🚀 Quick Start
### Installation
```bash
# Clone the project
git clone https://github.com/NoZSmile/McpTools.git
cd McpTools
# Install dependencies
npm install
```
### Basic Usage
```bash
# Configure Brave Search API (get it from https://search.brave.com/developers)
export BRAVE_API_KEY="your-api-key"
# Configure proxy
export HTTP_PROXY="your http/socks proxy"
tsx index.ts # View help
tsx index.ts startmcp # Start MCP server mode
# Command mode
# Crawl web content
tsx index.ts fetch "https://example.com"
# Extract web text
tsx index.ts content "https://example.com"
# Browser mode to get web content
tsx index.ts browse "https://example.com"
# Brave search
tsx index.ts brave "TypeScript tutorial"
# Bing search
tsx index.ts bing "TypeScript tutorial"
# SSE mode
# Start SSE service (default port 3000)
tsx index.ts sse
# Start SSE service on a specified port
tsx index.ts sse --port 8080
# Specify configuration file
tsx index.ts sse --config ./myconfig.json
```
## 📖 Detailed Commands
| Command | Description | Example |
|---------|-------------|---------|
| brave | Brave search | `brave "Front-end development"` |
| fetch | Crawl web page | `fetch https://example.com` |
| content | Extract web body | `content https://example.com` |
| browse | Browser rendering | `browse https://spa.example.com` |
| bing | Bing search | `bing "Node.js tutorial"` |
| google | Google search | `google "React Hooks"` |
| baidu | Baidu search | `baidu "Python introduction"` |
| 360 | 360 search | `360 "Linux commands"` |
| startmcp| Start MCP Server mode | `startmcp` |
| sse | Start SSE server mode | `sse --port 3000` |
## ⚙️ Configuration Instructions
### Environment Variables
```bash
# Brave API key (required)
export BRAVE_API_KEY="your-api-key"
# Proxy settings (optional)
export http_proxy="http://127.0.0.1:7890"
export https_proxy="http://127.0.0.1:7890"
# Debug mode (optional)
export DEBUG=true
```
### TypeScript Configuration
The project uses TypeScript 5.0+, and the configuration file is located at `tsconfig.json`. Main settings:
```json
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"strict": true
}
}
```
## 🔧 Advanced Configuration
### Rate Limiting
Default configuration (modifiable in `mcp.ts`):
- Requests per unit time: 1 request/second
- Total limit: 15000 requests/month
### Browser Options
Configure Puppeteer options in `browser.ts`:
```typescript
const options = {
headless: 'new',
args: ['--no-sandbox']
}
```
### SSE Service Configuration
Example configuration file (config.json):
```json
{
"sse": {
"port": 3000,
"host": "localhost",
"cors": {
"origin": "*"
},
"timeout": 30000,
"heartbeatInterval": 15000
}
}
```
## 🌐 SSE Mode User Guide
SSE (Server-Sent Events) mode allows real-time reception of tool execution results via HTTP connection.
### Start Service
```bash
# Start with default configuration
tsx index.ts sse
# Specify port
tsx index.ts sse --port 8080
```
### Client Example
The project provides a simple front-end page as an example. After starting the service, access:
```
http://localhost:3000/
```
### API Endpoints
| Endpoint | Method | Description |
|-----------------|--------|-------------|
| `/events` | GET | SSE connection endpoint |
| `/api/:tool` | POST | Tool invocation endpoint |
### JavaScript Client Example Code
```javascript
// Connect to SSE server
const eventSource = new EventSource('http://localhost:3000/events');
// Listen for events
eventSource.onmessage = (event) => {
console.log('Received message:', event.data);
};
// Listen for tool responses
eventSource.addEventListener('tool_response', (event) => {
console.log('Tool response:', JSON.parse(event.data));
});
// Example of invoking a tool
fetch('http://localhost:3000/api/brave_web_search', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ query: 'TypeScript SSE' })
})
.then(response => response.json())
.then(data => console.log('Request sent, ID:', data.requestId));
```
## 🤝 Contribution Guidelines
1. Fork this project
2. Create a feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add: new feature'`)
4. Push the branch (`git push origin feature/AmazingFeature`)
5. Submit a Pull Request
## 📝 Feedback
If you encounter any issues or have suggestions for improvements, feel free to:
1. Submit an [Issue](https://github.com/NoZSmile/McpTools/issues)
2. Initiate a Pull Request
3. Contact us via Email
## 📄 License
This project is licensed under the ISC License - see the [LICENSE](LICENSE) file for details.
Connection Info
You Might Also Like
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
Fetch
Retrieve and process content from web pages by converting HTML into markdown format.
Context 7
Context7 MCP provides up-to-date code documentation for any prompt.
beacon-skill
Beacon - agent-to-agent pings with optional RTC value attached...
graphthulhu
MCP server for Logseq knowledge graph traversal. 27 tools for navigating,...
affine-mcp-server
AFFiNE MCP Server manages workspaces and documents for AI assistants via stdio.