Get the FREE Ultimate OpenClaw Setup Guide →

smolagents -demo

A comprehensive demonstration of Model Context Protocol (MCP) servers and clients, showcasing AI-powered tools and multi-agent systems for code analysis, security scanning, and intelligent automation.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio juliensimon-smolagents-mcp-demo python server/git_server/git_server.py

How to use

This MCP demo showcases a multi-agent system built with Smolagents that coordinates several specialized MCP servers. The available servers provide common developer-oriented capabilities: Code Metrics (code quality analysis), Code Security (vulnerability scanning), Code Retrieval (file and HTTP operations), and Git Server (repository management), plus a basic text-processing server for foundational tool usage. You can run each server locally and connect an MCP client to discover and orchestrate tools, route tasks to the appropriate server, and compose multi-step workflows across tools. The example also demonstrates a multi-agent client coordinating specialized agents to delegate tasks to the appropriate servers and aggregate results into a cohesive response.

How to install

Prerequisites:

  • Python 3.8+ installed on your system
  • Git access to clone the repository
  • Optional: Python virtualenv or venv support

Step-by-step installation:

  1. Clone the repository: git clone https://github.com/juliensimon/smolagents-mcp-demo.git cd smolagents-mcp-demo

  2. Create and activate a virtual environment: python -m venv env source env/bin/activate # On Windows: env\Scripts\activate

  3. Install dependencies: pip install -r requirements.txt

  4. (Optional) Set environment variables required by certain servers: export TOGETHER_API_KEY="your-api-key-here" # if needed by the demo tools

  5. Start individual servers (examples): python server/basic_server/basic_server.py python server/code_metrics/code_metrics.py python server/code_security/code_security.py python server/code_retrieval/code_retrieval.py python server/git_server/git_server.py

  6. Run client examples to exercise the MCP setup as described in the README: python client/basic_client/client.py

    or follow the multi-server/start_all approach described in Step 2/3 of the Quickstart

Additional notes

Tips and notes:

  • The demo exposes several MCP servers to illustrate tool integration and multi-agent workflows. You can start all servers in separate terminals as shown in the README.
  • If a server requires specific environment configuration (e.g., API keys for external services), set the appropriate env vars in your shell or via a .env file and load them before starting the servers.
  • The Basic Server is useful for exploring text processing and MCP client-server connections; the other servers demonstrate more complex tool integrations like code analysis, security scanning, and repository operations.
  • When testing, use the provided Python scripts (run_tests.py) to validate, run the full test suite, or perform health checks.
  • Ensure ports used by each server (as indicated within each server's implementation) do not conflict with other local services.

Related MCP Servers

Sponsor this space

Reach thousands of developers