How to Create Sizing Plans for Custom Models in Microsoft Foundry: Fine-Tuning GPT Models from the Catalog for Specific Use Cases

Microsoft Foundry (also known as Azure AI Foundry) provides a unified platform for discovering, fine-tuning, deploying, and managing AI models. Its extensive Model Catalog includes hundreds of foundation models from OpenAI (GPT family), Microsoft, Meta, Anthropic, and open-source providers. For enterprise projects requiring domain-specific performance, security, or cost optimization, teams often start with a GPT model from the catalog and apply model refinement (fine-tuning) to create a custom model tailored to their use case—such as customer support agents, compliance document analysis, or industry-specific chatbots. Sizing in this context means capacity planning: estimating and configuring the right compute resources, throughput, latency, and costs for both the fine-tuning job and the production deployment of your custom model. Poor sizing leads to high costs, throttled performance, or underutilized resources. This guide walks through how to create a practical sizing plan, with a focus on GPT-based custom models refined via supervised fine-tuning (SFT), direct preference optimization (DPO), or reinforcement fine-tuning (RFT). Why Refine GPT Models in Foundry for Specific Use Cases? Base GPT models (e.g., GPT-4o, GPT-4.1, GPT-4.1-mini) are general-purpose and powerful, but they often underperform on proprietary data, terminology, or edge cases. Fine-tuning in Foundry: - Improves accuracy and relevance with your own JSONL-formatted conversational data. - Reduces prompt engineering effort and token usage (lowering inference costs). - Supports advanced methods like LoRA for efficient parameter updates. - Maintains enterprise features: data residency options, prompt caching, and seamless integration with agents or copilots.   Fine-tuned models are still fully managed by Microsoft but appear as custom deployments in your Foundry resource. Sizing becomes critical here because deployment options directly impact hourly hosting fees, token pricing, and guaranteed throughput.   Step 1: Prepare Your Fine-Tuning Project (Dataset Sizing Considerations)   Before any deployment sizing, size your training data correctly: - Minimum: 10 examples (but aim for hundreds or thousands for meaningful improvement). - Best practice: Start with 50 high-quality, human-curated examples; doubling dataset size often yields linear quality gains. - File format: JSONL (UTF-8), <512 MB per file, total files ≤1 GB per resource. - Structure: Chat Completions format (supports vision for multimodal GPT models). - Impact on sizing: Larger datasets increase training time/cost and may require more epochs or higher learning-rate multipliers. Use the **Developer** training tier (spot capacity, lowest cost) for experimentation and **Global/Standard** for production-grade jobs. Generate synthetic data in the Foundry portal (Data tab → Synthetic Data) if labeled data is limited, then validate quality before training. Step 2: Run the Fine-Tuning Job 1. In the Foundry portal → Models → select a supported GPT model (e.g., gpt-4o-mini, gpt-4.1 series). 2. Upload training/validation files. 3. Choose customization method (SFT, DPO, or RFT) and training tier (Standard for data residency, Global for cost savings, Developer for evaluation). 4. Set hyperparameters (epochs, learning rate multiplier, batch size) or use defaults. 5. Monitor metrics: training/validation loss, token accuracy, and checkpoints.   Training jobs run on managed capacity; quotas apply (max 3–5 simultaneous jobs depending on tier). No manual VM sizing is needed—Foundry abstracts this. Once complete, you receive a fine-tuned model ID (e.g., `gpt-4.1-mini-2025-04-14.ft-xxx`).   ### Step 3: Create Your Deployment Sizing Plan (The Core of Custom Model Sizing)   This is where “create sizing” happens. Fine-tuned GPT models support the same deployment types as base models, but with custom weights:   #### Deployment Types and When to Use Them - **Standard / Global Standard** — Pay-per-token + hourly hosting fee. Good for variable traffic. Global offers cost savings (weights may temporarily leave your geography). - **Developer Tier** — No hourly fee, ideal for testing/evaluation (no SLA). - **Provisioned Throughput (PTU)** — Recommended for production. You purchase fixed **Provisioned Throughput Units (PTUs)** for guaranteed capacity, stable latency, and predictable hourly billing. PTUs are shared regionally with base models.   **Key Sizing Metrics to Calculate** - Expected **Requests per Minute (RPM)** - Average **input tokens** and **output tokens** per request - Peak vs. average load - Latency requirements (generations consume more PTU capacity than prompts)   PTU-to-throughput conversion varies by model version. For GPT-4o and later models, input and output tokens are weighted differently. Use Microsoft’s guidance or the Azure OpenAI capacity calculator (available in the portal or via docs) to convert your call shape into required PTUs.   **Practical Sizing Workflow** 1. **Collect historical or estimated workload data** (from pilot tests with the base GPT model or similar applications). 2. **Run benchmarks** in the Foundry playground or via the official benchmarking tool to measure real tokens-per-minute (TPM) under load. 3. **Calculate PTUs**:    - Example formula (approximate):        PTUs needed ≈ (RPM × (input tokens × input weight + output tokens × output weight)) / TPM per PTU        (Exact TPM-per-PTU values are model-specific and listed in the PTU documentation.) 4. **Choose minimum PTU commitment** (e.g., 15 PTU for Global/Data-zone, 50 PTU for Regional in many cases). 5. **Factor in quota** — PTU quota is granted per subscription/region. Check availability in the Azure portal before deployment. 6. **Add headroom** (20–50%) for peaks and future growth.   For non-PTU deployments, size by setting `sku.capacity` (higher values increase throughput but raise costs). Maximum fine-tuned model deployments per resource is typically 10.   **Example Sizing for a Customer Support Agent Use Case**   - Workload: 200 RPM, avg. 800 input tokens + 300 output tokens per request.   - Model: Fine-tuned GPT-4.1-mini.   - Result: ~X PTUs (use calculator for exact). Deploy as Provisioned Throughput in a supported region (e.g., North Central US).   - Estimated cost: Fixed hourly PTU rate + any reserved capacity discounts.   ### Step 4: Deploy and Validate the Sized Custom Model   1. In the Foundry portal, go to your fine-tuned model → **Deploy**. 2. Select deployment type, name (e.g., `my-gpt-custom-support-v1`), and PTU size (or capacity). 3. For production, enable auto-deployment during fine-tuning if available. 4. Test with real traffic using the Chat Playground or your application code (reference the deployment name in API calls). 5. Monitor via Azure Monitor: token usage, latency, PTU utilization, and errors.   Inactive deployments (>15 days without calls) are auto-deleted to control costs, but the underlying model remains available for redeployment.   Step 5: Ongoing Optimization and Scaling - Scale up/down: Update PTU allocation or sku.capacity manually (no auto-scaling yet). - Cost controls: Use Azure Reservations for PTU discounts; leverage prompt caching; prefer smaller models (e.g., GPT-4.1-mini) after fine-tuning. - Multi-region: Deploy across regions for global apps (cross-region supported with proper permissions). - Quotas & Limits: Track max training jobs, files, and PTU quota in the portal to avoid blocking. - Iterate: Use continuous fine-tuning (train on a previous fine-tuned model) and A/B test checkpoints. Best Practices for GPT Catalog + Refinement Projects - Start small: Fine-tune and deploy in Developer tier first, measure real metrics, then size PTU for production. - Data quality > quantity: Poor data can degrade performance—validate with evaluation jobs. - Combine techniques: Use RAG + fine-tuning for hybrid gains. - Governance: Apply content filters, monitor for drift, and maintain model versions. - Security: Fine-tuned models support the same enterprise controls (private networking, encryption) as base GPT models. Conclusion Creating a solid sizing plan in Microsoft Foundry turns a generic GPT model into a high-performing, cost-effective custom solution tailored to your exact use case. By focusing on workload profiling, PTU calculations, and the right deployment type, you avoid over-provisioning while guaranteeing reliable performance. Whether you’re building an internal agent or a customer-facing product, Foundry’s fine-tuning + sizing workflow gives you full control without managing infrastructure. Start today in the Azure AI Foundry portal (ai.azure.com), explore the Model Catalog, and iterate from base GPT to production-ready custom model. For the latest PTU calculators, pricing, and region availability, refer to the official Microsoft Foundry documentation. Happy refining!

