AgentStack
MCP verified MIT Self-run

Contextify Net

mcp-atakanatali-contextify-net · by atakanatali

Contextify is a high-performance, modular library for building Model Context Protocol (MCP) servers in .NET. It allows you to expose your application's logic, data, and tools to AI assistants with enterprise-grade security and observability.

No reviews yet
0 installs
3 views
0.0% view→install

Install

$ agentstack add mcp-atakanatali-contextify-net

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Contextify Net? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Contextify

A modular, enterprise-grade .NET framework for Model Context Protocol (MCP) servers


Core Architecture

Contextify provides a high-level orchestration layer that abstracts the complexities of the Model Context Protocol.

graph TB
    subgraph Client ["AI Client (Claude/GPT)"]
        CL[AI Assistant]
    end

    subgraph Contextify ["Contextify Stack"]
        direction TB
        T[Transport LayerHTTP / STDIO] --> DP[JSON-RPC Dispatcher]
        DP --> S[Security LayerDeny-by-Default Policy]
        S --> C[Core Orchestrator]
        C --> CAT[Tool/Resource Catalog]
    end

    subgraph Providers ["Feature Providers"]
        OA[OpenAPI / Swagger] --> C
        NA[Native .NET Tools] --> C
        SY[System Actions] --> C
    end

    subgraph SDK ["Official SDK Bridge"]
        AD[OfficialAdapter] -.-> |Maps to| MSD[Anthropic SDK Data Models]
    end

    CL  T
    C  AD

Package Deep Dive

Contextify is a modular ecosystem. You only install what you need.

1. Foundation & Protocol Bridge

2. Integration & Hosting

  • Contextify.AspNetCore: Provides AddContextify() and MapContextifyMcp() extensions. It integrates with the standard .NET ILogger, IOptions, and Dependency Injection.
  • Contextify.Transport.Http: Implements Server-Sent Events (SSE) for AI clients that communicate over HTTP (like most enterprise web apps).
  • Contextify.Transport.Stdio: Implements the standard input/output transport, allowing your .NET application to act as a local MCP server for tools like the Claude Desktop app.

3. Capability Extensions

  • Contextify.OpenApi: A powerful engine that parses your existing Swagger/OpenAPI specifications and dynamically generates MCP tools. This allows you to expose existing microservices to AI in seconds.
  • Contextify.Actions.Defaults: High-performance, native .NET implementations of common tasks (e.g., File I/O, System Info, Math).

4. Configuration & Security

5. Multi-Backend Gateway


How It Works: The Protocol Bridge

Contextify doesn't reimplement the protocol from scratch. Instead, it leverages the Official Anthropic SDK.

When an AI client (like Claude) sends a tools/list request:

  1. Transport Layer (HTTP or Stdio) receives the raw JSON and passes it to the Dispatcher.
  2. Dispatcher queries the Core Orchestrator for available tools.
  3. Core Orchestrator pulls from all registered providers (OpenAPI, System Actions, etc.) and filters them through the Security Layer.
  4. OfficialAdapter takes the whitelisted Contextify tool definitions and converts them into ModelContextProtocol.Types.Tool objects.
  5. The Anthropic SDK then handles the final JSON-RPC serialization and returns the compliant response to the client.

This "Best of Both Worlds" approach ensures 100% protocol compliance while offering a rich, .NET-idiomatic developer experience.


Getting Started

1. Build a Web-based MCP Server (HTTP)

Expose your API to Claude through an HTTP endpoint.

Installation:

dotnet add package Contextify.AspNetCore
dotnet add package Contextify.Transport.Http

Implementation:

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddContextify()
    .AddHttpTransport(options => options.Endpoint = "/mcp")
    .AddAppSettingsPolicyProvider();

var app = builder.Build();
app.MapContextifyMcp();
app.Run();

2. Build a CLI MCP Server (STDIO)

Ideal for local development or custom CLI-based context providers.

Installation:

dotnet add package Contextify.Transport.Stdio

Security: Deny-by-Default

Security is not an afterthought in Contextify. By default, no tools are exposed. You must explicitly whitelist tools in your configuration:

{
  "Contextify": {
    "Security": {
      "DefaultPolicy": "Deny",
      "Whitelist": [
        { "ToolName": "weather:*", "Enabled": true },
        { "ToolName": "internal:user:read", "Enabled": true }
      ]
    }
  }
}

The Gateway Pattern

When managing dozens of MCP servers, the Contextify Gateway allows you to aggregate them into a single, namespaced catalog.

  • Unified Catalog: Merges upstream tools into one list.
  • Namespacing: upstream1:tool_name prevents collisions.
  • Health Checks: Automatically removes unhealthy upstreams.
  • Consul Discovery: Add new MCP servers to your infrastructure without restarts.

Documentation

  • Introduction to MCP
  • [Architecture & Deep Dive](docs/architecture.md)
  • [Example Projects](samples/)
  • [Contributing](CONTRIBUTING.md)

License

Licensed under the [MIT License](LICENSE).

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.