Skill Detail

Expose one .NET operation and verify its local MCP tool contract

Build a bounded C# stdio MCP tool, inspect its discovered schema, and check a harmless fixture through a separate client.

Library & API ReferenceMCP
Library & API Reference MCP Security Reviewed
โญ 4.7k GitHub stars
COPY SKILL INSTRUCTIONS (OPTIONAL)
npx skills add agentskillexchange/skills --skill verify-local-dotnet-mcp-tool-contract Copy
Uses the third-party skills CLI, not an ASE-owned installer. Check your agent’s compatibility. This copies instructions; complete the upstream tool setup below separately.
At a glance
Tools required
.NET SDK, dotnet CLI, ModelContextProtocol NuGet package, Microsoft.Extensions.Hosting, local MCP client
Install & setup
Create separate server and client console projects: dotnet new console -n AseMcpServer; dotnet new console -n AseMcpClient. Add ModelContextProtocol to both projects with dotnet add package ModelContextProtocol, and add Microsoft.Extensions.Hosting to AseMcpServer. Adapt the pinned guide to the local server, record resolved package versions, build both projects and run the client against the explicit local server path.
Author
Model Context Protocol
Publisher
Organization
Last updated
Nov 30, 2026
Quick brief

Invoke this workflow when an agent must expose one selected .NET operation to an MCP client and produce evidence that its tool contract works. The deliverable is a local stdio server, a tool-discovery record, and a checked result from a harmless fixture. Keep the task bounded to the chosen operation and its arguments.

How it works

What this skill actually does

Prepare the local check

Identify the method, allowed inputs, expected result, project path and cancellation behavior. Start with a deterministic fixture before connecting business data. In a new console project, add ModelContextProtocol and Microsoft.Extensions.Hosting. Follow the upstream server example: register AddMcpServer(), WithStdioServerTransport() and WithToolsFromAssembly(); annotate the intended tool with McpServerToolType and McpServerTool. Send console logs to stderr so stdout remains available for protocol messages.

Discover and invoke the tool

Build the server. Create a separate console client with ModelContextProtocol. Adapt the documented StdioClientTransport to launch your built local server with an explicit project or assembly path. Connect using McpClient.CreateAsync, inspect ListToolsAsync and record the actual tool name and input schema before calling CallToolAsync with the fixture arguments. Check the returned text against the expected value and inspect error results. For the upstream Echo fixture, message Hello MCP! should yield hello Hello MCP!.

Return reviewable evidence

Report the selected SDK package version, build result, command and working directory, discovered tool schema, fixture input, observed output and pass/fail conclusion. Stop and report a missing tool, protocol error or output mismatch. This workflow ends at a local contract check; production HTTP deployment, authentication changes and unrelated tool exposure require separate tasks. SDK source and invocation metadata were verified; this intake did not compile or execute the examples.

Use this when repeatable agent handoff and a recorded acceptance check are needed beyond ordinary SDK browsing. MCP is central to invocation. Pinned upstream client/server guide.