Anthropic-compatible MCP server with Ollama integration

Anthropic-compatible MCP server with Ollama integration

simple-mcp-server-jorgesandoval•byjorgesandoval

A hybrid system combining an Anthropic-compatible MCP server with Ollama/Gemma LLM inference and middleware for client communication.

License: MIT License•Runtime: Awaiting documentation review•Category: ai agents-models

WHAT IT DOES

  • •Implements MCP protocol features including tools for context management, resources exposing conversation history, and prompt templates.
  • •Uses JSON-RPC 2.0 for all communication and implements protocol initialization with version negotiation.
  • •Exposes MCP protocol endpoints for tools, resources, prompts, and initialization.
  • •Provides a middleware endpoint that sends messages to Ollama/Gemma while storing context in the MCP server.

BEST FOR

  • •Running MCP-based workflows with open-source Gemma models instead of Claude for inference.
  • •Connecting MCP clients such as Claude Desktop, VS Code, and Cursor to a local MCP server with context storage.
  • •Storing and retrieving conversation context through SQLite in an MCP workflow.

ABOUT SIMPLE-MCP-SERVER-JORGESANDOVAL

Anthropic-compatible MCP server with Ollama integration is cataloged as an MCP server attributed to jorgesandoval. A hybrid system combining an Anthropic-compatible MCP server with Ollama/Gemma LLM inference and middleware for client communication. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Anthropic-compatible MCP server with Ollama integration are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What inference model does the system use?

It uses Ollama with the Gemma3:4b model for inference.

How is conversation context stored?

Context is stored in a SQLite database.

Upstream README

View this exact version on GitHub

README.md · 0e1008077a33 · Fetched 2026-11-13 11:38:15 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Anthropic Model Context Protocol (MCP) Server with Ollama Integration

A hybrid architecture combining an Anthropic-compatible Model Context Protocol (MCP) server with Ollama/Gemma LLMs for inference. This implementation follows the official Model Context Protocol specification while using open-source models.

Overview

This project implements an Anthropic-compatible MCP server following the official MCP specification, along with middleware that handles communication between clients and Ollama's Gemma model.

Architecture

┌───────────┐     ┌──────────────┐     ┌────────────────────────┐
│  Client   │────▶│   Middleware │────▶│  Anthropic MCP Server  │
│           │◀────│              │◀────│  (Claude MCP Protocol) │
└───────────┘     └──────┬───────┘     └────────────────────────┘
                         │                          │
                         │                          │
                         ▼                          ▼
                  ┌─────────────┐         ┌────────────────────┐
                  │    Ollama   │         │   SQLite Database  │
                  │ (Gemma3:4b) │         │  (Context Storage) │
                  └─────────────┘         └────────────────────┘

Components

  • MCP Server: Implements the Anthropic MCP protocol on port 3000
  • Middleware: Handles communication between clients and Ollama
  • Ollama: Runs the Gemma3:4b model for inference
  • Database: SQLite database for storing conversation contexts

Features

  • MCP Protocol Features:

    • Tools: For context management
    • Resources: Expose conversation history
    • Prompts: Standard prompt templates
  • Model Support:

    • Use with Claude models via Claude Desktop or other MCP clients
    • Compatible with any client supporting the Model Context Protocol

MCP Protocol Compliance

This implementation strictly adheres to the official Model Context Protocol (MCP) specification published by Anthropic:

  1. JSON-RPC 2.0 Protocol: Uses the standard JSON-RPC 2.0 format for all communication, ensuring compatibility with other MCP clients and servers.

  2. Protocol Initialization: Correctly implements the /initialize endpoint with proper protocol version negotiation (2024-03-26) and client capability declarations.

  3. Tool Interface: Fully implements the tool calling protocol with all required annotations:

    • readOnlyHint: Indicates whether tools modify state
    • destructiveHint: Flags potentially destructive operations
    • idempotentHint: Marks operations that can be safely retried
  4. Resource Management: Implements the resource protocol for exposing conversation history with proper URIs and MIME types.

  5. Prompt Templates: Provides standard prompt templates following the MCP specification for common operations.

  6. Error Handling: Implements proper error responses with standardized error codes and messages as specified in the protocol.

  7. Security: Follows the security recommendations in the MCP specification regarding authentication and authorization.

  8. Versioning: Properly handles protocol versioning to ensure forward compatibility.

Our implementation is designed to be fully compatible with any MCP client, including Claude Desktop, VS Code extensions, and other tools that adhere to the official specification.

API Endpoints

MCP Server (port 3000)

The MCP Server implements the official MCP protocol endpoints:

  • Tools: /tools/list, /tools/call
  • Resources: /resources/list, /resources/read
  • Prompts: /prompts/list, /prompts/get
  • Core: /initialize

Middleware (port 8080)

  • POST /infer: Send user messages to Ollama/Gemma while storing context in the MCP server
  • GET /health: Check the health of the middleware and its connections

Requirements

  • Python 3.10+
  • Docker and Docker Compose
  • Ollama with Gemma3:4b model installed

Installation

Using setup script

chmod +x setup.sh
./setup.sh

The setup script will:

  1. Check for Docker installation
  2. Check for Ollama installation and pull the Gemma model if needed
  3. Build and start the Docker containers

Manual setup

# Clone the repository
git clone <repository-url>
cd simple-mcp-server

# Make sure Ollama is running with Gemma model
ollama pull gemma3:4b

# Build and run with Docker
docker-compose build
docker-compose up -d

Usage Example

Using the Middleware with Ollama/Gemma

You can interact with the system through the middleware, which will use Ollama/Gemma for inference while storing conversation context in the MCP server:

# Start a new conversation
curl -X POST http://localhost:8080/infer \
  -H "Content-Type: application/json" \
  -d '{"session_id": "user123", "content": "Hello, how are you today?"}'

# Continue the conversation with the same session ID
curl -X POST http://localhost:8080/infer \
  -H "Content-Type: application/json" \
  -d '{"session_id": "user123", "content": "What's the capital of France?"}'

Using the MCP Server Directly

The MCP server on port 3000 can be used with any MCP client, such as:

  • Claude Desktop App
  • VS Code GitHub Copilot
  • Cursor
  • And many other tools listed on the MCP Clients page

Docker Configuration

The project uses Docker to containerize two main components:

  • MCP Server Container: Provides the Anthropic MCP protocol on port 3000
  • Middleware Container: Connects to Ollama for Gemma model inference on port 8080

Testing

To test your installation:

# Run the included test script
python test_system.py

# Or use the shell script
./test.sh

License

This project is licensed under the MIT License - see the LICENSE file for details.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Anthropic-compatible MCP server with Ollama integration from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/simple-mcp-server-jorgesandoval)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related ai agents-models MCP Servers

Alternative and complementary servers in the same category

View all in ai agents-models →
Knowledge Graph Memory
@modelcontextprotocol/server-memory•Model Context Protocol

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

create_entitiescreate_relationsadd_observations+6 more
92K
AI & Multi-Agent
Sequential Thinking
@modelcontextprotocol/server-sequential-thinking•Model Context Protocol

Organize problem solving into revisable, branching thought steps through an MCP tool.

sequential_thinking
92K
AI & Multi-Agent

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.

146
AI & Multi-Agent