Guidance for using the MMSP Python SDK (mmsp). An agent skill from Prism-Shadow/model-message-stream-protocol.

Apache-2.0Auto-check passedAI & LLM Engineering

Install Mmsp Python

skills CLI
$ npx skills add Prism-Shadow/model-message-stream-protocol --skill mmsp-python -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Prism-Shadow/model-message-stream-protocol mmsp-python --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Prism-Shadow/model-message-stream-protocol.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mmsp-python .claude/skills/mmsp-python && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mmsp-python
GitHub stars
113
Token cost
~1.4k tokens
SKILL.md length
280 words
Files
5
Skills in repo
3
Repo updated
First seen
Licence
Apache-2.0

At a glance

Guidance for using the MMSP Python SDK (mmsp). An agent skill from Prism-Shadow/model-message-stream-protocol.

  • Developing agents that call different LLM APIs
  • SKILL.md covers Installation, Basic Usage, Notes and Reference
  • Calls uv and pip
  • Need a unified interface for LLM providers

What it does

Mmsp Python is an agent skill from Prism-Shadow/model-message-stream-protocol. Guidance for using the MMSP Python SDK (mmsp). Use when developing agents that call different LLM APIs, need a unified interface for LLM providers, mention MMSP, request mmsp, or already import it.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files (for example `reference/api.md`, `reference/data-models.md` and `reference/integrations.md`).

It sits in AI & LLM Engineering, covering LLM API integration. It works with Python, DeepSeek, Google Gemini and OpenAI. The repository describes itself as: One interface for 1,000+ LLMs, with zero-code switching and built-in observability. (GPT-6 / Claude 5 / Gemini 3.8). The licence is Apache-2.0.

When your agent uses it

  • Developing agents that call different LLM APIs
  • Need a unified interface for LLM providers
  • Already import it

Example prompts

  • “/mmsp-python”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 326dc9b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv and pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mmsp Python loads about 1.4k tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 280 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~53
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Prism-Shadow/model-message-stream-protocol at commit 326dc9b, republished under its Apache-2.0 licence (© Prism-Shadow). 280 words, ~1,370 tokens.

Download SKILL.mdSave it as .claude/skills/mmsp-python/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
mmsp-python
description
Guidance for using the MMSP Python SDK (`mmsp`). Use when developing agents that call different LLM APIs, need a unified interface for LLM providers, mention MMSP, request `mmsp`, or already import it.

MMSP Python

MMSP is a unified SDK for calling LLMs across providers with shared data models, tool calling, tracing, and playground support.

Installation

bash
uv add mmsp
# or
pip install mmsp

For model IDs, API keys, and base URLs, see Model selection.

Basic Usage

This example asks GPT to call a weather tool, runs the tool, then sends the result back.

python
import asyncio
from mmsp import AutoLLMClient


def get_weather(location: str) -> str:
    return f"Temperature in {location}: 22 C"


# Map tool names to their implementations so calls can be dispatched by name.
TOOLS = {"get_weather": get_weather}


