Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Microsoft Teams MCP Plugin

Model Context Protocol (MCP) integration for Microsoft Teams AI applications. Enables Teams bots to both expose tools as MCP servers and use MCP servers as clients.

📖 Documentation

Installation

pip install microsoft-teams-mcpplugin

Or if using uv:

uv add microsoft-teams-mcpplugin

Usage

MCP Client (Use MCP Servers)

from microsoft_teams.apps import App
from microsoft_teams.mcpplugin import McpClientPlugin
from microsoft_teams.ai import ChatPrompt
from microsoft_teams.openai import OpenAICompletionsAIModel

# Create MCP client plugin
mcp_client = McpClientPlugin()

# Connect to MCP servers
mcp_client.use_mcp_server("https://example.com/mcp")

# Use with ChatPrompt
model = OpenAICompletionsAIModel(api_key="your-api-key", model="gpt-4")
prompt = ChatPrompt(model, plugins=[mcp_client])

MCP Server (Expose Tools)

from microsoft_teams.apps import App
from microsoft_teams.mcpplugin import McpServerPlugin
from microsoft_teams.ai import Function
from pydantic import BaseModel

# Create MCP server plugin
mcp_server = McpServerPlugin(name="my-mcp-server")

# Define a tool
class EchoParams(BaseModel):
    input: str

async def echo_handler(params: EchoParams) -> str:
    return f"You said {params.input}"

# Register tool with MCP server
mcp_server.use_tool(
    Function(
        name="echo",
        description="Echo back whatever you said",
        parameter_schema=EchoParams,
        handler=echo_handler
    )
)

app = App(plugins=[mcp_server])

Metadata

Release files for microsoft-teams-mcpplugin 2.0.0a78

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for microsoft-teams-mcpplugin 2.0.0a78
File Size Uploaded Provenance Actions
microsoft_teams_mcpplugin-2.0.0a78.tar.gz 8.5 kB Without provenance Details for microsoft_teams_mcpplugin-2.0.0a78.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for microsoft-teams-mcpplugin 2.0.0a78
File Interpreter ABI Platform Actions
microsoft_teams_mcpplugin-2.0.0a78-py3-none-any.whl Python 3 none any Details for microsoft_teams_mcpplugin-2.0.0a78-py3-none-any.whl

Total release size: 20.5 kB

Release files / microsoft_teams_mcpplugin-2.0.0a78.tar.gz

Download URL microsoft_teams_mcpplugin-2.0.0a78.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3dbf1733c4de88b80d5c51968275a85837447c81e303f68187b196de89fc5b74
BLAKE2b-256 checksum
How to use checksums
bbf4fa975a7df3c04d9c522b34eef388f7f2b3f11063a7d7e3d2c5dfb6b04352
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / microsoft_teams_mcpplugin-2.0.0a78-py3-none-any.whl

Download URL microsoft_teams_mcpplugin-2.0.0a78-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c1e32d4f3e6c050e8e6ee9abb43960f1e242d9e5447919244fbec5913bdd199
BLAKE2b-256 checksum
How to use checksums
dec5643777a775475ff1067a13c3f930d9ba1b58a7920a50ba0980613bbdce93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Security for microsoft-teams-mcpplugin 2.0.0a78

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page