Copilot Studio vs Foundry, which one you choose

Microsoft offers two complementary platforms that, when used together strategically, deliver the best of both worlds: Microsoft Copilot Studio for rapid, low-code agent development and Microsoft Foundry (formerly Azure AI Foundry) for enterprise-grade, code-first orchestration and scalability. This hybrid approach isn’t just “nice to have”—it’s the most cost-efficient way to build production-ready AI agents on Azure. Microsoft’s own guidance (via the Well-Architected Framework and dedicated learning paths on cost-efficient AI agents) emphasizes three pillars: Right-size everything — models, orchestration, and data access Orchestrate intelligently — route work to the cheapest capable component Observe relentlessly — use FinOps practices and built-in tracing Copilot Studio and Foundry together make these pillars actionable. Copilot Studio: Fast, Predictable, and Cheap for the Right Workloads Copilot Studio (built on the Power Platform) is the low-code/no-code front-end for agents that live inside Microsoft 365, Teams, websites, or custom channels. Strengths for cost control: Message-based or capacity licensing → predictable monthly spend Classic topics (rule-based) cost almost nothing compared to generative orchestration Built-in integration with Dataverse, SharePoint, and Power Automate—no extra data movement fees Perfect for <500-document knowledge bases and straightforward workflows When to choose it: Internal HR bots, FAQ agents, simple customer-support triage, or any agent that lives inside the Microsoft 365 ecosystem. Microsoft Foundry: Full Control and True Scale (When You Need It) Foundry is the developer platform (web studio + SDK + PromptFlow + evaluation tools) that gives you complete ownership of models, prompts, tools, memory, and orchestration graphs. Strengths for cost control: Access to 1,900+ models in the Azure model catalog (including small, efficient ones like Phi-3, gpt-4o-mini, and your own fine-tunes) Consumption-based pricing → you only pay for what you actually use Advanced orchestration patterns (hierarchical agents, custom routing, caching, parallel tool calls) Native integration with Azure AI Search, Cosmos DB, and Key Vault for optimized grounding and memory When to choose it: Complex reasoning, multi-agent systems, high-volume document processing, custom ML integration, or agents that need sub-second latency and strict governance. The Winning Architecture: Studio + Foundry = Cost-Optimized Hybrid The real magic happens when you stop treating them as alternatives and start using them as layers: Copilot Studio = polished conversational front-end (Teams, web, mobile) Foundry = intelligent backend engine (model routing, tool calling, complex orchestration) Implementation pattern (widely recommended): User interacts with a Copilot Studio agent. Studio calls a Foundry-hosted agent or custom .NET/Python orchestrator via HTTP trigger / connected agent. Orchestrator decides simple query → cheap model; complex reasoning or tool use → larger model + RAG. Results flow back to Studio for a consistent user experience. This pattern (documented in multiple Microsoft Tech Community posts and Medium case studies) routinely cuts token costs by 40–70% while maintaining or improving quality. 7 Best Practices for Cost-Efficient AI Agents Implement Intelligent Model RoutingNever default to GPT-4o (or equivalent). Build a lightweight classifier (rule-based or tiny model) that inspects intent, token count, and keywords. Example routing logic: <20 tokens + summarization → gpt-4o-mini Analytical reasoning → gpt-4o / o3-mini Business tool call first → structured data → cheap summarizer One real-world implementation using a .NET orchestrator between Studio and Foundry reported 65% lower monthly spend. Use Tiered Orchestration Classic topics in Studio for predictable FAQs (near-zero cost) Generative orchestration only when truly needed Foundry for multi-agent coordination, memory management, and tool composition Ground Efficiently with Azure AI Search + Semantic Cache Avoid re-embedding the same documents repeatedly. Use vector indexing + semantic caching in Foundry to slash retrieval costs. Monitor and Govern with FinOps in Mind Tag every resource (model, search, storage) by department/use-case Leverage Azure Cost Management + built-in Foundry tracing Set budgets and alerts on token spend Microsoft Learn modules on “Maximize the Cost Efficiency of AI Agents” provide ready reference architectures Leverage Prepaid Capacity Where Predictable Copilot Studio offers Copilot Credit Commit Units (up to 20% savings). Use them for Studio workloads; keep Foundry consumption-based for variable loads. Design for Observability from Day One Foundry’s evaluation dashboards and Prompt Flow let you A/B test prompts and models without production impact. Track cost-per-conversation and ROI metrics. Start Small, Scale Smart Prototype in Copilot Studio (fast ROI, low cost). When volume or complexity grows, migrate heavy lifting to Foundry without rewriting the user experience.

