Labsco
Mudit7715 logo

MCP Server with Ollama Integration

โ˜… 3

from Mudit7715

An MCP server that integrates with Ollama to provide tools for file operations, calculations, and text processing. Requires a running Ollama instance.

๐Ÿ”ฅโœ“ VerifiedFreeNeeds API keys

MCP Server with Ollama Integration

A simple Model Context Protocol (MCP) server that extends AI capabilities with useful tools for file operations, calculations, text processing, and more. This project demonstrates how to create custom tools that AI models can use through Ollama.


๐ŸŽฏ What is This?

This is a tutorial which creates a bridge between AI models (like those running in Ollama) and your computer's functionality using Model Context Protocol, Langchain and Ollama. Think of it as giving the AI hands to do any task which ealier seem to impossible by AI.


๐Ÿš€ Features

This is a very basic implementation on top of which we can build more.(No external APIs connected yet)

Available Tools

ToolDescriptionExample Usage
CalculatorBasic math operations"Calculate 15 + 25"
File CheckerCheck if files exist"Does 'document.txt' exist?"
Directory ListingList folder contents"What's in my home folder?"
Text TransformChange text case, reverse, etc."Make 'hello world' uppercase"
Temperature ConverterConvert between ยฐC, ยฐF, K"Convert 25ยฐC to Fahrenheit"
Password GeneratorGenerate secure passwords"Create a 16-character password"
Random NumbersGenerate random numbers"Give me a number between 1-100"
Text StatisticsAnalyze text (word count, etc.)"Analyze this paragraph"
GreetingPersonalized greetings"Say hello to Alice"

๐Ÿค Contributing

Want to add more tools? Here's how:

@mcp.tool()
def my_awesome_tool(input_param: str) -> str:
    """What this tool does."""
    # Your logic here
    return f"Result: {input_param}"

Test it by asking the AI to use your tool

Update documentation with your new tool