Skip to main content
Glama

Muse Glimmer + MCP + Langfuse (local)

Un agente mínimo de Pydantic AI que:

  • ejecuta muse-glimmer (el modelo agéntico de Meta de 30B) a través de una instancia local de Ollama,

  • tiene MCP habilitado: un servidor local de FastMCP (mcp_server.py) conectado como subproceso stdio, que expone get_weather, get_current_time y list_ollama_models como herramientas del agente,

  • envía trazas completas (solicitudes de modelo, llamadas a herramientas, salidas) a una instancia local de Langfuse para la observabilidad.

Requisitos previos

  • Ollama en ejecución con el modelo descargado:

    ollama pull muse-glimmer
  • Una instancia local de Langfuse (p. ej., mediante docker compose del repositorio de Langfuse) accesible en http://localhost:3000.

  • uv (o usa python3 -m venv + pip).

Related MCP server: MCP Ollama Consult Server

Configuración

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

Ejecución

uv run python agent.py

El agente responde a tres indicaciones de demostración y llama a las herramientas MCP cuando sea necesario:

🧑  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 ...

Observabilidad (Langfuse)

Abre http://localhost:3000Traces. Cada ejecución genera trazas llamadas muse-glimmer-mcp-agent, con spans para las peticiones al modelo (tokens de entrada/salida) y para cada llamada a herramienta MCP: inspecciona las entradas, salidas, latencias y costes.

Exponer el agente como servidor MCP

agent_mcp_server.py invierte la arquitectura: el propio agente se convierte en un servidor MCP que expone una herramienta — ask_agent(prompt) — para cualquier cliente MCP (Claude Desktop, VS Code, Cursor, otro agente de Pydantic AI, ...). Cada llamada ejecuta muse-glimmer a través de Ollama, conserva las herramientas MCP internas y queda registrada en Langfuse.

Ejecutar el servidor

uv run python agent_mcp_server.py

Configuración del cliente

Configura cualquier cliente MCP para que apunte a este servidor usando el Python de tu venv gestionado por uv (también funciona uv run --project <repo> python). Ejemplos:

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"]
    }
  }
}

Estructura

Archivo

Propósito

agent.py

Agente de Pydantic AI: modelo Ollama + capacidad MCP + Langfuse

mcp_server.py

Servidor FastMCP (stdio) que expone las herramientas locales

agent_mcp_server.py

Expone el propio agente como servidor MCP (herramienta ask_agent)

.env

Configuración de Langfuse + Ollama

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