Comparing Azure Foundry with The Competitor

Microsoft Foundry (formerly Azure AI Foundry / Azure AI Studio) is Microsoft's unified AI app and agent factory on Azure. It consolidates models, agents, tools, and enterprise governance into one platform (portal at ai.azure.com + unified SDKs). It covers the full AI lifecycle—from experimentation and fine-tuning to production deployment, monitoring, and scaling—without managing infrastructure. On this article, we will discuss the comparing cost between Microsoft Foundry with others that has similar capabilities. The platform itself is free (no subscription fee for the portal or management). You only pay for what you consume via underlying services (pay-as-you-go, no upfront commitment required). Costs are billed through your Azure subscription. The Main Cost Drivers are: Inference (Foundry Models / Azure OpenAI): Per-token pricing (input + output). PTU (Provisioned Throughput Units): Hourly fee for guaranteed capacity + big discounts via reservations (up to 30–70% savings at scale). Foundry Tools & Agent Service: Per-API-call or usage-based. Other: Storage (Azure AI Search), fine-tuning hours/tokens, batch processing (50% discount), embeddings, image generation. Example Pricing (Azure OpenAI models in Foundry – per 1M tokens, Global Standard, USD as of 2026): GPT-4o: Input $2.50 | Output $10.00 (Batch: 50% off) GPT-4o mini: Input $0.15 | Output $0.60 GPT-3.5 Turbo (legacy): Input $0.55 | Output $1.65 Fine-tuning: $1.50–$100 per 1M tokens (model-dependent) + hosting ~$1.70/hour PTU example (GPT-4o): ~$1/hour (min 15 PTUs) or monthly/yearly reservations for savings Optimizations: Microsoft Agent Pre-Purchase Plan (commit ACUs for 5–15% extra discount), batch jobs, prompt caching, right-size models, and Azure reservations. Use the Azure Pricing Calculator for exact estimates. Cost Comparison with Competitors (AWS Bedrock vs Google Vertex AI) All three platforms use primarily pay-per-token pricing (usage-based). Differences come from model choice, provisioned capacity options, ecosystem integration, and hidden costs (storage, egress, dev/ops time). Approximate Frontier Model Comparison (per 1M tokens, on-demand, USD – 2026 rates): Model Example Azure Foundry (GPT-4o / similar) AWS Bedrock (Claude 3.5 Sonnet / equivalents) Google Vertex AI (Gemini 2.5 Pro / equivalents) Input Tokens $2.50 $6.00 (Claude) $1.25–$2.00 Output Tokens $10.00 $30.00 (Claude) $10.00–$12.00 Batch / Discount Mode 50% off 50% off (Batch) Flex/Batch: up to 50%+ off Provisioned Option PTU (hourly + reservations) Provisioned Throughput (contact for price) Priority/committed use discounts Fine-Tuning $5–$25 per 1M tokens Model-specific (~$1–$2 per 1M) Included in compute hours       TCO & Real-World Insights (for 10–50M tokens/month typical enterprise use): Azure Foundry: Often cheapest at scale for predictable workloads (PTU + reservations save 30–70%). Best if you’re already in Microsoft ecosystem (lower integration/dev cost, exclusive OpenAI models, seamless M365/Teams agents). Strong governance reduces compliance overhead. AWS Bedrock: Frequently 15–25% lower raw cost for variable/spiky workloads and broad model choice (Claude is popular). Excellent for multi-provider flexibility; pure pay-per-use with zero infra overhead. Hidden costs lower if you avoid egress. Google Vertex AI: Very competitive (especially Gemini lightweight models and batch). Strong for heavy custom training/MLOps. Best in Google Cloud ecosystem; character-based pricing can feel cheaper for some use cases. idle endpoints have cost  Other Factors: Azure wins for agentic apps, OpenAI exclusivity, and enterprise governance. AWS wins for model variety and variable-cost efficiency. Google wins for multimodal + cost on lighter models. Total Cost of Ownership also includes storage (~$0.02/GB/month across all), data egress (similar), and developer productivity (Azure often lower for Microsoft shops). Prices fluctuate by region, volume discounts, and enterprise agreements—always use official calculators (Azure, AWS, Google) and test with your workload. Contact sales for custom quotes or the Agent Pre-Purchase Plan on Azure.

