Skip to main content
Glama

Muse Glimmer + MCP + LangGraph (로컬)

다음을 수행하는 최소한의 Pydantic AI 에이전트입니다:

  • muse-glimmer (Meta의 30B agentic 모델)를 로컬 Ollama 인스턴스에서 실행합니다.

  • MCP 지원: 로컬 FastMCP 서버(mcp_server.py)가 stdio subprocess로 연결되어 get_weather, get_current_time, list_ollama_models를 에이전트 도구로 노출합니다.

  • 전체 추적(traces, model requests, tool calls, output)을 로컬 Langfuse 인스턴스로 보내 관측 가능성을 확보합니다.

사전 요구 사항

  • Ollama가 실행 중이고 muse-lim-mer 모델이 pull되어 있는 상태:

    ollama pull muse-glimmer
  • http://localhost:3000에서 접근 가능한 로컬 Langfuse 인스턴스 (예: Langfuse 저장소의 docker compose 사용).

  • 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

에이전트는 세 가지 데모 프롬프트에 응답하며, 필요할 때 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 → Traces를 열어. 각 실측은 muse-glimmer-mcp-agent라는 정의 trace를 만듭며, 모델 요청(입력/출력 토근), 각 MCP 도구 호출 span, 그리고 입출, 출출, 지연, side 비용을 확ㅂ할 수 있습니다.

에이전트를 MCP 서버로 노출

agent_mcp_server.py는 아키텍처를 뒤바니다. 에이전트 자가 자체가 MCP 서버가 되어 ask_agent(prompt) 하나의 CLI를 노출하며, Clode Desktop, VS Code, Cursor, 또는 에이전트나 MCP 클라이언트 모두가 사용할 수 있습니다. 각 호출은 muse-밎l` via Ollama, it still uses internal MCP tool for 실행하고, measured and measured to Langfuse at the end.

서버 실행

uv run python agent_mcp_server.py

클라이언트 구성

uv으로 관리되는 venv의 Python (uv run --project <repo> python도 됩니다)을 사용하여 모든 MCP 클라이언트를 이 서버에 연결하세요. 예:

Claude Desktop —:

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

Var아 기타 (예: .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 mcp] — .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

파일

설명

agent.py

Pydantic AI agent: Ollama model + MCP mod + LangGraph

mcp_server.py

FastMCP server (stdio) exposes local tools

agent_mcp-server.py

exports the agent as MCP server (ask_agent tool)

.env

LangGraph + Ollama configuration

pydantic-ai-mcp-server-sample

Available Tools

1 tool
ask_agentC

Ask the Muse Glimmer AI agent a question.

NameRequiredDescriptionDefault
promptYes

Output Schema

NameRequiredDescription
resultYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavior. It states 'ask a question,' which implies a query or read operation, but it does not disclose any side effects, response format, permissions, or limitations. This is a significant gap for a tool with no annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, short sentence with no wasted words. The verb is front-loaded and the resource is clear. It is appropriately concise for a simple tool, though this brevity comes at the cost of detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has an output schema (not shown), so return values may be covered, but the description lacks any context about the nature of questions, expected inputs, or edge cases. An agent has no information about what kinds of prompts are valid or what the response will look like, making it incomplete for a one-parameter tool with no annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, and the description does not mention the 'prompt' parameter at all. It adds no information about the expected format, content, or purpose of the prompt beyond what the parameter name itself implies. The description fails to compensate for the schema coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (ask) and the resource (Muse Glimmer AI agent). It is specific enough for a tool with no siblings, though it is generic and could be more detailed about the scope of questions. The verb+resource is clear and not tautological.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives, and there are no sibling tools. The description does not mention any prerequisites, context, or conditions for use, leaving the agent to infer that it should be used when a question needs answering.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev0.1.0
    • First observedask_agent

TDQS

B3.3/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or misselection. The tool 'ask_agent' has a clearly distinct purpose as the sole entry point for questioning the agent.

Naming Consistency5/5

The single tool name 'ask_agent' follows a consistent verb_noun pattern, aligned with its singular function. Naming is clear and predictable.

Tool Count3/5

The server has only one tool, which feels thin but is appropriate for its narrow purpose of asking a question. It is not an extreme mismatch, but it borders on insufficient for broader agent workflows.

Completeness5/5

The domain is defined as asking the Muse Glimmer agent a question, and the single tool fully covers this operation. There are no obvious gaps within the stated scope.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Enables seamless integration between Ollama's local LLM models and MCP-compatible applications, supporting model management and chat interactions.
    13
    897 npm
    176
    AGPL 3.0
  • A
    license
    B
    quality
    F
    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