async def main():
    weather_function = {
        "name": "get_weather",
        "description": "Gets the current weather for a given location.",
        "parameters": {
            "type": "object",
            "properties": {
                "location": {
                    "type": "string",
                    "description": "The city name"
                }
            },
            "required": ["location"]
        }
    }

    client = AutoLLMClient(model="gpt-5.5")
    config = {"tools": [weather_function]}

    tool_call = None
    async for event in client.streaming_response_stateful(
        message={
            "role": "user",
            "content_items": [{"type": "text.done", "text": "What's the weather in London?"}]
        },
        config=config
    ):
        if event["event_type"] == "stop":
            # Always the last event, exactly once: the response has finished.
            print(event["finish_reason"], event["usage_metadata"])
        for item in event["content_items"]:
            if item["type"] == "tool_call.done":  # the complete call; tool_call.delta items are fragments
                tool_call = item

    if tool_call:
        # Dispatch by tool name instead of hardcoding the function.
        result = TOOLS[tool_call["name"]](**tool_call["arguments"])

        async for event in client.streaming_response_stateful(
            message={
                "role": "user",
                "content_items": [
                    {
                        "type": "tool_result.done",
                        "text": result,
                        "tool_call_id": tool_call["tool_call_id"]
                    }
                ]
            },
            config=config
        ):
            print(event)
            # Streams the answer as text.delta fragments, closes it with text.done, then one stop event carrying usage:
            # {'role': 'assistant', 'event_type': 'delta', 'content_items': [{'type': 'text.delta', 'text': 'The'}], 'usage_metadata': None, 'finish_reason': None}
            # {'role': 'assistant', 'event_type': 'delta', 'content_items': [{'type': 'text.delta', 'text': ' weather'}], 'usage_metadata': None, 'finish_reason': None}
            # {'role': 'assistant', 'event_type': 'delta', 'content_items': [{'type': 'text.delta', 'text': ' is 22 C.'}], 'usage_metadata': None, 'finish_reason': None}
            # {'role': 'assistant', 'event_type': 'delta', 'content_items': [{'type': 'text.done', 'text': 'The weather is 22 C.'}], 'usage_metadata': None, 'finish_reason': None}
            # {'role': 'assistant', 'event_type': 'stop', 'content_items': [], 'usage_metadata': {'cached_tokens': 0, 'prompt_tokens': 12, 'thoughts_tokens': 0, 'response_tokens': 8}, 'finish_reason': 'stop'}


asyncio.run(main())

Notes

Agent loop rules:

  • Read tool calls from tool_call.done items. tool_call.delta items are argument fragments for live display only.
  • Send every tool result with the exact tool_call_id from its originating tool_call.done. Do not invent, normalize, or reuse IDs across unrelated tool calls.
  • If streamed tool-call arguments cannot be parsed, MMSP raises ToolCallArgumentParseError in place of the tool_call.done. Do not execute the tool from partial arguments; let the agent runtime retry or re-prompt the model.
  • Read usage and the finish reason from the stop event: it is always the last event, arrives exactly once, and always carries both. delta events carry None for both. A thinking-only response raises EmptyResponseError instead of the stop event; its usage_metadata still reports the tokens.
  • Write message items with the .done types (text.done, tool_result.done, …). Types without the suffix are still accepted, with a deprecation warning, until 0.6.0.
  • Preserve thinking.done and inline_thinking.done items. Do not strip or modify fidelity fields.
  • For embedding models, each UniMessage in the messages array produces one embedding vector. Within a single message, all items in content_items are aggregated into a single embedding. Set embedding_config.dimensions in the config to control vector size.

Reference

  • Model selection — model IDs, client types, API keys, and base URLs.
  • Data models — UniConfig, UniMessage, UniEvent, the streaming protocol, and errors.
  • APIs — client initialization and method signatures.
  • Tracer & Playground — local tracing UI and the manual chat playground.

© Prism-Shadow, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files in skills/mmsp-python of Prism-Shadow/model-message-stream-protocol.

  • SKILL.md
  • reference/api.md
  • reference/data-models.md
  • reference/integrations.md
  • reference/models.md

Open the folder on GitHubat commit 326dc9b

Compare with similar skills

Mmsp Python next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mmsp Python compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mmsp Python this skillPrism-Shadow/model-message-stream-protocol113—~1.4kAutomated safety check: PassApache-2.0
ModLens Image Vision Bridgeliustack/modlens4.1k—~1.3kAutomated safety check: NotesMIT
Bridgic LLMsbitsky-tech/bridgic155—~839Automated safety check: NotesMIT
Gemini Interactions APIAyuilos/Miffan182—~4.6kAutomated safety check: PassAGPL-3.0
Azure AI Projects Python SDKmicrosoft/skills3.1k6 repos~2.8kAutomated safety check: PassMIT
Gemini API Devgoogle-gemini/gemini-skills4.3k—~5.1kAutomated safety check: PassApache-2.0