AI Threat in Software Engineering

AI in software engineering can boost productivity but also introduces serious risks—security flaws, data leakage, biased or hallucinated code, and regulatory exposure—so companies in Yogyakarta and beyond must adopt formal, continuous AI risk assessment frameworks before wide deployment. This article will discuss AI in software engineering challenge  Overview of the threat landscape Unpredictable outputs and hallucinations: Generative tools can produce plausible-looking code that contains logic errors or security vulnerabilities. Data leakage and IP exposure: Using third‑party AI assistants can inadvertently expose proprietary code or sensitive data to external models. Regulatory and compliance risk: Emerging laws and standards (e.g., EU AI Act, OECD guidelines) require documented risk management and governance for AI systems. Quick decision guide for engineering leaders Key considerations: scope of AI use, data sensitivity, model provenance, monitoring capability, vendor risk. Clarifying questions to answer now: Which teams use AI tools? What data do they feed into models? Are models open‑source, vendor‑hosted, or in‑house? What audit trails exist? Decision points: Approve low‑risk uses (e.g., code formatting) quickly; require risk assessment for any AI touching production, PII, or IP. Implementation roadmap (practical steps) Inventory all AI tools and use cases across engineering teams; classify by risk level (development-only, production-affecting, PII/regulated). Perform AI risk assessments for medium/high-risk systems: evaluate data lineage, model training data, explainability, and failure modes. Enforce engineering controls: code review gates, SAST/DAST on AI outputs, access controls, and data minimization. Governance and documentation: maintain audit trails, vendor due diligence, and compliance evidence aligned with international standards. Continuous monitoring: instrument models and pipelines for drift, performance, and security alerts.

