SmolAgent with MCP

v1.0.0Coding Agentsstable

SmolAgentWithMCP enables developers to build powerful AI agents that integrate multiple MCP tool servers, like Brave Search, with LLMs for enhanced, real-time question-answering and tool orchestration.

aiagentbravomcpsmolagents
Share:
10
Stars
0
Downloads
0
Weekly
0/5

What is SmolAgent with MCP?

SmolAgent with MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to smolagentwithmcp enables developers to build powerful ai agents that integrate multiple mcp tool servers, like brave search, with llms for enhanced, real-time question-answering and tool orchestration...

SmolAgentWithMCP enables developers to build powerful AI agents that integrate multiple MCP tool servers, like Brave Search, with LLMs for enhanced, real-time question-answering and tool orchestration.

This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • SmolAgentWithMCP enables developers to build powerful AI age

Use Cases

Build AI agents that integrate multiple MCP tool servers.
Combine Brave Search with LLMs for enhanced question-answering.
Orchestrate real-time tools for improved agent capabilities.
ashishpatel26

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 12, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx smolagentwithmcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use SmolAgent with MCP

SmolAgentWithMCP demonstrates how to build AI agents that orchestrate multiple MCP tool servers — including Brave Search for live web queries — using the smolagents framework and LiteLLM for flexible model selection. It provides a working reference implementation for connecting MCP-compatible tools to any LLM backend, enabling real-time question-answering agents with pluggable tool servers.

Prerequisites

  • Python 3.9+ with pip installed
  • A Brave Search API key (obtain free at https://api.search.brave.com/)
  • An OpenAI API key or another LiteLLM-compatible LLM provider key
  • Git to clone the repository
  • Claude Desktop or terminal access for running the agent
1

Clone the repository

Clone the SmolAgentWithMCP repository from GitHub. This project is not published to PyPI and must be run from source.

git clone https://github.com/ashishpatel26/SmolAgentWithMCP.git
cd SmolAgentWithMCP
2

Install Python dependencies

Install all required packages from the requirements.txt file. Key dependencies are smolagents, mcp, litellm, and python-dotenv.

pip install -r requirements.txt
3

Configure API keys in the .env file

Copy the example environment file and populate it with your Brave Search API key and OpenAI API key. LiteLLM also supports Anthropic, Mistral, and other providers — set the appropriate key for your chosen model.

cp .env.example .env

# Contents of .env:
BRAVE_API_KEY=your_brave_api_key_here
OPENAI_API_KEY=your_openai_api_key_here
4

Run the agent

Start the agent from the command line. It will accept terminal input, automatically decide which MCP tools to invoke, and return a combined response.

python smolagentwithmcp.py
5

Extend with additional MCP servers

To add more MCP tool servers, edit smolagentwithmcp.py and register additional MCPClient instances pointing to other MCP-compatible servers. The agent will automatically include them in its tool selection.

SmolAgent with MCP Examples

Client configuration

Example .env configuration for SmolAgentWithMCP using Brave Search and OpenAI GPT-4o as the LLM backend via LiteLLM.

{
  "BRAVE_API_KEY": "BSA_your_key_here",
  "OPENAI_API_KEY": "sk-your_openai_key_here"
}

Prompts to try

Example terminal prompts to send to the SmolAgentWithMCP agent once it is running. The agent uses Brave Search to retrieve real-time information.

- "What are the latest developments in MCP tool servers this week?"
- "Search for the current price of NVIDIA stock and summarize recent news"
- "Find the top 5 open-source Python frameworks for building AI agents in 2025"
- "Research recent papers on multi-agent orchestration and give me a summary"

Troubleshooting SmolAgent with MCP

Brave Search returns no results or an authentication error

Verify BRAVE_API_KEY is set correctly in the .env file. Obtain a free API key at https://api.search.brave.com/ and ensure you have not exceeded the free tier rate limits.

LiteLLM raises an AuthenticationError for the LLM

Confirm OPENAI_API_KEY (or the appropriate provider key) is set in .env. If using a different LLM provider, update the model name in smolagentwithmcp.py to match the LiteLLM provider prefix, e.g., anthropic/claude-3-5-sonnet-20241022.

ImportError for smolagents or mcp

Run pip install -r requirements.txt again to ensure all packages are installed. If you see version conflicts, create a fresh virtual environment: python -m venv venv && source venv/bin/activate && pip install -r requirements.txt.

Frequently Asked Questions about SmolAgent with MCP

What is SmolAgent with MCP?

SmolAgent with MCP is a Model Context Protocol (MCP) server that smolagentwithmcp enables developers to build powerful ai agents that integrate multiple mcp tool servers, like brave search, with llms for enhanced, real-time question-answering and tool orchestration. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install SmolAgent with MCP?

Follow the installation instructions on the SmolAgent with MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with SmolAgent with MCP?

SmolAgent with MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is SmolAgent with MCP free to use?

Yes, SmolAgent with MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Coding Agents MCP Servers

Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "smolagentwithmcp": { "command": "npx", "args": ["-y", "smolagentwithmcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use SmolAgent with MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides