1. Conduid
  2. AI
  3. MCP.Extensions
MCP server · AI

MCP.Extensions

Extensions and middleware for ModelContextProtocol in ASP.NET Core.

Unclaimed ai
34Low

Scored 4 months ago · breakdown

About MCP.Extensions

MCP.Extensions is an MCP server in the AI category: extensions and middleware for ModelContextProtocol in ASP.NET Core. It has been installed 0 times through Conduid.

Install

Clone
git clone https://github.com/echapmanFromBunnings/mcp.extensions

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about MCP.Extensions

Powered by Claude · Grounded in docs

I know everything about MCP.Extensions. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • ·Scoped permissionsNot checked yet.

README

mcp.extensions

A collection of reusable .NET middleware, attributes, and services to extend and enhance ASP.NET Core applications working with the Model Context Protocol.

Built against ModelContextProtocol SDK v0.4.0-preview.3.

Features

  • Audience-Based Segmentation 🎯

    • McpAudienceAttribute: Declarative attribute for audience-based access control on MCP tools, resources, and prompts
    • Streaming Middleware: Real-time filtering of MCP responses based on client audience credentials
      • StreamingToolFilteringMiddleware: Filters tools in real-time based on audience
      • StreamingResourceFilteringMiddleware: Filters resources in real-time based on audience
      • StreamingPromptFilteringMiddleware: Filters prompts in real-time based on audience
    • IAudienceFilterService: Unified service for managing audience-to-resource mappings
    • 📖 Complete Guide: Comprehensive documentation on audience segmentation and streaming implementation
  • Logging Middleware

    • HeaderLoggingMiddleware: Logs HTTP request headers for diagnostics and auditing
    • RequestBodyLoggingMiddleware: Logs incoming HTTP request bodies for debugging and traceability
    • ResponseBodyLoggingMiddleware: Logs outgoing HTTP response bodies for monitoring and troubleshooting
  • Legacy Services (Deprecated)

    • IToolAudienceService: Legacy interface for tool audience management (use IAudienceFilterService instead)

Getting Started

Quick Start: Audience-Based Segmentation

The easiest way to enable audience-based filtering for your MCP server:

// 1. Register services and scan your assembly for MCP attributes
builder.Services.AddMcpAudienceFiltering(Assembly.GetExecutingAssembly());

// 2. Apply all filtering middlewares
app.UseMcpAudienceFiltering();

// 3. Decorate your MCP tools, resources, and prompts with audience restrictions
public class MyMcpTools
{
    [McpServerTool("admin_tool")]
    [McpAudience("ADMIN")]
    public async Task<Result> AdminOnlyTool() { }
    
    [McpServerTool("public_tool")]
    [McpAudience("PUBLIC", "ADMIN")]
    public async Task<Result> PublicTool() { }
}

Clients send their audience type via the X-AGENT-MODE header:

GET /mcp/tools
X-AGENT-MODE: ADMIN

📖 For a complete guide with examples, best practices, and technical details, see the McpAudienceAttribute and Streaming Implementation Guide

Advanced Usage

Logging Middleware:

app.UseMiddleware<HeaderLoggingMiddleware>();
app.UseMiddleware<RequestBodyLoggingMiddleware>();
app.UseMiddleware<ResponseBodyLoggingMiddleware>();

Contributing

Contributions are welcome! Please open issues or submit pull requests for new features, bug fixes, or improvements.

License

MIT

README mirrored from the source repository 4 months ago. The original is authoritative.

Questions

About MCP.Extensions

How do I install MCP.Extensions?

Run git clone https://github.com/echapmanFromBunnings/mcp.extensions, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is MCP.Extensions safe to use with an AI agent?

Its trust score is 34 out of 100 (low). Conduid hasn't run static security checks on this repository yet, so review the source yourself before granting it credentials. It has no ConduID identity yet, so agent calls to it are not receipted.

Is MCP.Extensions still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.