AI Trend in Music

If you see the latest trend in AI, you will understand why AI and music is something potential. The year 2026 has seen AI in music transition from a "novelty act" to the standard backbone of professional production. We are no longer just talking about "robot songs"; we are looking at hybrid workflows where human emotional intelligence guides machine-driven precision. Whether you are building a tool for procedural game soundtracks or an AI-powered DAW (Digital Audio Workstation) plugin, C# and the .NET ecosystem offer a surprisingly robust framework for high-performance audio intelligence.  In fact, AI already has outstanding performance in creating midi or music instrument. here are some cool research features:  Adaptive Soundtracks: Game engines (using C# and Unity) now generate non-linear music that reacts in real-time to player heart rates or combat intensity. Stem Separation: AI models can now isolate vocals, drums, and bass from a single file with near-zero artifacts. Ethical "DNA" Licensing: Tools like Soundverse DNA allow artists to license their sonic identity for AI use, ensuring they get royalties for AI-generated tracks inspired by their style.   While Python is the laboratory of AI, C# is the factory. For a production-ready music solution, C# provides the performance, type safety, and cross-platform deployment (via .NET 10) that commercial software requires. So you need both to create AI solution in music.    1. The Tech Stack To build an AI music tool in C#, you generally use a combination of these three pillars: ML.NET: For custom training and local inference. Semantic Kernel: To orchestrate Large Language Models (LLMs) that can generate musical structures or MIDI code. ONNX Runtime: The "bridge" that allows you to run state-of-the-art Python models (like Meta's AudioCraft or Google's MusicLM) directly inside a C# application. NAudio / ManagedBass: For the heavy lifting of audio playback, waveform visualization, and real-time DSP. 2. The Architectural Workflow A typical solution follows this pipeline: Input: Text prompt or a "seed" MIDI file. Inference: A Transformer-based model (running via ONNX) predicts the next sequence of notes or generates a raw audio latent space. Synthesis: Converting that data into sound using a Virtual Instrument (VST) or a Wavetable synthesizer. Post-Processing: Applying AI mastering (EQ/Compression) via C# signal processing libraries. 3. Challenges Performance and latency, AI can create perfect music but if you want to create near-real-time music Black box problem, it can create great music, but it need humanize algorithms

