Install
$ agentstack add mcp-razpinator-mcpollamastack ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
MCP Ollama Stack
A Model Context Protocol (MCP) chat application that integrates Ollama with a custom MCP server to provide AI-powered conversations with tool integration capabilities.
Project Structure
MCPOllamaStack/
├── MCPServer/ # MCP Server application
│ └── Program.cs # Server implementation
└── MCPClient/ # MCP Client application
└── Program.cs # Client implementation with chat interface
Overview
This project consists of two main components:
- MCP Server: A web application that exposes tools via the Model Context Protocol using stdio transport
- MCP Client: A console chat application that connects to both Ollama and the MCP server to provide an interactive AI experience with tool capabilities
Prerequisites
Required Software
- .NET SDK (version 8.0 or later)
- Ollama - Local AI model server
- Download from ollama.ai
- Must be running on
http://localhost:11434
Required Model
The project is configured to use the llama3.2:latest model. Ensure you have this model installed:
ollama pull llama3.2:latest
Setup Instructions
1. Start Ollama
Make sure Ollama is running with the required model:
# Start Ollama (if not already running)
ollama serve
# Verify the model is available
ollama list
2. Run the Project
Navigate to the client directory and run the application:
cd MCPClient
dotnet run
The client will automatically:
- Start the MCP server from the parent directory
- Connect to Ollama at
http://localhost:11434 - Initialize the chat interface
- Display available tools from the MCP server
Usage
Chat Interface
Once the application starts, you'll see:
- A list of available tools from the MCP server
- A prompt asking for your query
Available Commands
- Regular chat: Type any message to interact with the AI
- Clear history: Type
/clearto reset the conversation history - Exit: Press
Ctrl+Cto stop the application
Example Session
Tool: example-tool - Example tool description
Query:
Hello, what can you help me with?
Bot:
I'm an AI assistant that can help you with various tasks. I have access to tools from the MCP server that can extend my capabilities...
Features
- Streaming responses: Real-time AI response streaming for better user experience
- Tool integration: Automatic discovery and integration of MCP server tools
- Conversation history: Maintains chat context throughout the session
- Error handling: Robust error handling for missing directories and connection issues
Architecture
The application uses:
- OllamaSharp: For connecting to the Ollama API
- Microsoft.Extensions.AI: For AI chat client abstraction
- ModelContextProtocol.Client: For MCP server communication
- Stdio transport: For communication between client and server
Troubleshooting
Common Issues
- "MCPServer directory not found"
- Ensure the project structure matches the expected layout
- Verify you're running from the correct directory
- Ollama connection failed
- Confirm Ollama is running:
ollama list - Check if the service is accessible at
http://localhost:11434
- Model not found
- Pull the required model:
ollama pull llama3.2:latest
- Tools not loading
- Check MCP server logs for any startup errors
- Ensure the server has proper tool implementations
Logs and Debugging
The MCP server includes console logging with trace-level output directed to stderr for debugging purposes.
Development
Adding New Tools
To add new tools to the MCP server:
- Create tool classes in the MCPServer project
- Ensure they're discoverable via
WithToolsFromAssembly() - Restart the client to reload tools
Modifying the Model
To use a different Ollama model, update the model name in the client's Program.cs:
new OllamaApiClient(new Uri("http://localhost:11434/"), "your-model-name")
License
This project is provided as-is for educational and development purposes.
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: razpinator
- Source: razpinator/MCPOllamaStack
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.