mcp-dotnet
Two MCP stdio servers on .NET 10, built on the official
ModelContextProtocol C# SDK, signing in to
Entra ID through Azure.Identity.
- Teams (
teams-mcp): Microsoft Teams via Microsoft Graph. Read teams, channels, chats and
messages, search, wait for new messages, and send behind an opt-in gate.
- Azure DevOps (
ado-mcp): projects, repositories, pull requests, work items, pipelines and
search (code, work items, wiki) via the REST API, plus gated work item writes and pull request
comments.
Each server works on its own, so install only the one you need. Design documentation is in
docs/.
Quick start
You need the .NET 10 SDK and an Entra ID app registration
in your own tenant, described under App registrations: the servers sign in as
you against your own organization, so there is no shared id to hand out.
1. Install the servers from nuget.org. This puts teams-mcp and ado-mcp on your PATH.
dotnet tool install --global JasonBright.Mcp.Teams
dotnet tool install --global JasonBright.Mcp.AzureDevOps
2. Point them at your tenant. Tenant and client ids are public OAuth identifiers, not secrets.
Set them at user scope and every client picks them up: an MCP server is a child process of the
client that launches it.
[Environment]::SetEnvironmentVariable('TEAMS_MCP_TENANT_ID', '<tenant-guid>', 'User')
[Environment]::SetEnvironmentVariable('TEAMS_MCP_CLIENT_ID', '<app-guid>', 'User')
[Environment]::SetEnvironmentVariable('ADO_MCP_TENANT_ID', '<tenant-guid>', 'User')
[Environment]::SetEnvironmentVariable('ADO_MCP_CLIENT_ID', '<app-guid>', 'User')
[Environment]::SetEnvironmentVariable('ADO_MCP_ORG_URL', 'https://dev.azure.com/contoso', 'User')
[Environment]::SetEnvironmentVariable('ADO_MCP_PROJECT', 'Fabrikam', 'User')
On Linux and macOS these are export lines in your shell profile. Terminals that are already open
keep the old values, so start a new one.
Both servers are read-only until you also set a gate; see Enabling writes.
Every other variable has a default, listed in each server's section below.
3. Install the plugin in Claude Code. It registers both servers and brings four skills that
use them (teams-message, teams-followup, teams-watcher, mcp-reauth).
/plugin marketplace add jgbright/mcp-dotnet
/plugin install mcp-dotnet@mcp-dotnet
On VS Code or Cursor, or to keep the config in one repository, write it yourself
(a .mcp.json by hand) or let the server write it
(Registering a server in a repository).
4. Sign in once, then check it. Sign-in is interactive and console-only; the server has nowhere
to prompt over stdio.
teams-mcp auth # device-code sign-in, once per machine
teams-mcp selftest # silent-auth path plus one real Graph call, raw errors on the console
ado-mcp auth
ado-mcp selftest
Restart the MCP client and the tools are there. If something is wrong, run selftest first: it
tells you whether the problem is sign-in or the tool. See Logs for the rest of the triage.
Calling a tool from the command line
call invokes one tool per run with no MCP client on the other end. The server is the real one,
driven over in-memory pipes, so a call that works here works under MCP. Result JSON is the only
thing on stdout (logs go to stderr and the log file) and a tool error exits non-zero, so output
pipes into ConvertFrom-Json or jq.
ado-mcp call # no tool: list the tools
ado-mcp call list_repos project=Fabrikam limit=5 # KEY=VALUE pairs, coerced by the tool's schema
ado-mcp call list_repos '{"project":"Fabrikam"}' # or one JSON object
'{"project":"Fabrikam"}' | ado-mcp call list_repos - # or that object on stdin, if quoting fights back
teams-mcp call list_teams
Tool names resolve leniently, as they do inside the tools: call repos finds list_repos and
notes the correction on stderr, an ambiguous or unknown name fails listing the candidates, and a
wrong argument fails before anything is sent, naming what the tool takes.
Enabling writes
Both servers are read-only out of the box. The mutating tools are always listed and refuse at call
time until their gate is set.