AI please make us dumb in codes

  Overview Visual Studio 2026 embeds agentic AI across the IDE, helping you understand unfamiliar codebases, adapt pasted snippets to project conventions, and surface performance and security insights before pull requests. These agents include language-specific assistants and a Profiler Agent that can identify and help fix performance hotspots Setup and workflow tips Enable local agents where possible to keep latency low and preserve context; let the IDE index your solution so suggestions match your code patterns.   Create a reproducible dev container with consistent SDKs and extensions so agent outputs remain stable across machines.   Use the agent’s “Did You Mean” or intent detection to refine searches and code navigation when the IDE misinterprets your query. Why this matters: agents perform best when they have accurate, consistent project metadata and build traces to reference. Writing and refactoring with agents - Ask agents for idiomatic conversions (e.g., convert loops to LINQ or async patterns) and then review the diff rather than accepting blindly.   - Use paste-and-fix: paste snippets and let the agent adapt names, imports, and formatting to your project conventions; confirm tests and run the build after changes.   - Generate unit tests and edge-case scenarios from the agent’s suggestions, then run coverage tools to validate test quality. Debugging and profiling - Run the Profiler Agent early on slow scenarios; it can point to hot paths and suggest targeted fixes with benchmark-backed guidance.   - Capture traces and feed them to the agent so recommendations are grounded in real runtime data rather than heuristics.   - Use agent-suggested fixes as a starting point: implement, benchmark, and add microbenchmarks to prevent regressions. Team practices and security - Treat agent outputs as first drafts: enforce code review and static analysis gates to catch logic, licensing, or security issues the agent might miss.   - Document agent-assisted changes in PR descriptions so reviewers know what was automated and why.   - Audit third-party suggestions for licensing and supply-chain risk; agents can suggest dependencies but you must validate them. Quick cheatsheet - Daily: run solution index + agent sync; accept small fixes with tests.   - Before PR: run agent code review, static analysis, and Profiler Agent for performance regressions.   - When onboarding: ask the agent to summarize architecture, key modules, and common patterns to flatten the learning curve. Bottom line: agentic AI in Visual Studio 2026 accelerates routine work and surfaces deep insights, but you keep final judgment—use agents to draft, test, and measure, not to replace review and validation.

Model Context Protocol MCP in .NET and C# with Visual Studio

  Introduction Model Context Protocol (MCP) is an open protocol that standardizes how applications expose tools and context to large language models and other AI clients. In the .NET ecosystem you can implement MCP servers and clients using an official C# SDK, enabling your applications to surface commands, data connectors, and interactive tools to LLM-driven agents and IDE integrations. Why MCP matters for .NET developers Unifies how external tools and data sources are discovered and invoked by LLM agents. Lets you expose small reusable “tools” (functions, connectors, workflows) from a .NET service that AI clients can enumerate and call. Integrates with common .NET hosting, dependency injection, and ASP.NET Core patterns, making adoption straightforward for existing projects. Prerequisites .NET SDK (recommended latest preview/stable that supports the MCP packages). Microsoft documentation and templates may require .NET 10 preview in some quickstarts. Visual Studio 2022/2025 or Visual Studio Code with C# tooling; Visual Studio gives tight integration for building, debugging and packaging NuGet artifacts. NuGet account if you plan to publish packages or tools. The ModelContextProtocol NuGet packages (preview channel) from the official C# SDK. Key packages and resources ModelContextProtocol (main hosting & DI extensions) — good for most server implementations. ModelContextProtocol.AspNetCore — for HTTP-hosted MCP servers. ModelContextProtocol.Core — minimal client or low-level server needs. Official docs and quickstarts from Microsoft and the C# SDK GitHub repo provide sample templates and a dotnet new template to scaffold MCP servers. Quick workflow (create a simple MCP server using Visual Studio) Create the project In Visual Studio, choose “Create a new project” → Console App (.NET) or ASP.NET Core Web API (if you want HTTP transport). Name it e.g., McpSampleServer. Add MCP NuGet package(s) In Solution Explorer right-click Dependencies → Manage NuGet Packages → Browse → install ModelContextProtocol (use prerelease if needed) and ModelContextProtocol.AspNetCore for HTTP hosting. Configure hosting and services Use generic host builder and add MCP server services via extension methods provided by the SDK (AddMcpServer, WithStdioServerTransport or WithHttpServerTransport). Implement tools Create static or instance methods annotated or configured as MCP tools (the SDK supports automatic tool discovery patterns or explicit registration). Tools should be designed to accept and return serializable payloads (simple types, DTOs) to make invocation and result passing straightforward. Run and test Launch the app from Visual Studio. For stdio transport you can connect with editor integrations (e.g., GitHub Copilot in agent mode) or test client code that creates an McpClient to connect locally; for HTTP transport, call the server endpoints with a compliant MCP client or the SDK’s client helper APIs. Minimal example (Program.cs for a console MCP server) using Microsoft.Extensions.Hosting; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using ModelContextProtocol.Server; var builder = Host.CreateApplicationBuilder(args); builder.Logging.AddConsole(); builder.Services .AddMcpServer() .WithStdioServerTransport() // or .WithHttpServerTransport() for HTTP .WithToolsFromAssembly(); await builder.Build().RunAsync(); This pattern wires the MCP server into the generic host pipeline, enables a stdio transport, and auto-registers tools found in the assembly. Example tool implementation using ModelContextProtocol.Server; public static class DemoTools { [McpServerTool(Description = "Return input uppercased")] public static string Uppercase(string text) => text?.ToUpperInvariant() jQuery152009994888188936357_1762593257266 string.Empty; [McpServerTool(Description = "Get a random number in range")] public static int GetRandomNumber(int min, int max) => Random.Shared.Next(min, max + 1); } Registering tools via attributes or SDK registration APIs makes them discoverable by MCP clients and IDE agent integrations. Testing with clients and editor integrations Visual Studio and Visual Studio Code can be configured to run/consume MCP servers. Microsoft’s quickstart shows how to create an mcp.json workspace configuration so editor agents (like GitHub Copilot in agent mode) can call your server tools via stdio transport. You can also write a small McpClient in .NET to connect to your server programmatically using the SDK’s client APIs (McpClient.CreateAsync and client transport implementations). Packaging and publishing If you intend to share tools or server packages, set a unique PackageId in your .csproj and publish to NuGet. Microsoft’s quickstart demonstrates publishing a sample MCP server package to NuGet for reuse by others. Tips and best practices Design tools to be idempotent and safe; callers (LLM agents) may retry tool invocations. Keep inputs and outputs small and well-typed (JSON-serializable DTOs) to simplify schema validation and versioning. Use dependency injection for tool implementations so you can test logic independently and swap implementations (e.g., mock data connectors). Consider using HTTP transport (ModelContextProtocol.AspNetCore) for remote or production deployments, and stdio for local editor/tooling integrations and debugging.    

