muse-glimmer-agent
Muse Glimmer + MCP + Langfuse(ローカル)
最小限の Pydantic AI エージェントで、以下を実現します:
muse-glimmer(Meta の 30B エージェントモデル)を ローカルの Ollama インスタンス経由で実行し、MCP を有効化:ローカルの FastMCP サーバー(
mcp_server.py)を stdio サブプロセスとして接続し、get_weather、get_current_time、list_ollama_modelsをエージェントツールとして公開。可観測性のため、完全なトレース(モデルリクエスト、ツール呼び出し、出力)を ローカルの Langfuse インスタンスに送信します。
前提条件
Ollama が実行中で、モデルがプル済みであること:
ollama pull muse-glimmerローカルの Langfuse インスタンス(例:Langfuse リポジトリの
docker composeを使用)がhttp://localhost:3000でアクセス可能であること。uv(または
python3 -m venv+pipを使用)。
Related MCP server: MCP Ollama Consult Server
セットアップ
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実行
uv run python agent.pyエージェントはデモ用の3つのプロンプトに回答し、必要に応じて MCP ツールを呼び出します:
🧑 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 ...可観測性(Langfuse)
http://localhost:3000 を開き、トレース を確認。実行ごとに muse-glimmer-mcp-agent という名前のトレースが生成され、モデルリクエスト(入出力トークン)と各 MCP ツール呼び出しのスパンが含まれます。入力、出力、レイテンシー、コストを確認できます。
エージェントを MCP サーバーとして公開する
agent_mcp_server.py はアーキテクチャを反転させます。エージェント自体が MCP サーバー になり、任意の MCP クライアント(Claude Desktop、VS Code、Cursor、別の Pydantic AI エージェントなど)に対して ask_agent(prompt) という1つのツールを公開します。各呼び出しでは Ollama 経由で muse-glimmer を実行し、内部の MCP ツールも保持したまま Langfuse にトレースされます。
サーバーの実行
uv run python agent_mcp_server.pyクライアント設定
任意の MCP クライアントをこのサーバーに設定するには、uv 管理の venv の Python を使用します(uv run --project <repo> python でも動作します)。例:
Claude Desktop — claude_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"]
}
}
}ファイル構成
ファイル | 説明 |
| Pydantic AI エージェント:Ollama モデル + MCP 機能 + Langfuse |
| ローカルツールを公開する FastMCP サーバー(stdio) |
| エージェント自体を MCP サーバーとして公開する( |
| Langfuse + Ollama の設定 |
pydantic-ai-mcp-server-sample
Maintenance
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
- AlicenseAqualityCmaintenanceEnables seamless integration between Ollama's local LLM models and MCP-compatible applications, supporting model management and chat interactions.131,209171AGPL 3.0
- AlicenseAqualityCmaintenanceEnables 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.51MIT
- AlicenseAqualityDmaintenanceIntegrates Ollama's local AI models with MCP clients, enabling listing models, viewing model details, and asking questions to models.3MIT
- FlicenseNot gradedqualityCmaintenanceExposes system tools (disk usage, file listing) and weather information via Open-Meteo to MCP-compatible LLMs.
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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