Similar skills

  • Gives text-only models sight by running the modlens CLI on an image path or URL and returning structured JSON evidence with transcribed text, layout and semantics.

    4.1k GitHub stars~1.3k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check: notes
  • Bridgic LLMs

    bitsky-tech/bridgic

    LLM provider initialization for bridgic projects. An agent skill from bitsky-tech/bridgic.

    155 GitHub stars~839 tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check: notes
  • A skill your agent uses when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, streaming responses…

    182 GitHub stars~4.6k tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Official

    Reference for building on Microsoft Foundry with the azure-ai-projects Python SDK: project clients, versioned agents, evaluations, connections, datasets and indexes.

    3.1k GitHub starsUsed in 6 repos~2.8k tokens
    AI & LLM EngineeringAuto-check passed
  • Gemini API Dev

    google-gemini/gemini-skills

    Official

    A skill your agent uses when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, speech generation (TTS), voice…

    4.3k GitHub stars~5.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Dingo Verify

    MigoXLab/dingo

    A skill your agent uses when the user wants to fact-check an article or verify factual claims in a document.

    757 GitHub stars~833 tokensUpdated 9 days ago
    AI & LLM EngineeringAuto-check passed

More from Prism-Shadow/model-message-stream-protocol

  • Mmsp Typescript

    Prism-Shadow/model-message-stream-protocol

    Guidance for using the MMSP TypeScript SDK (@prismshadow/mmsp).

    113 GitHub stars~1.4k tokensUpdated 3 days ago
    Auto-check passed
  • Mmsp Dev

    Prism-Shadow/model-message-stream-protocol

    Fixed workflow for developing MMSP itself — adding or updating model support, and changing its pages.

    113 GitHub stars~7.2k tokensUpdated 3 days ago
    Auto-check passed

Questions about Mmsp Python

What does Mmsp Python do?

Guidance for using the MMSP Python SDK (mmsp). An agent skill from Prism-Shadow/model-message-stream-protocol. Mmsp Python is an agent skill from Prism-Shadow/model-message-stream-protocol. Guidance for using the MMSP Python SDK (mmsp).

When should I use Mmsp Python?

Mmsp Python fits situations like: developing agents that call different LLM APIs; need a unified interface for LLM providers; already import it.

How do I install Mmsp Python in Claude Code?

Run `npx skills add Prism-Shadow/model-message-stream-protocol --skill mmsp-python -a claude-code`. Or copy the skill folder (skills/mmsp-python in Prism-Shadow/model-message-stream-protocol) into .claude/skills/mmsp-python in your project. Claude Code loads it when a task matches its description.

How do I install Mmsp Python in Codex?

Run `npx skills add Prism-Shadow/model-message-stream-protocol --skill mmsp-python -a codex`. Or copy the skill folder (skills/mmsp-python in Prism-Shadow/model-message-stream-protocol) into .agents/skills/mmsp-python in your project. Codex loads it when a task matches its description.

Can I use Mmsp Python in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Prism-Shadow/model-message-stream-protocol --skill mmsp-python -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mmsp-python, .gemini/skills/mmsp-python, .github/skills/mmsp-python and .opencode/skills/mmsp-python in your project.

What does Mmsp Python need to run?

Going by SKILL.md and its folder, Mmsp Python needs the command-line tools its instructions call (uv and pip). Our summary lists: Python 3.

Does Mmsp Python access the network?

SKILL.md contains no URLs. Its commands use uv and pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Mmsp Python safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mmsp Python use?

Mmsp Python is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mmsp Python use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mmsp Python?

Skills that share tags, products or a category with Mmsp Python: ModLens Image Vision Bridge (liustack/modlens, 4.1k stars), Bridgic LLMs (bitsky-tech/bridgic, 155 stars), Gemini Interactions API (Ayuilos/Miffan, 182 stars) and Azure AI Projects Python SDK (microsoft/skills, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mmsp Python?

Prism-Shadow (a GitHub organization) maintains it in Prism-Shadow/model-message-stream-protocol, which has 113 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 4, 2026.

Source: Prism-Shadow/model-message-stream-protocol on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.