Let's chat with your Project Advisor PMI Infinity Chat

Today, as a member of the PMI, you can get a chatbot that have knowledge of project management. The chatbot name is PMI Infinity. With the chatbot, you can: ask any questions about project management, considering decision of your project providing you a template for your project with many ways prompt pattern to help you to tackle many project management issues.  In Infinity chat you can  start asking any questions get advice for better prompt  start coaching to prepare your skill even your certification  generate project document such as project charter or risk management plan lot of tutorial go ahead try it PMI Infinity

Whet is The Best AI Code editor

What is the best code editor? Yes, many people answer visual studio codes because VS Code is widely praised for its balance of power, speed, and flexibility. Here's why developers love it: 🧠 Intelligent Features: GitHub Copilot integration offers AI-powered code suggestions and completions. 🔌 Extensions Galore: Thousands of extensions for languages, frameworks, and tools. 🧭 Cross-platform: Works seamlessly on Windows, macOS, and Linux. 🛠 Built-in Tools: Terminal, debugger, Git integration, and more. 🌐 Community & Events: Microsoft hosts a global series of events to help developers master VS Code and Copilot. Want to learn how to master the codes editors to build autonomous AI or programming with AI. Just visit microsoft/VS-Code-Dev-Days: Repo for VS Code Dev Days content, global in-person series of events focused on VS Code and GitHub Copilot. You will get much knowledge about the VS codes as AI codes editor. 

How many copilot out there?

As of 2025, Microsoft has developed and released around a dozen Copilot-branded products, each tailored for different platforms, applications, and user needs,  Copilot for Windows aka Copilot. System assistant for settings, search, and productivity. You can find in your Windows as Copilot.  Copilot for Microsoft 365. Writing, summarizing, data analysis, meeting notes. You can find in your Microsoft Office like excel, PowerPoint, word, etc.  GitHub Copilot. Supporting coding in your Visual Studio and Visual Studio Code. Copilot in Edge. It is similar with Copilot for Windows, except works in Edge Copilot in Bing / Web. It is similar with Copilot for Windows except works in web. Sales copilot. Copilot for Microsoft ERP Dynamic. it helps Sales insights and CRM integration Security Copilot. Copilot for Defender and Microsoft Security tools. It helps threat detection and response Copilot in Power BI. Formerly as Cortana for Power BI. it helps QnA you data Copilot in Designer. Graphic design assistance Copilot in Loop. It helps to create content collaboration in Teams and meeting Copilot Studio. it helps build custom copilots and workflows So, Copilot is HUGE family model, which one you prefer!  

Topics Highlights

About @ridife

This blog will be dedicated to integrate a knowledge between academic and industry need in the Software Engineering, DevOps, Cloud Computing and Microsoft 365 platform. Enjoy this blog and let's get in touch in any social media.

Month List

Visitor