Skip to main content
Glama

Muse Glimmer + MCP + Langfuse (lokal)

Ein minimaler Agent auf Basis von Pydantic AI, der:

  • muse-glimmer (Metas agentisches 30B-Modell) über eine lokale Ollama-Instanz ausführt,

  • MCP aktiviert hat: ein lokaler FastMCP-Server (mcp_server.py) wird als stdio-Subprozess angehängt und stellt get_weather, get_current_time und list_ollama_models als Agent-Tools bereit,

  • sendet vollständige Traces (Modellanfragen, Tool-Aufrufe, Ausgaben) zur Beobachtbarkeit an eine lokale Langfuse-Instanz.

Voraussetzungen

  • Ollama läuft mit dem gepullten Modell:

    ollama pull muse-glimmer
  • Eine lokale Langfuse-Instanz (z. B. über docker compose aus dem Langfuse-Repo), erreichbar unter http://localhost:3000.

  • uv (oder python3 -m venv + pip verwenden).

Related MCP server: MCP Ollama Consult Server

Einrichtung

cp .env.example .env   # then fill in your Langfuse keys
uv sync                # installs pydantic-ai, fastmcp, langfuse, ...

.env:

LANGFUSE_PUBLIC_KEY=pk-lf-...
LANGFUSE_SECRET_KEY=sk-lf-...
LANGFUSE_BASE_URL=http://localhost:3000
LANGFUSE_HOST=http://localhost:3000

OLLAMA_BASE_URL=http://localhost:11434/v1
OLLAMA_MODEL=muse-glimmer

Ausführen

uv run python agent.py

Der Agent beantwortet drei Demo-Prompts und ruft bei Bedarf MCP-Tools auf:

🧑  User: What is the weather in Paris today?
🤖  Agent: Weather in Paris: clear skies, 22°C, humidity 51%.

🧑  User: What time is it in Tokyo right now?
🤖  Agent: The current time in Asia/Tokyo is 2026-08-25 21:04:33 JST.

🧑  User: Which Ollama models are available locally?
🤖  Agent: NAME  ID  SIZE  MODIFIED ...

Beobachtbarkeit (Langfuse)

Öffnen Sie http://localhost:3000Traces. Jeder Lauf erzeugt Traces mit dem Namen muse-glimmer-mcp-agent – inklusive Spans für Modellanfragen (Input/Output-Tokens) und jeden MCP-Tool-Aufruf. Sehen Sie sich Eingaben, Ausgaben, Latenzen und Kosten an.

Den Agenten als MCP-Server bereitstellen

agent_mcp_server.py kehrt die Architektur um: Der Agent selbst wird zu einem MCP-Server, der genau ein Tool – ask_agent(prompt) – für einen beliebigen MCP-Client (Claude Desktop, Playwright, Cursor, einen anderen Pydantic-AI-Agenten usw.) bereitstellt. Jeder Aufruf führt muse-glimmer über Ollama aus, behält die innerer MCP-Tools bei und wird als Trace in Langfuse erfasst.

Server ausführen

uv run python agent_mcp_server.py

Client-Konfiguration

Richten Sie einen beliebigen MCP-Client auf diesen Server aus, indem Sie das Python Ihrer uv-verwalteten venv nützen (uv run m--project <repo> python funktioniert ebenflals). Beispiele:

Claude Desktopclaude_desktop_config.json:

{
  "mcpServers": {
    "muse-glimmer-agent": {
      "command": "/home/d3lee/.local/bin/uv",
      "args": ["run", "--project", "/home/d3lee/my-repos/pydantic-ai-mcp-server-sample", "python", "agent_mcp_server.py"]
    }
  }
}

VS Code.vscode/mcp.json:

{
  "servers": {
    "muse-glimmer-agent": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "--project", "/home/d3lee/my-repos/pydantic-ai-mcp-server-sample", "python", "agent_mcp_server.py"]
    }
  }
}

Cursor.cursor/mcp.json:

{
  "mcpServers": {
    "muse-glimmer-agent": {
      "command": "uv",
      "args": ["run", "--project", "/home/d3lee/my-repos/pydantic-ai-mcp-server-sample", "python", "agent_mcp_server.py"]
    }
  }
}

Layout

Datei

Zweck

agent.py

Leistungsfähiger AI-Agent: Ollama-Moddel + MCP-Fähigkeit + Langfuse

mcp_server.py

FastMCP-Server (stdio), der für lokale Tools bereitsteht

agent_mcp_server.py

Stellt den Agent als MCP-Server bereit (ask_agent-Tool)

.env

Langfuse- und Ollama-Konfiguration

pydantic-ai-mcp-server-sample

Install Server
F
license - not found
B
quality
C
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.

Tools

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Enables seamless integration between Ollama's local LLM models and MCP-compatible applications, supporting model management and chat interactions.
    13
    1,209
    171
    AGPL 3.0
  • A
    license
    A
    quality
    C
    maintenance
    Enables consulting with local Ollama models for reasoning from alternative viewpoints. Supports sending prompts to Ollama models and listing available models on your local Ollama instance.
    5
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

  • OCR, transcription, file extraction, and image generation for AI agents via MCP.

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

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/saram-io/pydantic-ai-mcp-server-sample'

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