MCP-guide is an MCP server and tutorial project that provides a reference implementation for running custom Python tools in an isolated virtual environment and connecting them directly to the Cline VS Code extension. Designed for Python developers and AI engineers, this setup demonstrates how to build and verify a local Model Context Protocol service from scratch. It connects Cline to a local Python runtime via the official MCP CLI development tools, allowing language models in the editor to discover and execute Python functions like arithmetic operations. In addition to serving as a functional tool provider, it illustrates testing workflows using the browser-based MCP Inspector to validate tool schemas and resource endpoints before linking them with coding agents. Developers can use this server template to prototype custom backend integrations, test local script execution inside editor chats, and safely isolate dependencies required for domain-specific automation without affecting global environments.
Category: AI & LLM Tooling
Tags: cline, python, setup, tutorial, vscode
bash git clone https://github.com/m-hikichi/MCP-guide.git cd MCP-guide 2. Create and activate a Python virtual environment: bash python -m venv venv .\venv\Scripts\activate 3. Install dependencies: bash pip install -r requirements.txt 4. Test the server with MCP Inspector: bash mcp dev mcp_server.py 5. Open the VS Code Command Palette, select Cline: Configure MCP Servers, and add the configuration: json { "mcpServers": { "local_mcp_server": { "command": "<PROJECT_DIR>/venv/Scripts/mcp.exe", "args": [ "dev", "<PROJECT_DIR>/mcp_server.py" ] } } } Replace <PROJECT_DIR> with the absolute path to your cloned directory.Part of MCP Servers
MCP-guide is an instructional reference repository that demonstrates how to set up a Python Model Context Protocol server inside a Python virtual environment and configure it to work with the Cline extension in Visual Studio Code.
The guide specifically targets the Cline extension for Visual Studio Code. It also uses the MCP Inspector development interface running on localhost to test tool definitions, schemas, and resource access before connecting to an agent.
After activating your virtual environment and installing the required packages from requirements.txt, run the command mcp dev mcp_server.py. This launches a local development server and automatically opens the MCP Inspector interface in your default web browser.
The sample mcp_server.py script includes basic callable utility functions such as an add tool, which takes numerical arguments and returns computed results to demonstrate proper client-to-server tool invocation.