This repository demonstrates how to set up and use the Model Composition Protocol (MCP) with TinyLlama in VS Code.
The Model Composition Protocol (MCP) enables AI systems to expose capabilities to other systems in a standardized way. This project shows how to:
- Set up a local MCP server using TinyLlama
- Create and use MCP clients
- Accelerate MCP development using LLMs
- Integrate MCP with VS Code
- Python 3.13+
- devbox for development environment management
- Git
- Clone this repository
- Initialize the development environment:
devbox shell
- Install dependencies using
uv(automatically handled by devbox)
Start the basic MCP server with:
python simple_server.pyOr try the Rick knowledge base server:
python rick_server.pyThis will initialize the TinyLlama model and expose it through an MCP server running on localhost.
Connect to the basic server using:
python simple_client.pyOr connect to the Rick knowledge base server:
python rick_client.pyThese demonstrate basic interactions with the MCP server, including tool calls and resource utilization.
For a direct interface with the TinyLlama model without MCP:
python simple_llama_chat.pyFor debugging and exploring the MCP server capabilities, use the MCP Inspector:
uv run mcp dev simple_server.pyOr for the Rick server:
uv run mcp dev rick_server.pyTo install your MCP server capabilities in Claude:
uv run mcp install simple_server.py- Building MCP with LLMs - Detailed instructions on using Claude and other frontier LLMs to accelerate your MCP development
- MCP Tutorial - Step-by-step tutorial for getting started with MCP
simple_server.py- Basic MCP server implementation with TinyLlamasimple_client.py- Basic MCP client for testingrick_server.py- MCP server with Rick and Morty knowledge baserick_client.py- Client for the Rick knowledge base serverRicks_KB.txt- Knowledge base text file for the Rick serversimple_llama_chat.py- Direct interface to TinyLlama without MCPbuilding_mcp_with_llms.md- Guide for MCP development with LLMsmcp-tutorial.md- Step-by-step MCP tutorialdevbox.json- Development environment configurationdevbox.lock- Locked dependencies for devboxpyproject.toml- Python project configurationuv.lock- Locked dependencies for uv package managermodels/- Directory for downloaded model files (gitignored)test/- Test files for the project__pycache__/- Python bytecode cache (gitignored)