<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Niliya on Medium]]></title>
        <description><![CDATA[Stories by Niliya on Medium]]></description>
        <link>https://medium.com/@niliya1603?source=rss-7dbff24a8e04------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*dvwQuLbz-nI6T9GH</url>
            <title>Stories by Niliya on Medium</title>
            <link>https://medium.com/@niliya1603?source=rss-7dbff24a8e04------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 07:58:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@niliya1603/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building a GitHub Assistant with Model Context Protocol (MCP)]]></title>
            <link>https://medium.com/@niliya1603/building-a-github-assistant-with-model-context-protocol-mcp-554f3ca67c5a?source=rss-7dbff24a8e04------2</link>
            <guid isPermaLink="false">https://medium.com/p/554f3ca67c5a</guid>
            <dc:creator><![CDATA[Niliya]]></dc:creator>
            <pubDate>Wed, 08 Oct 2025 17:01:50 GMT</pubDate>
            <atom:updated>2025-10-08T17:01:50.526Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In the ever-evolving landscape of developer tools, automation and AI assistance are becoming increasingly crucial. I recently developed a GitHub Assistant using the Model Context Protocol (MCP) that helps developers interact with GitHub repositories more efficiently. This article will walk you through what this project does, how it’s implemented, and why it matters.</p><h3>What is the GitHub MCP Assistant?</h3><p>The GitHub MCP Assistant is a server-side application that provides programmatic access to GitHub’s API through a set of specialized tools. It’s built using Node.js and leverages the Model Context Protocol (MCP) to expose GitHub functionality in a structured, AI-friendly way.</p><h3>Key Features</h3><ol><li>Repository Management</li></ol><ul><li>List all public repositories for a given GitHub username</li><li>View repository details including descriptions and links</li></ul><p>2. Issue Tracking</p><ul><li>List issues from repositories</li><li>Create new issues with titles and descriptions</li></ul><p>3. Extensible Architecture</p><ul><li>Modular design for easy addition of new GitHub features</li><li>Standardized API responses for consistent client handling</li></ul><h3>How It Works</h3><h3>Technical Stack :</h3><ul><li>Runtime: Node.js with ES Modules</li><li>Core Dependencies:</li><li>@modelcontextprotocol/sdk: For MCP server implementation</li><li>node-fetch: For making HTTP requests to GitHub&#39;s API</li><li>dotenv: For environment variable management</li><li>zod: For input validation</li></ul><h3>Architecture :</h3><p>The project follows a clean, modular architecture:</p><ol><li>Server Layer (server.js)</li></ol><ul><li>Initializes the MCP server</li><li>Registers available tools</li><li>Manages client connections</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*--82vz2IH_ZCnT7BtwqKKg.png" /><figcaption>server.js</figcaption></figure><p>2. Tool Modules (in /tools/)</p><ul><li>Each tool is self-contained with its own schema and implementation</li><li>Current tools include:</li><li>listRepos.js: Lists repositories for a user</li><li>listIssues.js: Lists issues in a repository</li><li>createIssue.js: Creates new issues</li><li>hello.js: A simple test endpoint</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pvab4uEc9AtSCKBC6gGJxQ.png" /><figcaption>listRepos.js</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m6nZ0kqlAFDjtogLwbJWMg.png" /><figcaption>listIssues.js</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HJUQH_kiwWb9zJq3ULGfLw.png" /><figcaption>createIssue.js</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1009/1*BxlLHSi6Ix_zVceSgotkxg.png" /><figcaption>hello.js</figcaption></figure><p>3. GitHub Client (github.js)</p><ul><li>Handles authentication with GitHub’s API</li><li>Provides a reusable fetchFromGitHub helper</li><li>Manages API rate limiting and error handling</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*0ZXe5fe3mESzOMSPBQdvhw.png" /><figcaption>github.js</figcaption></figure><h3>Example: Listing Repositories</h3><p>Here’s how the repository listing works:</p><ol><li>The client sends a request to the listRepos tool with a username</li><li>The server validates the input using Zod</li><li>The tool makes an authenticated request to GitHub’s API</li></ol><p>4. Results are formatted and returned as structured data</p><pre>// Example tool implementation<br>export const listReposTool = {<br>  name: &quot;listRepos&quot;,<br>  description: &quot;List all public repositories for a given GitHub username.&quot;,<br>  inputSchema: { username: z.string().min(1) },<br>  async run({ username }) {<br>    // Implementation details...<br>  }<br>};</pre><h3>Why This Matters</h3><ol><li>Developer Productivity</li></ol><ul><li>Automates common GitHub tasks</li><li>Provides a consistent interface for GitHub operations</li><li>Reduces context switching between tools</li></ul><p>2. AI Integration</p><ul><li>MCP makes it easy to integrate with AI systems</li><li>Structured input/output enables reliable automation</li><li>Self-documenting through schemas</li></ul><p>3. Extensibility</p><ul><li>New GitHub features can be added as separate tools</li><li>The architecture supports both simple and complex operations</li><li>Easy to maintain and test individual components</li></ul><h3>Getting Started</h3><p>To use this project:</p><ol><li>Clone the repository</li><li>Install dependencies: npm install</li><li>Create a .env file with your GitHub token:</li></ol><pre>GITHUB_TOKEN=your_github_token_here</pre><p>4. Start the server: node server.js</p><h3>Future Enhancements</h3><ol><li><strong>Expand GitHub API Coverage</strong><br>Add support for additional endpoints — pull requests, commits, branches, discussions, and workflows — to make the assistant capable of handling the full GitHub lifecycle.</li><li><strong>Integrate Real-Time Webhooks</strong><br>Enable live event updates (e.g., new issues, PR merges, comments) using GitHub webhooks, allowing the AI client to react instantly.</li><li><strong>Implement Intelligent Caching</strong><br>Cache frequent MCP tool responses (e.g., issue lists or repository metadata) for faster responses and reduced API calls.</li><li><strong>Enhance Security &amp; Access Control</strong><br>Add OAuth-based authentication with GitHub scopes to safely support private repositories and organization-level operations.</li><li><strong>Introduce Rate Limiting &amp; Usage Insights</strong><br>Add smart rate limiting to prevent API throttling, along with analytics dashboards to track usage patterns and optimize performance.</li><li><strong>AI Intent Optimization</strong> <br>Fine-tune TinyLlama prompts or integrate a larger local model to improve accuracy in mapping user queries to MCP tools.</li></ol><h3>Conclusion</h3><p>The GitHub MCP Assistant demonstrates how we can build powerful, AI-friendly interfaces for developer tools. By leveraging the Model Context Protocol, we’ve created an extensible system that can grow with your needs. Whether you’re building a chatbot, a CLI tool, or an automated workflow, this project provides a solid foundation for GitHub integration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=554f3ca67c5a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>