Knowledge Base
📝 Context Summary
The Complete Guide to MCP: Giving Your AI Web Superpowers
With Model Context Protocol (MCP) servers, you can give even lightweight, locally-run models the ability to search the web, analyze articles, and access real-time data—all while maintaining complete privacy and without API fees.
Tools like Brave Search, Tavily, and DuckDuckGo offer generous free tiers, making it possible to create a private “SearchGPT” on your own machine.
Core Concepts
- Model Context Protocol (MCP): An open standard that allows AI models to connect with external tools and data sources. Instead of a rigid API call, MCP allows the model to determine which tool to use to fulfill a user’s need.
- Tool Calling (Function Calling): The mechanism that enables an AI model to recognize when it needs external information and invoke the appropriate function (or MCP tool) to get it. Without tool-calling support, a model is limited to its training data.
Here’s how to give these superpowers to your local model.
Technical Requirements and Setup
- Node.js: Must be installed on your computer.
- Python: Should be installed.
- Local AI Application: An application that supports MCP, such as LM Studio (version 0.3.17+), Claude Desktop, or Cursor IDE.
- Tool-Calling Model: A local model with tool-calling capabilities.
Good examples of local models that support tool-calling include GPT-oss, DeepSeek R1, Jan-v1-4b, and Llama-3.2 Instruct. In LM Studio, these models are often marked with a hammer icon.
Setting Up Search Engines
Configuration is managed through a single mcp.json file. In LM Studio, you can access this via the settings interface. Each MCP server entry requires a name, the command to run it, and any environment variables (like API keys).
DuckDuckGo (Easiest Setup)
- Go to lmstudio.ai/danielsig/duckduckgo and click “Run in LM Studio.”
- Go to lmstudio.ai/danielsig/visit-website and do the same.
Your model now has basic web search and page-reading capabilities.
Brave Search (Privacy-Focused)
Brave Search runs on an independent index and offers 2,000 free queries per month.
- Sign up at brave.com/search/api to get your API key.
- In LM Studio, go to Settings (wrench icon) > Program > Edit mcp.json.
- Paste the following configuration, replacing the placeholder with your API key:
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "your_brave_api_key_here"
}
}
}
}
Tavily (Versatile Search)
Tavily provides 1,000 free credits per month and offers specialized search for news, code, and images.
- Create an account at app.tavily.com and generate your API key.
- Paste the following into your
mcp.json, replacing the placeholder with your key:
{
"mcpServers": {
"tavily-remote": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.tavily.com/mcp/?tavilyApiKey=YOUR_API_KEY_HERE"]
}
}
}
Reading and Interacting with Websites
MCP Fetch (Reading Full Articles)
Search engines return snippets, but MCP Fetch retrieves the complete content of a webpage and converts it to AI-friendly markdown.
- Install
uvx, a Python package installer:pip install uvx. - Add this configuration to your
mcp.json:
{
"mcpServers": {
"fetch": {
"command": "uvx",
"args": [
"mcp-server-fetch"
]
}
}
}
You can now ask your model to summarize or analyze entire articles by providing a URL.
MCP Browser (Full Interaction)
Tools like MCP Browser or Playwright allow the model to interact with websites, including filling forms and navigating JavaScript-heavy pages.
The Complete Configuration
Here is a complete mcp.json file integrating all the services mentioned. Replace the API key placeholders, save the file, and restart your AI application.
{
"mcpServers": {
"fetch": {
"command": "uvx",
"args": [
"mcp-server-fetch"
]
},
"brave-search": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-brave-search"
],
"env": {
"BRAVE_API_KEY": "YOUR_BRAVE_API_KEY_HERE"
}
},
"browsermcp": {
"command": "npx",
"args": [
"@browsermcp/mcp@latest"
]
},
"tavily-remote": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.tavily.com/mcp/?tavilyApiKey=YOUR_TAVILY_API_KEY_HERE"
]
}
}
}
This configuration provides robust, private, and free web access for your local models.