MCPSERV.CLUB
Azure-Samples

Snippy

MCP Server

Intelligent code‑snippet service with MCP tools

Active(80)
70stars
1views
Updated 10 days ago

About

Snippy is an Azure Functions–based reference application that turns any function into an MCP tool consumable by GitHub Copilot Chat and other MCP‑aware clients. It stores code snippets with OpenAI embeddings in Cosmos DB, provides semantic retrieval, and uses AI agents to generate deep wikis or code‑style guides.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Snippy Architecture

Snippy is a serverless Model Context Protocol (MCP) playground that turns Azure Functions into rich, AI‑powered tools for code snippet management. By exposing its functions as MCP tools, the service lets GitHub Copilot Chat and other MCP‑aware assistants invoke operations such as saving code, performing semantic retrieval, or generating documentation—all without leaving the chat interface. This removes friction for developers who need quick access to reusable code, consistent style guides, or deep technical wikis while working on projects.

At its core, Snippy stores code snippets in Cosmos DB DiskANN, a vector‑search‑optimized store that keeps OpenAI embeddings alongside the raw code and metadata. When a user asks for “find me a snippet that solves X,” the MCP client triggers the tool, which performs a low‑latency semantic search over the embeddings and returns the most relevant snippet. The tool, on the other hand, accepts code and metadata, generates embeddings via Azure OpenAI, and persists everything in a single transaction. This tight integration of storage and AI makes snippet lookup feel instantaneous, even for large collections.

Beyond retrieval, Snippy offers two AI agents that turn stored snippets into richer artifacts. The deep_wiki agent scans the entire snippet repository, synthesizing a Markdown‑based knowledge base complete with Mermaid diagrams and contextual explanations. The code_style agent analyzes language‑specific patterns across snippets to produce a style guide that developers can embed in their projects. These agents are accessible as MCP tools, enabling assistants to generate documentation or style guidelines on demand.

Snippy’s architecture is deliberately modular. It leverages Durable Functions for fan‑out/fan‑in workflows, allowing large‑scale processing of snippets in an event‑driven manner. Experimental branches demonstrate how to scale this further with Microsoft Fabric and its Data Agents, illustrating a path toward enterprise‑grade AI orchestration. All of this runs on Azure Functions, so the service is event‑driven, cost‑effective, and easy to deploy with a single command that provisions Functions, Cosmos DB, Azure OpenAI, and Azure AI Agents.

For developers building AI‑enhanced workflows, Snippy offers a ready‑made MCP ecosystem that eliminates the need to write custom tooling. By exposing high‑level code‑management operations as tools, it lets assistants handle everything from snippet storage to documentation generation, freeing developers to focus on solving business problems rather than plumbing code reuse.