Skip to main content
Glama
Lihn2254
by Lihn2254

miniMCP

A lightweight project that demonstrates how to implement and connect a local AI model (using Ollama) with custom tools through the Model Context Protocol (MCP).

In this project, the AI acts as a database assistant that can query and manage an in-memory database using CRUD (Create, Read, Update, Delete) operations.

Project Structure

  • server.py: This is the MCP server created with FastMCP. It maintains an in-memory database and exposes tools for:

    • Creating items (create_item)

    • Reading individual items (read_item)

    • Reading multiple items at once (read_multiple_items)

    • Updating items (update_item)

    • Deleting items (delete_item)

  • client.py: This is the client that interacts via the terminal. It connects to the MCP server through standard input/output streams (stdio), reads the available tools, and establishes a chat loop with the user and the Ollama LLM (gemma4:e4b).

  • requirements.txt: File with the project's main dependencies.

Related MCP server: Modular MCP Server with Python Tools

Requirements and Dependencies

Before starting the project, make sure you have installed:

  1. Python 3.10+

  2. Ollama installed and running on your machine.

  3. The model used by this repository, which by default is gemma4:e4b. You can download it with the command:

    ollama run gemma4:e4b

Installation

  1. Clone the repository and navigate to its folder:

    git clone <url-del-repo> miniMCP
    cd miniMCP
  2. Create and activate a virtual environment (optional but highly recommended):

    python -m venv .venv
    # En Windows:
    .\.venv\Scripts\activate
    # En macOS/Linux:
    source .venv/bin/activate
  3. Install the necessary dependencies:

    pip install -r requirements.txt
    pip install gradio

Usage

The project consists of a Client/Server configuration, but the client is responsible for launching the server itself, so you only need to run the client:

python client.py

Type your questions directly into the console.


Interaction Example

You can try telling the AI:

  • "Create an item with ID 'task1' and content 'Buy milk'"

  • "Show the content of 'task1'"

  • "Update 'task1' and tell me the milk should be skimmed"

  • "Read items 'task1' and 'task2'"

  • "Delete ID 'task1'"

The AI will automatically execute the server.py tools without you having to write the code or calls directly.

F
license - not found
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP-Server from your Database optimized for LLMs and AI-Agents. Supports PostgreSQL, MySQL, ClickHouse, Snowflake, MSSQL, BigQuery, Oracle Database, SQLite, ElasticSearch, DuckDB
    544
    Apache 2.0
  • F
    license
    Not graded
    quality
    D
    maintenance
    A demo MCP server that enables users to interact with various tools through natural language, including note management, weather queries, calculations, file operations, and shell commands. Uses Ollama for intent detection and structured command parsing from free text input.
  • F
    license
    Not graded
    quality
    B
    maintenance
    An MCP server that exposes relational databases (PostgreSQL/MySQL) to AI agents with natural language to SQL query support.
    19

View all related MCP servers

Related MCP Connectors

  • MCP server for AI dialogue using various LLM models via AceDataCloud

  • Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer

  • GibsonAI MCP server: manage your databases with natural language

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Lihn2254/miniMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server