<?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 Guy Bary on Medium]]></title>
        <description><![CDATA[Stories by Guy Bary on Medium]]></description>
        <link>https://medium.com/@guybary?source=rss-dfcf2f8c12c3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OF4awKHlQzMSr5OFdBT33Q.png</url>
            <title>Stories by Guy Bary on Medium</title>
            <link>https://medium.com/@guybary?source=rss-dfcf2f8c12c3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 11:18:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@guybary/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[The Octocode Benchmark: Context Engineering for Leaner GitHub Research]]></title>
            <link>https://medium.com/@guybary/the-octocode-benchmark-context-engineering-for-leaner-github-research-8efc2296d4c1?source=rss-dfcf2f8c12c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/8efc2296d4c1</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[octocode]]></category>
            <dc:creator><![CDATA[Guy Bary]]></dc:creator>
            <pubDate>Sun, 09 Aug 2026 15:36:58 GMT</pubDate>
            <atom:updated>2026-08-09T15:36:58.603Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xDh-2Z0kL6XwEUJzG-djog.png" /></figure><blockquote><strong>TL;DR</strong></blockquote><blockquote>Coding agents need evidence beyond the open repo, but dumping everything into a model creates noise. Octocode follows an evidence-first loop: orient, search, read the exact slice, prove, and continue only when needed.</blockquote><blockquote>In a 30-question GitHub research benchmark, <strong>Octocode </strong>🐙 stayed in the same high correctness tier as plain gh, gh + Headroom, and gh + RTK while using about <strong>50–70% less tokens</strong></blockquote><ul><li>Octocode Github Repository <a href="https://github.com/bgauryy/octocode">https://github.com/bgauryy/octocode</a></li><li>Octocode Website — <a href="https://octocode.ai/">https://octocode.ai</a></li></ul><h3><strong>Why coding agents need GitHub research</strong></h3><p>The repo open in an editor is rarely the whole story. A bug may live in an upstream dependency. An undocumented behavior may have landed in an old commit. A strange guard may only be explained in a pull-request review. A local service may implement a contract owned in another repository.</p><p>Without those connections, an agent is forced to guess from whatever is in front of it. Good agents do not guess — they gather proof. Before changing code, they need to understand how the system works and build a clear picture of the relevant context.</p><p>That is true for open source and for internal work. Building on a framework like LangChain means checking current APIs and patterns in the source, not relying on stale training data. Inside an organization, dependencies and contracts often span many repositories, shared schemas, and years of review history. Agents need an efficient way to pull that cross-repo context without flooding the model.</p><p>Large context windows raise capacity, but capacity is not attention. Too much payload buries the answer. Too little, with no way to continue, forces a guess. <strong>Context is both storage and an attention budget.</strong></p><h3>Dump-first vs. evidence-first research</h3><p>Ask an agent: <em>“Which configuration field controls this behavior, and what is its value?”</em></p><p>A dump-first path searches broadly, fetches a whole file or tree, and hopes the model finds the answer inside the noise.</p><p>An <strong>evidence-first </strong>path does the opposite: map the question, search for candidates, read a narrow slice, prove the claim with anchors, and stop when the evidence is enough (or refine and loop if it is not).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AHat0v1adCZaxYyQOBOEOQ.png" /></figure><p>The loop is simple:</p><p><strong><em>SCOPE → ORIENT → SEARCH → READ EXACT → PROVE → DECIDE</em></strong></p><p>Empty or noisy results trigger refinement, not an absence claim. The goal is not “less context at any cost.” It is the:</p><blockquote><strong>cheapest useful evidence that still preserves correctness</strong></blockquote><h3>What Octocode gives the agent</h3><p>Octocode is a set of tools (exposed via CLI and MCP) for evidence-first research across GitHub, npm, and Local code.</p><p>The same loop maps onto concrete tools:</p><ol><li><strong>Scope</strong> — find the likely repo or package (ghSearchRepos, npmSearch)</li><li><strong>Orient</strong> — map the relevant tree (ghViewRepoStructure)</li><li><strong>Search</strong> — surface candidates in code, commits, or PRs</li><li><strong>Read exact</strong> — fetch a matching window, line range, or bounded directory</li><li><strong>Prove</strong> — confirm with local search and LSP semantics (definitions, references, callers)</li><li><strong>Decide</strong> — use pagination cursors and typed next hints to continue, or stop when proven</li></ol><p>Plain gh and wrappers like <strong>RTK</strong> or <strong>Headroom</strong> can still produce correct answers. They often reshape output <strong><em>after</em></strong> retrieval. Octocode tries to control context <em>earlier</em>,at search and region-read boundaries, while keeping a clear path to request more.</p><h3>The benchmark</h3><p>Feeling lean is not the same as working. We tested whether evidence routing could keep answer quality high while cutting the characters delivered to the model.</p><p>We executed 30 research <a href="https://github.com/bgauryy/octocode/tree/main/packages/octocode-benchmark/compare/github-questions">questions</a> suite on three pairwise matchups</p><ul><li>Octocode vsgh CLI</li><li>Octocode vsgh + RTK</li><li>Octocode vsgh + Headroom</li><li>** We used Octocode<em> </em>via<em> CLI </em><em>npx octocode@18.2.2</em></li></ul><p>Example for a research questions</p><ul><li>“In langchain-ai/langchainjs, the createAgent() function is exported from libs/langchain/src/agents/index.ts. Report how many public overloads it declares and the single runtime class its implementation constructs and returns. Then trace the flow from createAgent into that class and the underlying LangGraph state graph: name the state factory it invokes (in annotation.ts) and enumerate the graph the agent builds — its nodes (including the model-request and tools nodes) and the conditional edge targets used to route between them. Present the result as an explicit node→edge graph.”</li><li>“In redis/redis, identify the issue describing signed overflow in BITFIELD #&lt;offset&gt; parsing and the merged PR that fixes it. State the vulnerable operation and function, the approximate first overflowing i64 offset, the files changed by the PR, and its additions/deletions.”</li><li>…</li></ul><p>All questions can be found here:</p><p><a href="https://github.com/bgauryy/octocode/tree/main/packages/octocode-benchmark/compare/github-questions">octocode/packages/octocode-benchmark/compare/github-questions at main · bgauryy/octocode</a></p><p>We executed the pairs X3 times each (30 questions X tools X 3 times) on each iteration and we compared the output (answer and stats).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0I2xc2qrtATeSmOgNkpydg.png" /><figcaption>A separate 30×3 validation on published octocode@18.2.2 showed the same direction: 3<strong>.37× leaner than RTK</strong> and <strong>2.62× leaner than Headroom</strong>, with correctness parity.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2CyS_SY2gCiNOoHyjilNGw.png" /></figure><h3>How we kept the comparison fair</h3><ol><li><strong>Isolated runners</strong> — one agent with Octocode, one with the baseline, same question.</li><li><strong>Leanest-path rule</strong> — each arm used its leanest legitimate path; metadata or targeted search was enough when it answered the question.</li><li><strong>Blind judging</strong> — a neutral model scored answers labeled only “Agent X” and “Agent Y,” against ground truth.</li><li><strong>Character accounting</strong> — Unicode characters to and from the model. This is <strong>not</strong> tokens, latency, or dollar cost.</li><li><strong>Model:</strong> We executed all using the same model — Anthropic sonnet 4.6</li></ol><p>To run that comparison correctly between agents — fresh isolated runners per question and tool arm, plus a blind judge, I published the <a href="https://github.com/bgauryy/octocode/tree/main/packages/octocode-benchmark/skills/octocode-benchmark">octocode-benchmark</a> skill. It encodes the preflight, spawn packets, leanest-path rules, and character measurement so others can re-run or adapt the suite.</p><h3><strong>How Octocode controls context</strong></h3><p>CLI and MCP are thin fronts over one shared path: receive the goal, validate and secure the request, run against GitHub / npm / local code, then return a bounded result with continuation hints.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MwTGgapWpnaDts9RdEg-kQ.png" /></figure><p>Under the hood, remote providers fetch GitHub and npm evidence. A Rust/napi engine handles local search, minification, structural analysis, and LSP. Caching avoids repeat fetches; line-aware pages and security sanitization keep payloads lean and safe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1r286nT-0KD9HhxYpzffPQ.png" /></figure><h3><strong>Octocode context-engineering main approach</strong></h3><h4>1. Orient before reading</h4><p>When the location is unclear, map the tree before opening plausible files. Zoom out, then zoom in.</p><h4>2. Treat search hits as candidates</h4><p>A snippet can answer a narrow question, but it is not always proof. Use it to find the exact region — or the commit / PR — that can support the claim. Rank candidates against the question before the next tool call; do not treat the first hit as the answer.</p><h4>3. Match the read to the question</h4><p>Use a symbol outline when only structure matters, compact code for most investigation, and exact raw text for edits, quotes, or config values. Narrow regions also reduce <a href="https://arxiv.org/abs/2307.03172">“Lost in the Middle”</a> effects. Octocode resolves GitHub search hits to real line ranges so the model gets the relevant slice, not a floating fragment.</p><h4>4. Make continuation cheap and deterministic</h4><p>When more evidence is needed, pagination and typed next-step hints let the agent continue without reconstructing the query or re-sending earlier content. Independent probes can run together in one batch.</p><h4>5. Force reasoned, research-oriented tool use</h4><p>Do not let the model jump from a vague goal to a tool dump. Require an explicit step before each search or read: state the hypothesis, what evidence would confirm or refute it, and which tool/query is the cheapest probe. Keep the agent in a research loop — scope, candidate search, exact read, prove — so tool calls stay purposeful instead of exploratory thrashing.</p><h3><strong>What this benchmark does not prove</strong></h3><ul><li>This is a public 30-question GitHub research suite run by the Octocode project — transparent project evidence, not third-party certification.</li><li>It does not measure latency, monetary cost, private held-out tasks, or every agent workflow. Tiny single-hit gh lookups can still be leaner when Octocode’s structured response overhead dominates. Failed first probes still waste characters.</li><li><strong>RTK</strong> and <strong>Headroom</strong> can still excel Octocode when the flow is specific (we checked actual research flows).</li></ul><h3><strong>The takeaway</strong></h3><p>On this suite, Octocode stayed in the same high correctness tier while using roughly <strong>50–70% less context</strong> than the three baselines on research flows.</p><p>Bigger context windows expand what agents can attempt, and improved reasoning and attention. They do not remove the need to choose what evidence belongs in that window. Shorter is not automatically better.</p><blockquote><strong>Sharper evidence is better when it preserves correctness.</strong></blockquote><p>If you liked this post, feel free to explore and ⭐ to the <a href="https://github.com/bgauryy/octocode">Octocode Repo</a> 🐙</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8efc2296d4c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why RFC Works Better for Me Than Regular Plan Mode]]></title>
            <link>https://medium.com/@guybary/why-rfc-works-better-for-me-than-regular-plan-mode-aabec1b84a41?source=rss-dfcf2f8c12c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/aabec1b84a41</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[octocode]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[cursor]]></category>
            <category><![CDATA[develpmen]]></category>
            <dc:creator><![CDATA[Guy Bary]]></dc:creator>
            <pubDate>Wed, 11 Mar 2026 14:49:22 GMT</pubDate>
            <atom:updated>2026-03-11T14:49:22.518Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*-o07m9L3VefCtPoAQ7CNbA.png" /></figure><blockquote>Recently I realized something that changed how I use planning mode with AI agents.</blockquote><blockquote>Most agents are very good at generating plans. The problem is that a good-looking plan is not always what I actually need.</blockquote><blockquote>In many of the plan outputs I’ve seen, major gaps are still there, but the structure of the plan hides them. It looks organized, which creates confidence, but not necessarily understanding.</blockquote><blockquote>Sometimes I do want a plan, but in a lot of real engineering work, the plan is still hypothesis-driven. Neither I nor the agent fully knows what will change once implementation starts, which constraints will matter most, or which design choice will create second-order problems later.</blockquote><blockquote>In that kind of work, a strict plan can converge too early and miss the most important questions.</blockquote><h3>The Problem</h3><h3>Why plan mode can fail</h3><p>A simple example: BAI (Before AI), when we wrote a design doc, we usually compared several solutions, wrote a proposal, listed open questions, did more research, and only then turned that into implementation tasks.</p><p>Planning mode often skips that middle layer. It optimizes too quickly for action, while the real value is often in the reasoning before the plan.</p><p>That missing layer is exactly why RFC works better for me.</p><h3>Agents are biased toward action</h3><p>Most agents are biased toward action.</p><p>Give them a complex problem and they quickly produce steps, tasks, file targets, and implementation phases. That is useful when the direction is already clear.</p><p>But when the direction itself is still uncertain, plan mode can skip the hardest part of the work: thinking through the decision before committing to execution.</p><h3>The Missing Piece</h3><h3>Why RFC works better for me</h3><p>What I often needed was not a stricter plan.</p><p>I needed a way to keep research, uncertainty, trade-offs, and planning connected in the same flow.</p><p>That is where <strong>RFC</strong> works better for me.</p><p>An <strong>RFC</strong> is not just a plan. It is a structured way to think before execution. It forces the model to define the problem, explain the motivation, compare alternatives, surface drawbacks, document unknowns, justify the recommendation, and only then move into implementation.</p><h3>What RFC is used for</h3><p>RFCs are most useful when the direction is not obvious, the impact is broad, or there are multiple valid ways to solve the same problem.</p><p>That usually means architecture decisions, migrations, system-wide refactors, new patterns, or any flow where getting the direction wrong is expensive.</p><h3>RFC Structure</h3><h3>Basic sections</h3><p>The basic RFC structure is also part of why it works:</p><ul><li>Summary</li><li>Motivation and problem statement</li><li>Proposed design</li><li>Alternatives considered</li><li>Drawbacks and risks</li><li>Open questions</li><li>Recommendation</li><li>Implementation plan</li></ul><h3>Why It Works Better for Agents</h3><h3>It changes the sequence of thinking</h3><p>Instead of jumping straight to “what should I do next?”, it forces the agent to answer the harder questions first:</p><blockquote><em>What problem are we actually solving?</em></blockquote><blockquote><em>What are the valid alternatives?</em></blockquote><blockquote><em>What are the trade-offs?</em></blockquote><blockquote><em>What is still unknown?</em></blockquote><blockquote><em>Why is this recommendation better than the others?</em></blockquote><h3>It slows the agent down in the right place</h3><p>That structure matters a lot for agents, because agents naturally optimize for motion.</p><p>RFC slows the agent down in the right place.</p><p>It reduces premature convergence, makes uncertainty explicit, and creates a better bridge between reasoning and action.</p><h3>Why It Gets Better With Research Tools</h3><h3>Connecting research and planning</h3><p>This becomes even more useful with research tools like Octocode 🐙</p><p>Usually, research lives in one place, planning in another, and the reasoning in between gets lost.</p><p><strong>RFC</strong> helps close that gap!</p><p>It lets me gather findings, compare approaches, capture unknowns, and turn that into a recommendation and implementation plan in one place.</p><p>That is a big deal, because the real value is not only the final plan -&gt; It is preserving the thinking that produced the plan.</p><h3>Octocode RFC Skill</h3><p>This is why I created a dedicated skill for that, and why I keep using it a lot:</p><ul><li><a href="https://github.com/bgauryy/octocode-mcp/blob/main/skills/octocode-rfc-generator/SKILL.md">octocode-rfc-generator</a></li><li><a href="https://skills.sh/bgauryy/octocode-mcp/octocode-rfc-generator">skills.sh installation</a></li></ul><h3>Conclusion</h3><p>Plan mode is great — but when the work involves uncertainty, decision-making, and trade-offs, I would pick RFC first.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aabec1b84a41" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Octocode Research Skill]]></title>
            <link>https://medium.com/@guybary/octocode-research-skill-b8248214b515?source=rss-dfcf2f8c12c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8248214b515</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[skills]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[octocode]]></category>
            <dc:creator><![CDATA[Guy Bary]]></dc:creator>
            <pubDate>Tue, 27 Jan 2026 17:54:06 GMT</pubDate>
            <atom:updated>2026-01-27T17:54:06.534Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*ggzvL4iZYEDuIf-M1PdIUA.png" /></figure><blockquote>This article explains what is the Octocode skill, how to use it and how it is different from using Octocode MCP directly</blockquote><h3><strong>Why a Skill?</strong></h3><p>While MCP (Model Context Protocol) primarily exposes tools and prompts to AI, a <strong>Skill</strong> goes further. It creates an agentic workflow which orchestrates multiple agents towards a unified goal, with shared context and intelligent coordination.</p><p><a href="https://agentskills.io/what-are-skills">https://agentskills.io/what-are-skills</a></p><h3>What is Octocode Research Skill?</h3><p>The Octocode Research Skill leverages the ability to run smart prompts and orchestrate files to control a research flow intelligently. It automatically selects the right context for each task, loads the appropriate prompts, strategies, and constraints, and orchestrates research in a methodical, evidence-driven way.</p><blockquote>You tell it what you need, not how to find it</blockquote><h3>How It Works?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*xTPblCGybtU_GRunZggyQw.png" /></figure><h4>Init</h4><p>Local Server is being initialized automatically by the skill flow</p><h4>Loading Context &amp; Prompt (automatically)</h4><p>The skill automatically loads the context from the server to the agent and selects the optimal research strategy based on intent, as defined in the MCP prompt</p><p>Available Intents:</p><ul><li><strong>research: </strong>External libraries, GitHub repos, npm packages</li><li><strong>research_local: </strong>Local codebase exploration, understanding your code</li><li><strong>reviewPR: </strong>PR URLs, review requests, code review tasks</li><li><strong>roast: </strong>Poetic code roasting, brutally honest feedback</li></ul><h4><strong>Planning</strong></h4><p>One of the most powerful aspects of the Octocode Research Skill is its <strong>structured planning phase</strong>. The skill instructs the AI to stop, think, and present a plan for approval before diving into code.</p><p><strong>Why Planning Matters</strong></p><p>Octocode thinks before it acts. The skill’s prompt instructions define a <strong>planning gate</strong>: the AI is guided to create and share a plan before research begins.</p><p>This deliberate pause creates a methodical investigator. The agent maps out its approach, identifies key areas to explore, and shares its strategy with you for approval. You stay informed and in control from the start.</p><h4>Research</h4><p>Octocode orchestrates complete investigation lifecycles that progressively narrow from broad exploration to precise understanding.</p><p><strong>The key insight:</strong> Structure narrows → Patterns identify → Relationships explain.</p><p><strong>The Progressive Discovery Model</strong></p><p>Research follows a funnel that reduces the search space at each stage:</p><p>1. <strong>Discover Structure: </strong>Understand the layout of the codebase (directories, modules, entry points)</p><p>2. <strong>Search for Patterns: </strong>Find where relevant code lives using semantic search</p><p>3. <strong>Locate Definitions: </strong>Jump to exactly where symbols are defined</p><p>4. <strong>Analyze Relationships: </strong>Understand how code connects (who calls what, what uses which types)</p><p>5. <strong>Read Implementation: </strong>Only at the end, read the specific code you need</p><p>Each stage progressively narrows the search space. This progressive narrowing helps Octocode read only what matters and build deep understanding. The skill gives the ability to make steps in a structured way.</p><h3>Example</h3><p>This example shows how the skill flow is executing to research how react implemented “useState”.</p><p><a href="https://www.youtube.com/watch?v=-zuvb0GqkJM">https://www.youtube.com/watch?v=-zuvb0GqkJM</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jImb_FiojjVmVAX8KOOmPA.png" /></figure><h3><strong>Token Efficiency</strong></h3><p>What makes the Skill more efficient is are three key design decisions that make token usage mosre effective, while maximizing insight.</p><p><strong>Efficient Context Initialization</strong></p><p>Octocode provides a single <strong>/tools/initContext</strong> endpoint that loads the system prompt and initial schemas in one call.</p><p>For granular access, the AI can also fetch individual tool schemas via <br><strong>tools/info/:toolName </strong>before calling specific tools.</p><p>This flexibility allows optimizing for either fast startup or minimal context loading depending on the use case (some hosts support a similar protocol using MCP)</p><p><strong>Plan-Driven Research</strong></p><p>The structured planning phase isn’t just about transparency; it’s about efficiency:</p><ul><li>Eliminates redundant searches</li><li>Prevents aimless exploration</li><li>Ensures each tool call has a clear purpose</li><li>Avoids reading code that won’t contribute to the answer</li></ul><p>A good plan means fewer iterations and faster convergence to the answer.</p><p><strong>Research-Oriented Flow</strong></p><p>The entire system is purpose-built for research. No overhead from:</p><ul><li>Generic tool descriptions designed for multiple use cases</li><li>Broad system prompts that cover every scenario</li></ul><p>- Unnecessary context about features you’re not using</p><p>Every prompt, every tool hint, every workflow step is optimized for one thing: <strong>understanding code efficiently.</strong></p><h3><strong>Local Server Architecture (Lite-MCP)</strong></h3><p>The Octocode Research Skill runs a local HTTP server that implements a lightweight MCP-like protocol. This server handles all the heavy lifting, context loading, tool execution, and prompt management, while the AI orchestrates the research flow.</p><p><strong>Main Endpoints</strong></p><ul><li><strong>GET /health — </strong>Server status check</li><li><strong>GET /tools/initContext — </strong>Load tool schemas + system prompt</li><li><strong>GET /prompts/info/:name — </strong>Load research prompt by intent → Prompt content</li><li><strong>POST /tools/call/:toolName — </strong>Execute tool</li></ul><h4>Main Flow</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*elia6PX3kojfNUw0gxi4Fg.png" /></figure><h4>Context Loading Flow</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*F0UrXOwWEspc_I4P3fiiZQ.png" /></figure><h3>Setup &amp; Authentication</h3><p><strong>1. Authentication</strong></p><p>The skill uses <strong>octocode-mcp </strong>infrastructure for GitHub operations, so<strong> GitHub authentication is required.</strong></p><p>Run Official Octocode CLI — for authentication and Skill/MCP configuration</p><blockquote>npx octocode-cli</blockquote><p><a href="https://github.com/bgauryy/octocode-mcp/blob/main/packages/octocode-mcp/docs/AUTHENTICATION_SETUP.md">Full authentication guide</a></p><p><strong>2. Install the Skill</strong></p><p>Run this command:</p><ul><li>using <strong>add-skill</strong></li></ul><blockquote>npx add-skill <a href="https://github.com/bgauryy/octocode-mcp/tree/main/skills/octocode-research">https://github.com/bgauryy/octocode-mcp/tree/main/skills/octocode-research</a></blockquote><ul><li>using <strong><em>npx skills</em></strong></li></ul><blockquote>npx skills add <a href="https://github.com/bgauryy/octocode-mcp">https://github.com/bgauryy/octocode-mcp</a> — skill octocode-research</blockquote><h4>Links</h4><ul><li><a href="https://skills.sh/bgauryy/octocode-mcp/octocode-research">skills.sh</a> — skill link</li><li><a href="https://github.com/bgauryy/octocode-mcp/tree/main/skills/octocode-research">octocode-research skill</a> — code</li><li><a href="https://www.youtube.com/@Octocode-ai">https://www.youtube.com/@Octocode-ai</a> — Octocode Youtube Channel</li><li><a href="https://octocode.ai/">https://octocode.ai</a> — 🐙octocode official website</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8248214b515" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Octocode: The Code Research Engine]]></title>
            <link>https://medium.com/@guybary/octocode-the-code-research-engine-292856373416?source=rss-dfcf2f8c12c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/292856373416</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[octocode]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Guy Bary]]></dc:creator>
            <pubDate>Thu, 01 Jan 2026 13:38:43 GMT</pubDate>
            <atom:updated>2026-01-06T08:15:06.405Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*5zL0UQxYNid9QRRIFJVL7Q.png" /></figure><blockquote><strong>Octocode is MCP server I built for one simple reason: to make the AI do the heavy lifting of code research instead of me. In this post I’ll describe how it works in high level.</strong></blockquote><blockquote>Stop Searching. Start Investigating</blockquote><p>Octocode transforms AI coding agents from simple assistants into forensic researchers with much more context. In the era of massive monorepos and scattered microservices, standard retrieval isn’t enough. You need an engine that understands the “<em>why” </em>and “<em>how”</em> in fast changing code bases.</p><p><strong>The Problem:</strong> In large organizations, code is data, but it’s fragmented across thousands of repositories, hidden in many legacy flows and configurations, and locked in “tribal knowledge.”</p><p><strong>The Solution: </strong>Octocode treats your entire organization and even public GitHub repositories as a unified knowledge graph. It bridges the gap between disparate repositories, allowing agents to trace dependencies, logic flows, and architectural patterns across the enterprise in a single session. This solves the “fragmented knowledge” crisis, transforming a messy codebase (code/docs/configurations) into structured, queryable intelligence.</p><h3><strong>Solve Hard Problems In Organizations</strong></h3><p>Octocode empowers your agent to answer questions that previously required hours of manual digging. Here is some examples of questions Octocode can help with:</p><ul><li>“How do the internal frameworks work in my organization?”</li><li>“Describe the complete lifecycle of a complex transaction flow across services.”</li><li>“How does this legacy feature actually work under the hood?”</li><li>“Here is a stack trace. Detect the root cause by tracing these calls across repositories.”</li><li>“Find the solution to this bug by searching for similar issues or PRs in the platform repositories.”</li><li>“What is the standard way to implement a new UX flow in our design system?”</li><li>“Where is the database schema that stores these specific user events?”</li><li>“Find the best practices for error handling in this microservice.”</li><li>“How can I build an AI agent using our internal best practices?”</li><li>“How do I better integrate my service with the payments team’s API?”</li><li>…</li></ul><p>It can even help with public GitHub questions like:</p><ul><li>Create agents for me from best practices (e.g. langchain, langgraph)</li><li>Add local LLM to my project using best practices</li><li>Create project using best practices from React, Zustand andNextJS</li><li>…</li></ul><blockquote><strong>The Detective Engine &amp; Context Engineering</strong></blockquote><p>Octocode doesn’t just “grep” for strings; it investigates. It equips agents with structured, evidence-based tools to navigate complex systems, leveraging AI capabilities and context engineering to retrieve crucial context for almost any codebase-related question.</p><p>AI agents often fail because they lack direction. Octocode solves this by enforcing incremental research and context building. Every tool call mandates a researchGoal and reasoning, forcing the agent to maintain a coherent investigative thread. In return, each response provides meaningful data for the research flow, such as hints and context-related metadata.</p><p>Acting as a GPS for repositories, Octocode offers dynamic, context-aware suggestions that guide the agent through a logical sequence of discovery, validation, and implementation.</p><h3>Architecture &amp; Efficiency</h3><p>Octocode is designed for speed and cost-efficiency in LLM interactions:</p><p><strong>Bulk Operations:</strong> All tools support batching (1–5 queries per call) to reduce round-trips</p><p><strong>Caching: </strong>Smart caching mechanism to reduce API overhead</p><p><strong>Token Efficiency: </strong>Outputs are optimized for being most efficent and having context engineering in mind (to increase quality and reduce hellucinations)</p><h4>Enterprise-Grade Security</h4><p>Security isn’t an afterthought; it’s the foundation. Octocode is built with a defense-in-depth model designed for the enterprise (input &lt;-&gt; output)</p><p><strong>Automatic Redaction: </strong>automatice secrets and keys detection (API keys, tokens)in real-time.</p><p><strong>Strict Confinement: </strong>Path validation to prevent directory traversal outside allowed scopes.</p><p><strong>Safe Execution: </strong>Secure command builders to block injection attacks.</p><p><strong>Read-Only by Default:</strong> The MCP server is designed for research, minimizing accidental destruction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iVmE5x4KUjcGcaoctHutQg.png" /></figure><h3><strong>The Toolbox</strong></h3><p>Octocode provides a comprehensive set of tools divided into local workspace forensics and global GitHub intelligence.</p><h4><strong>Global Intelligence</strong></h4><ul><li><strong>SearchRepositories</strong>: Repository discovery</li><li><strong>SearchCode</strong>: Cross-repository code search</li><li><strong>ViewRepoStructure</strong>: Remote repository mapping</li><li><strong>GetFileContent</strong>: Fetch specific lines or full content from any public/private repo</li><li><strong>PackageSearch</strong>: Dependency intelligence (npm/python)</li><li><strong>SearchPullRequests</strong>: Search PRs, view diffs, and understand change context</li></ul><h4><strong>Local Investigation</strong></h4><p>Octocode has local tools for better context understanding for research</p><ul><li><strong>localSearchCode: </strong>Advanced code search</li><li><strong>localViewStructure: </strong>Directory visualization</li><li><strong>localFindFiles: </strong>Metadata-based file finder</li><li><strong>localGetFileContent: </strong>Precise content extraction</li></ul><p>** Note: local tools required “ENABLED_LOCAL”: “true”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/201/1*zuavjQRqUeL6qUgqB3g05g.png" /></figure><h3>The Commands</h3><p>Octocode isn’t just a bag of tools; it comes with built-in, battle-tested commands (MCP Prompts) designed to standardize complex workflows.</p><ul><li><strong>research: </strong>Deep code forensics powered by semantic search and import tracing. Validates every assumption against real code, delivering structured findings with diagrams and citations. No claim without evidence.</li><li><strong>plan: </strong>Evidence-based engineering workflow: research patterns in quality repos first, then plan and implement with approval gates and mandatory green builds. Coordinates parallel agents for multi-repo complexity.</li><li><strong>review_pull_request:</strong> Defects-first PR review across 7 domains (bugs, security, architecture, performance). Focuses on changed code, comments (form other agents/people), generates prioritized fixes, relays on context from local code and main/changed branches (using research tools) to provide context oriented review.</li><li><strong>generate: </strong>Researches proven scaffolding patterns before running CLI commands. Recommends optimal frameworks, validates builds and types. Clean codebases using custom features.</li></ul><h3>Installation</h3><p><a href="https://octocode.ai/#installation">Octocode - GitHub MCP Server | AI Code Intelligence Platform</a></p><ul><li><strong>Repo</strong>: <a href="https://github.com/bgauryy/octocode-mcp">https://github.com/bgauryy/octocode-mcp</a></li><li><strong>Youtube</strong> (tutorials): <a href="https://www.youtube.com/@Octocode-ai">https://www.youtube.com/@Octocode-ai</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=292856373416" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MCP Explained: Deep Dive and Comparison of Popular Code Search MCPs (Context7, GitHub Official MCP…]]></title>
            <link>https://medium.com/wix-engineering/mcp-explained-deep-dive-and-comparison-of-popular-code-search-mcps-context7-github-official-mcp-43f547f12501?source=rss-dfcf2f8c12c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/43f547f12501</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[amazon]]></category>
            <category><![CDATA[mcp-server]]></category>
            <dc:creator><![CDATA[Guy Bary]]></dc:creator>
            <pubDate>Mon, 21 Jul 2025 15:42:36 GMT</pubDate>
            <atom:updated>2025-07-22T09:59:46.897Z</atom:updated>
            <content:encoded><![CDATA[<h3>MCP Explained: Deep Dive and Comparison of Popular Code Search MCPs (Context7, GitHub Official MCP, AWS MCP Suite). Done By Octocode-mcp 🐙</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*HWgD685k4A1mYf53Lckqhg.png" /></figure><p>** This post content was created mostly using AI for the code research parts, and human worked hard to make it look good**</p><p><a href="https://gist.github.com/bgauryy/c12dfee9d2a0ddbc4f7988e7385177b8">Original Research</a></p><h4>About This Analysis</h4><blockquote>This research was conducted entirely using <a href="https://github.com/bgauryy/octocode-mcp"><strong>OctoCode MCP </strong>🐙</a> on July 21, 2025 (disclaimer: MCP tool that I created for code research), to gather all MCP platform details, codebase data, and technical specifications. OctoCode MCP analyzed multiple MCP servers (including itself) by retrieving real data from GitHub repositories (code &amp; docs). It also analyzed MCP protocol from official <a href="https://github.com/modelcontextprotocol">modelcontextprotocol Github</a> and explained how it works. The research was done by parts (not all in once..).</blockquote><p><strong>Document Structure:</strong></p><ol><li><strong>MCP Protocol Overview</strong> — Understanding the foundation technology</li><li><strong>Individual Platform Analysis</strong> — Deep-dive into each MCP server’s capabilities</li><li><strong>Comparative Analysis</strong> — Feature-by-feature comparison across platforms</li><li><strong>Decision Framework</strong> — Guidance on selecting the right MCP for your needs</li></ol><h3>Understanding the Model Context Protocol (MCP)</h3><p><em>References: </em><a href="https://github.com/modelcontextprotocol/modelcontextprotocol"><em>Model Context Protocol Specification</em></a><em>, </em><a href="https://github.com/modelcontextprotocol/typescript-sdk"><em>TypeScript SDK</em></a><em>, </em><a href="https://modelcontextprotocol.io/"><em>Official Documentation</em></a></p><p>The Model Context Protocol (MCP) is an open standard that revolutionizes how AI assistants connect to external data sources and tools. Created by Anthropic and now maintained as an open-source ecosystem, MCP solves the fundamental challenge of providing LLMs with live, contextual information while maintaining security and standardization.</p><h3>The Problem MCP Solves</h3><p><strong>Before MCP:</strong> The AI integration landscape was fragmented and inefficient:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XmjBiprBS9xc-aWsY5peWw.png" /></figure><p><strong>With MCP Solution:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u3hRvzY5n-d8Wp0Nr2Tjnw.png" /></figure><h3>Core MCP Components</h3><p>The Model Context Protocol defines four primary components that work together to provide seamless LLM-to-data integration. Think of MCP like a <strong>USB-C port for AI applications. </strong>providing a standardized interface for connecting AI models to different data sources and tools.</p><h4>Resources (Data Providers)</h4><p><em>“Think of these sort of like GET endpoints; they are used to load information into the LLM’s context”</em></p><p>Resources expose data to LLMs without performing significant computation or side effects. They provide a standardized way to access information from various sources.</p><p><strong>Key Characteristics:</strong></p><ul><li><strong>Read-only access</strong>: Similar to REST GET endpoints</li><li><strong>Static or dynamic</strong>: Can serve fixed content or generate content based on parameters</li><li><strong>URI-based addressing</strong>: Each resource has a unique URI for identification</li><li><strong>Content types</strong>: Support text, JSON, binary data with MIME type specification</li></ul><p><strong>Implementation Examples:</strong></p><pre>// Static resource - fixed content<br>server.registerResource(<br>  &quot;config&quot;,<br>  &quot;config://app&quot;,<br>  {<br>    title: &quot;Application Config&quot;,<br>    description: &quot;Application configuration data&quot;,<br>    mimeType: &quot;text/plain&quot;<br>  },<br>  async (uri) =&gt; ({<br>    contents: [{<br>      uri: uri.href,<br>      text: &quot;App configuration here&quot;<br>    }]<br>  })<br>);<br>// Dynamic resource with parameters<br>server.registerResource(<br>  &quot;user-profile&quot;,<br>  new ResourceTemplate(&quot;users://{userId}/profile&quot;, { list: undefined }),<br>  {<br>    title: &quot;User Profile&quot;,<br>    description: &quot;User profile information&quot;<br>  },<br>  async (uri, { userId }) =&gt; ({<br>    contents: [{<br>      uri: uri.href,<br>      text: `Profile data for user ${userId}`<br>    }]<br>  })<br>);</pre><h4>Tools (Action Providers)</h4><p><em>“Sort of like POST endpoints; they are used to execute code or otherwise produce a side effect”</em></p><p>Tools enable LLMs to perform actions and computations through your server. Unlike resources, tools are expected to have side effects and perform meaningful work.</p><p><strong>Key Characteristics:</strong></p><ul><li><strong>Action-oriented</strong>: Perform computations, API calls, file operations</li><li><strong>Input validation</strong>: Strongly-typed parameters with Zod schemas</li><li><strong>Asynchronous execution</strong>: Support for long-running operations</li><li><strong>Rich responses</strong>: Can return text, structured data, or resource links</li></ul><p><strong>Implementation Examples:</strong></p><pre>// Simple calculation tool<br>server.registerTool(<br>  &quot;calculate-bmi&quot;,<br>  {<br>    title: &quot;BMI Calculator&quot;,<br>    description: &quot;Calculate Body Mass Index&quot;,<br>    inputSchema: {<br>      weightKg: z.number(),<br>      heightM: z.number()<br>    }<br>  },<br>  async ({ weightKg, heightM }) =&gt; ({<br>    content: [{<br>      type: &quot;text&quot;,<br>      text: String(weightKg / (heightM * heightM))<br>    }]<br>  })<br>);<br>// Tool with external API integration<br>server.registerTool(<br>  &quot;fetch-weather&quot;,<br>  {<br>    title: &quot;Weather Fetcher&quot;,<br>    description: &quot;Get weather data for a city&quot;,<br>    inputSchema: { city: z.string() }<br>  },<br>  async ({ city }) =&gt; {<br>    const response = await fetch(`https://api.weather.com/${city}`);<br>    const data = await response.text();<br>    return {<br>      content: [{ type: &quot;text&quot;, text: data }]<br>    };<br>  }<br>);<br>// Tool returning ResourceLinks (references without content)<br>server.registerTool(<br>  &quot;list-files&quot;,<br>  {<br>    title: &quot;List Files&quot;,<br>    description: &quot;List project files&quot;,<br>    inputSchema: { pattern: z.string() }<br>  },<br>  async ({ pattern }) =&gt; ({<br>    content: [<br>      { type: &quot;text&quot;, text: `Found files matching &quot;${pattern}&quot;:` },<br>      {<br>        type: &quot;resource_link&quot;,<br>        uri: &quot;file:///project/README.md&quot;,<br>        name: &quot;README.md&quot;,<br>        mimeType: &quot;text/markdown&quot;,<br>        description: &#39;A README file&#39;<br>      }<br>    ]<br>  })<br>);</pre><h4>Prompts (Template Providers)</h4><p><em>“Reusable templates for LLM interactions”</em></p><p>Prompts are pre-defined templates that help structure interactions between LLMs and your server. They provide consistent, reusable patterns for common tasks.</p><p><strong>Key Characteristics:</strong></p><ul><li><strong>Template-based</strong>: Parameterized templates for consistent interactions</li><li><strong>Context-aware completion</strong>: Intelligent parameter suggestions based on context</li><li><strong>Structured messages</strong>: Define role-based conversation flows</li><li><strong>Reusability</strong>: Share common interaction patterns across different contexts</li></ul><p><strong>Implementation Examples:</strong></p><pre>// Simple code review prompt<br>server.registerPrompt(<br>  &quot;review-code&quot;,<br>  {<br>    title: &quot;Code Review&quot;,<br>    description: &quot;Review code for best practices and potential issues&quot;,<br>    argsSchema: { code: z.string() }<br>  },<br>  ({ code }) =&gt; ({<br>    messages: [{<br>      role: &quot;user&quot;,<br>      content: {<br>        type: &quot;text&quot;,<br>        text: `Please review this code:\n\n${code}`<br>      }<br>    }]<br>  })<br>);<br>// Context-aware prompt with intelligent completion<br>server.registerPrompt(<br>  &quot;team-greeting&quot;,<br>  {<br>    title: &quot;Team Greeting&quot;,<br>    description: &quot;Generate a greeting for team members&quot;,<br>    argsSchema: {<br>      department: completable(z.string(), (value) =&gt; {<br>        return [&quot;engineering&quot;, &quot;sales&quot;, &quot;marketing&quot;, &quot;support&quot;]<br>          .filter(d =&gt; d.startsWith(value));<br>      }),<br>      name: completable(z.string(), (value, context) =&gt; {<br>        const dept = context?.arguments?.[&quot;department&quot;];<br>        if (dept === &quot;engineering&quot;) {<br>          return [&quot;Alice&quot;, &quot;Bob&quot;, &quot;Charlie&quot;].filter(n =&gt; n.startsWith(value));<br>        }<br>        return [&quot;Default&quot;].filter(n =&gt; n.startsWith(value));<br>      })<br>    }<br>  },<br>  ({ department, name }) =&gt; ({<br>    messages: [{<br>      role: &quot;user&quot;,<br>      content: {<br>        type: &quot;text&quot;,<br>        text: `Generate a greeting for ${name} from the ${department} department`<br>      }<br>    }]<br>  })<br>);</pre><h4>Sampling (LLM Communication)</h4><p><em>“Enable server-to-LLM requests for AI-powered features”</em></p><p>Sampling allows MCP servers to request completions from LLMs, enabling servers to leverage AI capabilities within their tools and workflows.</p><p><strong>Key Characteristics:</strong></p><ul><li><strong>Server-initiated</strong>: Servers can request LLM completions during tool execution</li><li><strong>Bidirectional communication</strong>: Enables complex workflows with AI reasoning</li><li><strong>Token control</strong>: Configurable limits and parameters for completion requests</li><li><strong>Integration-ready</strong>: Seamlessly integrates with existing tool implementations</li></ul><p><strong>Implementation Examples:</strong></p><pre>// Tool that uses LLM sampling for text summarization<br>server.registerTool(<br>  &quot;summarize&quot;,<br>  {<br>    description: &quot;Summarize any text using an LLM&quot;,<br>    inputSchema: {<br>      text: z.string().describe(&quot;Text to summarize&quot;),<br>    },<br>  },<br>  async ({ text }) =&gt; {<br>    // Call the LLM through MCP sampling<br>    const response = await server.server.createMessage({<br>      messages: [<br>        {<br>          role: &quot;user&quot;,<br>          content: {<br>            type: &quot;text&quot;,<br>            text: `Please summarize the following text concisely:\n\n${text}`,<br>          },<br>        },<br>      ],<br>      maxTokens: 500,<br>    });<br>return {<br>      content: [<br>        {<br>          type: &quot;text&quot;,<br>          text: response.content.type === &quot;text&quot; <br>            ? response.content.text <br>            : &quot;Unable to generate summary&quot;,<br>        },<br>      ],<br>    };<br>  }<br>);</pre><h3><strong>Architecture Flow</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kSRskNW31RwOrg9NW0nRUw.png" /></figure><p>This architecture enables <strong>separation of concerns</strong> where:</p><ul><li><strong>MCP Clients</strong> focus on LLM interaction and user interfaces</li><li><strong>MCP Servers</strong> handle data access, tool execution, and domain-specific logic</li><li><strong>The MCP Protocol</strong> provides standardized communication between components</li><li><strong>Resources, Tools, Prompts, and Sampling</strong> work together to create rich, interactive AI experiences</li></ul><h3>Why MCP Matters</h3><ul><li><strong>Universal Compatibility</strong>: Any MCP-compatible AI can use any MCP server</li><li><strong>Separation of Concerns</strong>: AI reasoning separated from data access</li><li><strong>Enhanced Security</strong>: Standardized authentication and authorization</li><li><strong>Ecosystem Growth</strong>: Shared servers benefit all MCP applications</li></ul><h3>MCP Servers Analysis</h3><h3>Context7 — Documentation Accuracy Specialist</h3><p><strong>Repository:</strong> <a href="https://github.com/upstash/context7">upstash/context7</a><br><strong>Focus:</strong> Curated library documentation with version-specific accuracy</p><h4>Community Metrics (July 21, 2025)</h4><ul><li><strong>Active Development</strong> — Regular commits and community contributions</li><li><strong>International Community</strong> — Documentation in 15+ languages including Japanese, Korean, Turkish</li><li><strong>66 open issues</strong> — Active maintenance and security discussions</li><li><strong>29 closed issues</strong> — Responsive issue resolution</li><li><strong>Multilingual Contributions</strong> — Global developer community engagement</li></ul><h4>Core Strengths</h4><ul><li><strong>Zero Setup</strong>: True zero-configuration deployment via remote service</li><li><strong>Version-Specific Documentation</strong>: Curated database with current API references</li><li><strong>Multilingual Support</strong>: Documentation available in multiple languages</li><li><strong>Hallucination Prevention</strong>: Eliminates AI responses based on outdated documentation</li><li><strong>Community-Driven</strong>: Users can contribute libraries via context7.com</li><li><strong>Multi-Transport Support</strong>: stdio, http, and sse transport protocols</li></ul><h4>Architecture &amp; Tools</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0XQBDJCiGL-oxYtXSYdSrQ.png" /></figure><h4>Technical Implementation (from Codebase)</h4><p><strong>Package Details:</strong></p><ul><li><strong>Package Name</strong>: @upstash/context7-mcp (TypeScript implementation)</li><li><strong>Transport Options</strong>: [&quot;stdio&quot;, &quot;http&quot;, &quot;sse&quot;] with CLI configuration</li><li><strong>Default Minimum Tokens</strong>: 10,000 for optimal performance</li><li><strong>Port Configuration</strong>: Configurable HTTP/SSE port (default: 3000)</li></ul><p><strong>Core Tools:</strong></p><ul><li><strong>resolve-library-id</strong>: Advanced library search with trust scoring and snippet coverage</li><li><strong>get-library-docs</strong>: Version-specific documentation with topic filtering and encryption</li></ul><p><strong>Security Features:</strong></p><ul><li>Content encryption with dedicated encryption module</li><li>Client IP detection and tracking for security</li><li>Resource validation to prevent malicious uploads</li></ul><h4>Recent Development Activity (July 2025)</h4><ul><li><strong>Documentation Updates</strong>: README improvements and installation guides</li><li><strong>International Expansion</strong>: Added Trae instructions and multilingual support</li><li><strong>Security Enhancements</strong>: Stricter validation for resource uploads</li><li><strong>Community Features</strong>: Enhanced library contribution process</li></ul><h4>When to Choose Context7</h4><ul><li>You need accurate API documentation for popular libraries</li><li>You want zero-setup simplicity with remote service deployment</li><li>You’re working primarily with public libraries and frameworks</li><li>You need multilingual documentation support</li></ul><h3>GitHub Official MCP — Enterprise Workflow Automation</h3><p><strong>Repository:</strong> <a href="https://github.com/github/github-mcp-server">github/github-mcp-server</a><br><strong>Focus:</strong> Comprehensive GitHub integration with enterprise features</p><h4>Community Metrics (July 21, 2025)</h4><ul><li><strong>18,354 stars</strong> — Massive enterprise adoption</li><li><strong>1,485 forks</strong> — Strong contributor ecosystem</li><li><strong>174 open issues</strong> — Very active development</li><li><strong>Go 1.23.7 implementation</strong> — Production-grade performance</li><li><strong>10 commits in July 2025</strong> — Continuous active development</li></ul><h4>Core Strengths</h4><ul><li><strong>Comprehensive Integration</strong>: Complete GitHub API coverage across 14 specialized toolsets</li><li><strong>Enterprise Ready</strong>: OAuth, GitHub Apps, SAML enforcement, audit controls</li><li><strong>Production Architecture</strong>: Go-based implementation with github.com/mark3labs/mcp-go v0.32.0</li><li><strong>Dual Deployment</strong>: Remote hosted service or local Docker deployment</li><li><strong>Official Support</strong>: Maintained directly by GitHub with enterprise backing</li><li><strong>Advanced Testing</strong>: Comprehensive toolsnaps testing framework</li></ul><h4>Architecture &amp; Toolsets</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zkakeS53HQ8l1eUOLm0cNA.png" /></figure><h4>Technical Implementation</h4><p><strong>Core Architecture:</strong></p><ul><li><strong>Language</strong>: Go 1.23.7 with production-grade dependencies</li><li><strong>MCP Framework</strong>: github.com/mark3labs/mcp-go v0.32.0</li><li><strong>GitHub API</strong>: github.com/google/go-github/v73 v73.0.0</li><li><strong>GraphQL Support</strong>: github.com/shurcooL/githubv4 for advanced queries</li></ul><p><strong>Toolset Structure:</strong></p><pre>// Real implementation with 14 comprehensive toolsets<br>DefaultToolsetGroup includes:<br>- repos: Repository operations (SearchRepositories, GetFileContents, etc.)<br>- issues: Issue management (GetIssue, SearchIssues, ListIssues)<br>- pull_requests: PR workflows with advanced features<br>- actions: CI/CD automation and workflow management<br>- discussions: Community features (added July 2025)<br>- dependabot: Dependency management (alert tools added July 2025)</pre><p><strong>Resource Templates:</strong></p><ul><li>Repository content with branch/commit/tag/PR support</li><li>Advanced file content retrieval with raw client support</li><li>Comprehensive resource templating for dynamic content access</li></ul><h4>Recent Development Activity (July 2025)</h4><ul><li><strong>New Features</strong>: Discussion tools (#624), Dependabot alert tools (#631)</li><li><strong>Code Quality</strong>: Cleanup and optimization (#628)</li><li><strong>User Management</strong>: Enhanced user details and methods refactoring</li><li><strong>Documentation</strong>: Updated tool descriptions and contributing guidelines</li><li><strong>Security</strong>: Omitted sensitive admin fields from outputs</li></ul><h4>When to Choose GitHub Official MCP</h4><ul><li>You’re heavily invested in GitHub workflows and need comprehensive API access</li><li>You require enterprise-grade security and authentication</li><li>You need official GitHub support and maintenance</li><li>You can handle Docker deployment complexity</li></ul><h3>AWS MCP Suite — Comprehensive Cloud Intelligence</h3><p><strong>Repository:</strong> <a href="https://github.com/awslabs/mcp">awslabs/mcp</a><br><strong>Focus:</strong> Complete AWS ecosystem integration with AI-powered features</p><h4>Community Metrics (July 21, 2025)</h4><ul><li><strong>4,853 stars</strong> — Strong AWS ecosystem adoption</li><li><strong>616 forks</strong> — Enterprise contributor base</li><li><strong>165 open issues</strong> — Active AWS Labs maintenance</li><li><strong>66 specialized servers</strong> — Most comprehensive MCP suite available</li><li><strong>10 commits in July 2025</strong> — Rapid feature development and expansion</li></ul><h4>Core Strengths</h4><ul><li><strong>Comprehensive Coverage</strong>: 66 specialized servers for all major AWS services</li><li><strong>AI-Powered Features</strong>: Bedrock integration for semantic search and analysis</li><li><strong>Enterprise Scale</strong>: Production-grade tools with IAM integration and security scanning</li><li><strong>Infrastructure as Code</strong>: CDK, CloudFormation, Terraform support</li><li><strong>Real-Time Documentation</strong>: Always current AWS documentation and best practices</li><li><strong>Streamable HTTP Transport</strong>: Modern transport protocol (SSE support removed May 2025)</li></ul><h4>Architecture &amp; Server Categories</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_C-B_ZVqOD-8q_-W49qf3g.png" /></figure><h4>Technical Implementation (Verified from Codebase)</h4><p><strong>Transport Architecture:</strong></p><ul><li><strong>Current Protocol</strong>: Streamable HTTP (industry-leading implementation)</li><li><strong>Legacy Support</strong>: SSE support removed May 26, 2025 per MCP specification</li><li><strong>Compatibility</strong>: Backwards compatible with MCP client standards</li></ul><p><strong>Security &amp; Compliance:</strong></p><ul><li>Comprehensive security scanning (Bandit, Checkov, Semgrep, Trivy)</li><li>CodeQL analysis and dependency review</li><li>IAM policy templates and readonly access patterns</li><li>Enterprise-grade secret detection and license compliance</li></ul><h4>AWS Service Integration</h4><p><strong>Knowledge Base &amp; Retrieval:</strong></p><ul><li>Amazon Bedrock Knowledge Bases with natural language querying</li><li>Multi-data source filtering and reranking capabilities</li><li>Citation information and relevance sorting</li><li>Enterprise tag-based discovery (mcp-multirag-kb: true)</li></ul><h4>When to Choose AWS MCP Suite</h4><ul><li>You’re building applications primarily on AWS infrastructure</li><li>You want AI-powered semantic search and analysis capabilities</li><li>You need comprehensive AWS service integration across 66+ specialized servers</li><li>You can handle AWS service usage costs (see pricing links above)</li></ul><p><strong>Cost Considerations</strong> AWS MCP Suite requires AWS services that incur usage charges. For current pricing information:</p><ul><li><strong>Amazon Bedrock Pricing</strong>: <a href="https://aws.amazon.com/bedrock/pricing/">https://aws.amazon.com/bedrock/pricing/</a></li><li><strong>Cost Explorer API</strong>: <a href="https://aws.amazon.com/aws-cost-management/pricing/">https://aws.amazon.com/aws-cost-management/pricing/</a></li><li><strong>AWS Service Pricing</strong>: <a href="https://aws.amazon.com/pricing/">https://aws.amazon.com/pricing/</a></li></ul><p><strong>Recent Development Activity (July 2025):</strong></p><p><strong>New Services</strong>:</p><ul><li>CloudWatch AppSignals: Application monitoring with initial tool set</li><li>Glue Data Catalog: AWS Glue ETL and Commons handlers</li><li>CloudWatch: Comprehensive AWS CloudWatch monitoring</li></ul><p><strong>Enhanced Features</strong>:</p><ul><li>Bedrock KB: Enhanced ListKnowledgeBases functionality and tools</li><li>Glue ETL: Advanced handlers and IAM actions</li><li><strong>Infrastructure</strong>: Automated package updates, Pages build improvements</li><li><strong>Security</strong>: Comprehensive policy updates and access controls</li><li><strong>Documentation</strong>: Enhanced server documentation and README improvements</li></ul><h3>OctoCode MCP — Cross-Ecosystem Research Platform</h3><p><strong>Repository:</strong> <a href="https://github.com/bgauryy/octocode-mcp">bgauryy/octocode-mcp</a><br><strong>Focus:</strong> Advanced research capabilities, cross platforms and token efficient</p><h4>Community Metrics (July 21, 2025)</h4><ul><li><strong>Current Version</strong>: v2.3.27 (July 21, 2025) — Latest release</li><li><strong>npm Package</strong>: v2.3.26 published (20/07/2025) — 3 MB package size</li><li><strong>31 total versions</strong> — Rapid iteration and improvement cycle</li><li><strong>10 commits in July 2025</strong> — Very active development</li><li><strong>5 releases in July 2025</strong> — Frequent feature updates</li></ul><p><strong>Available Tools (Cross-Ecosystem):</strong></p><ul><li><strong>Repository Discovery</strong>: Bulk repository search with advanced filtering and fallbacks</li><li><strong>Code Analysis</strong>: Bulk cross-repository code pattern matching with minification</li><li><strong>File Content</strong>: Bulk file retrieval with partial access and optimization</li><li><strong>Project Intelligence</strong>: Issue analysis, commit history, PR workflows with data masking</li><li><strong>Package Research</strong>: npm and PyPI package discovery with version analytics</li><li><strong>Security Features</strong>: Content protection with enterprise-grade sanitization</li></ul><h4>Core Strengths</h4><ul><li><strong>Cross-Ecosystem Intelligence</strong>: GitHub, npm, and PyPI integration in one platform</li><li><strong>Advanced Bulk Operations</strong>: Up to 5 parallel queries for faster research workflows</li><li><strong>Content Protection</strong>: Automatic detection and masking of sensitive patterns</li><li><strong>Token Optimization</strong>: Intelligent content minification and partial file access</li><li><strong>Docker Support</strong>: Production-ready containerization with authentication</li><li><strong>Simple Authentication</strong>: GitHub CLI OAuth with automatic token management</li></ul><h4>Architecture with Bulk Operations</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KxrTjgZysmv5dBnmlBiviQ.png" /></figure><h4>Technical Implementation:</h4><p><strong>Core Dependencies</strong></p><ul><li><strong>MCP SDK</strong>: @modelcontextprotocol/sdk ^1.13.2</li><li><strong>Rate Limiting</strong>: async-mutex ^0.5.0 (advanced concurrency control)</li><li><strong>HTTP Client</strong>: axios ^1.10.0 with node-fetch ^3.3.2 fallback</li><li><strong>Caching</strong>: node-cache ^5.1.2 with 24-hour TTL</li><li><strong>Code Processing</strong>: Babel ecosystem with TypeScript/React/Flow presets</li><li><strong>Minification</strong>: terser ^5.43.1 for content optimization</li></ul><p><strong>Security Architecture:</strong></p><ul><li><strong>Content Sanitizer</strong>: 9.2KB dedicated sanitization engine</li><li><strong>Regex Library</strong>: 32.5KB comprehensive pattern matching</li><li><strong>Mask System</strong>: Smart masking for emails, tokens, credentials</li><li><strong>Search Sanitizer</strong>: Input validation and sanitization</li></ul><p><strong>Performance Optimizations:</strong></p><ul><li><strong>Minification Engine</strong>: 29KB intelligent content processing</li><li><strong>Partial Fetching</strong>: 1–1500 line range support for large files</li><li><strong>Caching Strategy</strong>: 24-hour TTL with intelligent invalidation</li><li><strong>Bulk Processing</strong>: Up to 5 concurrent operations with fallback handling</li></ul><h4>Recent Development Activity (July 2025)</h4><ul><li><strong>Token Optimization</strong>: Minification and partial fetching (#28)</li><li><strong>Branch Fallbacks</strong>: Improved branch detection for fetch operations (#30)</li><li><strong>Data Masking</strong>: Enterprise security features (#41)</li><li><strong>Commit Analysis</strong>: Enhanced PR and commit data tools (#40)</li><li><strong>Repository Search</strong>: Improved search capabilities (#36)</li><li><strong>DXT Support</strong>: Desktop extension packaging (#37, #38)</li></ul><h4>Research Workflow Example:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8ZbXcntevUP5uAmVpnziyg.png" /></figure><h4>When to Choose OctoCode MCP</h4><ul><li>You need cross-ecosystem research across GitHub, npm, and PyPI</li><li>You prioritize enterprise content protection with automatic sanitization</li><li>You prefer simple GitHub CLI authentication over complex token management</li><li>You need private repositories research and analysis</li><li>You need custom documentation generation from live codebases</li><li>You require token optimization with intelligent minification and partial file access</li></ul><h3>Comprehensive MCP Comparison</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RQ-hVX6s3dTI7y6UKsapmA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d-V2xsOrX3ZZ72v342XERg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3yc5xt3G8jLPCSMPMGno0Q.png" /></figure><h3>Choose Context7 When:</h3><ul><li>✅ You need accurate, version-specific API documentation</li><li>✅ You want zero-setup simplicity with remote deployment</li><li>✅ You’re working primarily with popular public libraries</li><li>✅ You need multilingual documentation support</li><li>✅ You want to prevent AI hallucinations about deprecated APIs</li></ul><h3>Choose GitHub Official MCP When:</h3><ul><li>✅ You’re heavily invested in GitHub workflows and enterprise features</li><li>✅ You need comprehensive GitHub API automation across all platform features</li><li>✅ You require official GitHub support and enterprise security</li><li>✅ You can handle Docker deployment and token management</li></ul><h3>Choose AWS MCP Suite When:</h3><ul><li>✅ You’re building applications primarily on AWS infrastructure</li><li>✅ You want AI-powered semantic search and analysis capabilities</li><li>✅ You have budget allocated for AWS service usage costs</li><li>✅ You need comprehensive integration across AWS services</li></ul><h3>Choose OctoCode MCP When:</h3><ul><li>✅ You need cross-ecosystem research across GitHub, npm, and PyPI</li><li>✅ You want advanced bulk operations for significantly faster workflows</li><li>✅ You prioritize enterprise content protection with automatic sanitization</li><li>✅ You prefer simple GitHub CLI authentication over complex token management</li><li>✅ You need custom documentation generation from live codebases</li><li>✅ You need custom research and analysis on your private repositories</li></ul><h3>Multi-Platform Strategy</h3><p><strong>Recommended Combinations:</strong></p><ul><li><strong>Context7</strong> + <strong>OctoCode MCP</strong>: Documentation accuracy + cross-ecosystem research</li><li><strong>GitHub Official MCP</strong> + <strong>OctoCode MCP</strong>: Enterprise workflows + advanced research</li><li><strong>Context7</strong> + <strong>GitHub Official MCP</strong>: Documentation + comprehensive GitHub integration</li></ul><h3>Summary</h3><p>The MCP ecosystem in 2025 offers sophisticated solutions for different development scenarios. Each platform brings unique strengths:</p><p><strong>Context7</strong> excels in documentation accuracy with zero-setup deployment and comprehensive multilingual support across 15+ languages. <strong>GitHub Official MCP</strong> provides comprehensive GitHub integration with 14 specialized toolsets and enterprise-grade features backed by Go 1.23.7 performance. <strong>AWS MCP Suite</strong> offers extensive cloud intelligence through 66 specialized servers but requires AWS service investment. <strong>OctoCode MCP</strong> enables simple and efficient cross-ecosystem research in any repository (private or public), and is designed for high efficiency with advanced token optimization, accuracy, and performance awareness.</p><h3>This Analysis Demonstrates</h3><p><strong>Core Research Features</strong></p><ul><li>Advanced semantic code search across repositories</li><li>Real-time documentation generation from live sources</li><li>Cross-repository pattern analysis and synthesis</li><li>Package ecosystem intelligence (NPM &amp; Python)</li><li>Multi-source code understanding and comparison</li></ul><p><strong>Research Strengths</strong></p><ul><li>Pattern Discovery: Find implementation patterns across codebases</li><li>Code Evolution: Track changes and development patterns over time</li><li>Ecosystem Analysis: Deep insights into package dependencies and usage</li><li>Knowledge Synthesis: Combine findings from multiple repositories</li><li>Implementation Learnin<strong>g</strong>: Extract best practices from real-world code</li></ul><p><strong>Research Validation</strong></p><ul><li>Verified accuracy in multi-repository analysis</li><li>Real-time data validation from GitHub, npm, and package registries</li><li>Automated technical documentation generation</li><li>Real-time data validation from GitHub, npm, and package registries</li><li>Automated technical documentation generation</li></ul><p>DISCLAIMER:</p><p>The choice between platforms depends on your team’s primary use case, technical requirements, budget considerations, and the level of research sophistication needed for your development workflows. All metrics and technical specifications in this analysis have been verified against live repository data as of July 21, 2025. However, some of the data may become outdated soon, as this ecosystem is evolving rapidly. In any case, always conduct<strong> your own research</strong> before choosing the right tool for you.</p><p><strong>References:</strong></p><ul><li><a href="https://github.com/bgauryy/octocode-mcp">OctoCode MCP — Cross-Ecosystem Research</a></li><li><a href="https://github.com/upstash/context7">Context7 — Documentation Accuracy</a></li><li><a href="https://github.com/github/github-mcp-server">GitHub Official MCP — Enterprise Workflows</a></li><li><a href="https://github.com/awslabs/mcp">AWS MCP Suite — Cloud Intelligence</a></li><li><a href="https://github.com/modelcontextprotocol/modelcontextprotocol">Model Context Protocol Specification</a></li></ul><p>Doc was created using</p><ul><li><a href="https://markdown-to-medium.surge.sh/">https://markdown-to-medium.surge.sh/</a></li><li><a href="https://www.mermaidchart.com/">https://www.mermaidchart.com</a></li></ul><p><em>Analysis conducted July 21, 2025, using </em><a href="https://github.com/bgauryy/octocode-mcp"><em>OctoCode MCP’s </em>🐙</a> <em>cross-ecosystem research capabilities to demonstrate comprehensive technical documentation generation from live data sources.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43f547f12501" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wix-engineering/mcp-explained-deep-dive-and-comparison-of-popular-code-search-mcps-context7-github-official-mcp-43f547f12501">MCP Explained: Deep Dive and Comparison of Popular Code Search MCPs (Context7, GitHub Official MCP…</a> was originally published in <a href="https://medium.com/wix-engineering">Wix Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Safe Is Your Web3 Application?]]></title>
            <link>https://medium.com/wix-engineering/how-safe-is-your-web3-application-9adcc6170198?source=rss-dfcf2f8c12c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/9adcc6170198</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[web-security]]></category>
            <dc:creator><![CDATA[Guy Bary]]></dc:creator>
            <pubDate>Sat, 02 Jul 2022 15:51:19 GMT</pubDate>
            <atom:updated>2022-07-04T07:41:07.828Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4uzp39mG4pkY2wnL8H9fuw.jpeg" /></figure><blockquote>As Crypto, Blockchain, NFT, Decentralized Applications, Web3, and Metaverse are becoming more popular among every person with access to the internet these days, we see more and more people getting into the crypto world and as a result of that, there are more attempts to steal crypto assets.</blockquote><blockquote>In this post, I will discuss the web3 application’s client-side vulnerabilities, a breach that I found on a popular NFT marketplace (which asked not to be disclosed), that could allow hackers to steal assets using client code execution, and the need for an official security regulation on Web3 applications.</blockquote><h3>Web3</h3><p><em>“an idea for a new iteration of the World Wide Web based on the blockchain, which incorporates concepts including decentralization and token-based economics”. </em><a href="https://en.wikipedia.org/wiki/Web3"><em>Wikipedia</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4QpdBM516FvHCha1B67-Yw.jpeg" /></figure><p>In other words, it’s a web application that interacts with data via a decentralized blockchain instead of a dedicated server. The most common use cases for Web3 applications today are NFT marketplaces, crypto exchanges, metaverse, and crypto games.</p><p>The Web3 application interacts with a<a href="https://en.wikipedia.org/wiki/Smart_contract"> smart contract</a>, which is a code that runs in the blockchain that contains the application data and logic.<a href="https://ethereum.org/en/dapps/#what-are-dapps"> <em>Dapp</em></a> (“Decentralized application”) is the definition of a web application that runs the blockchain.</p><p>To interact with the blockchain, a user needs to have a “bridge” to the blockchain. That bridge is usually called a wallet, which is software that is installed often in the browser as an extension and is responsible for connecting with the blockchain behind the scenes. MetaMask as an example is as of today the most popular wallet.</p><h4>Web3 application overview</h4><p>The interaction with the wallet is done via global Javascript code (e.g <strong><em>window.ethereum</em></strong><em> </em>object) which is injected by the extension to each page.</p><p><em>The </em><strong><em>window.ethereum</em></strong><em> </em>object interacts with the extension, and the extension code interacts with a provider that eventually interacts with the actual blockchain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kul04VWZHOQxFHX17-Vtmg.png" /><figcaption>Abstract architecture</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4JQLqjZ6uNbXKOz1Giul_Q.png" /><figcaption>Abstract flow</figcaption></figure><h3>The Missing piece</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*06DCKb7O1DI5BfG6z-H01g.jpeg" /></figure><p>As a technology, Web3 has some benefits, and it can solve some real-life problems (e.g authentication layer, scale issues, etc), but as of today, there is no official security guideline or recommendations for its security aspects when dealing with users’ crypto assets. In Web2 we can compare it to the security standards of websites that are using credit card transactions.</p><p><a href="https://www.pcisecuritystandards.org/">PCI DSS</a> (“<em>Payment Card Industry Data Security Standard</em>”) is the standard for the usage of credit card transactions on websites. It was introduced in 2004 to minimize fraud on web applications by implementing methods such as data encryption, using a firewall, and protecting the data of the user. Protecting data breaches can be done by redirecting the user to a purchase page, using external windows (iframe) for sensitive areas, etc.</p><p>The credit card industry is a veteran in the fraud battlefield, but even with standards, compliance restrictions, and advanced security methods it will “lose” <strong>~34 billion dollars </strong>in 2022 for fraudulent transactions (according to<a href="https://nilsonreport.com/upload/content_promo/NilsonReport_Issue1209.pdf"> Nilson Report</a> )</p><p>In Web3, there is no such compliance or regulations at the moment, so the possibility that a web3 application will be breached by application-layer exploits is not too low, and since the interaction with the blockchain is done via client code, it can be manipulated with the wrong application architecture.</p><p>External code execution on websites (e.g third-party scripts) is always problematic in the matter of security, and there are many examples of breaches that were caused by supply-chain attacks or browser extensions/plugins.</p><p>When I checked several popular web3 applications (NFT marketplaces and exchanges) I assumed that some of them were hackable, since they were built in a way that allowed unsafe client code to manipulate some of their protocols.</p><p>The exploit that I found was on the actual NFT marketplace that I’m using personally.</p><p>It could have let hackers change the address of the recipient on the NFT transfer action using external code execution. I was able to prove it using a chrome extension that I created.</p><p>At first, I tried to understand how the application is built, and then I tried to understand the transfer protocol and checked for the right places that could manipulate it.</p><p>After I understood what I needed to change, I searched for breaches that would let me execute the code that will modify the transfer protocol.</p><h3>Transfer protocol</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gzdETTHVVsxUNfzlWsrWfw.png" /></figure><p><strong>Steps:</strong></p><p>1. The user fills in the transaction details into the form area (asset, recipient, and quantity) and clicks “Transfer”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*PMhdtK4nDL98ofcseUiwAg.png" /><figcaption>transfer form example</figcaption></figure><p>2. DOM event is triggered</p><p>3. The application sends an HTTP request with the transaction data to the back-end</p><p>4. The application sends a transaction request to the Metamask client SDK</p><p>5. Metamask client SDK sends an event to the extension</p><p>6. Metamask extension shows a popup, which the user needs to sign (the transaction approval)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*BEn6R0JvGYLyTkZuVkjafg.png" /><figcaption>popup example</figcaption></figure><p>7. Metamask sends a transaction to the blockchain</p><p>8. Transfer confirmation (the NFT has been given to the recipient address)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*5XrrIIKBoxSRkgKY9L6Upw.png" /><figcaption>Transfer confirmation example</figcaption></figure><h3>The Breach</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FzDFYkL_ZYB6GoXkV9GGMA.jpeg" /></figure><p>These are the areas that I searched for when I investigated the application:</p><ul><li><strong>Transfer protocol <em>(application network APIs)</em></strong></li><li><strong>Code discovery</strong></li><li><strong>Code execution</strong></li><li><strong>Input Areas</strong></li></ul><h4><strong>Transfer protocol</strong></h4><p>The transfer protocol <strong>(<em>step #3</em>)</strong> wasn’t too hard to understand.</p><p>It wasn’t encrypted, there wasn’t any data integrity check for the payload, and it was able to be manipulated (I checked it using a simple terminal).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T4M54e1X10crWL_AkLZCgg.png" /><figcaption>transaction payload example</figcaption></figure><h4><strong>Code Discovery</strong></h4><p>This part is about making the application code readable.</p><p>Code obfuscation (TL;DR — “make it hard to read”) tends to be related to malicious scripts (you can read about it <a href="https://dev.to/bgauryy/analyzing-magecart-malware-from-zero-to-hero-367p">here</a>), but it is helpful when you want sensitive code flows to be hard to understand on the client-side.</p><p>When I checked the source code of the application I saw that it wasn’t obfuscated and the transaction flow was easy to understand. I could see the structure of the application by its bundle code (which was literally in <em>development</em> mode for some reason…) and I could also see which dependencies the application is using behind the scenes (it would potentially help an attacker to find some more attack vectors).</p><p>Being able to understand the application code gave me some hints on how to breach it.</p><h4><strong>Code execution</strong></h4><p>Missing CSP headers (<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP">Content Security Policy</a>) allowed any script to be fetched to the site. I used this breach to inject an external script using a chrome extension code.</p><h4><strong>Input Areas</strong></h4><p>Sensitive Input elements weren’t “secured” (missing PCI implementations), so sensitive DOM elements could be hacked by code execution. I used it to manipulate the data of those elements.</p><h3>Breach code</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kVicu-tCQF_9S4KXrmHWHQ.jpeg" /></figure><p>I needed to inject code that would be able to execute in the context of the application, so I injected an external script by adding it as a script element to the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction">DOM</a> from the <a href="https://developer.chrome.com/docs/extensions/mv3/content_scripts/">content script</a> (client script that is executed by the extension).</p><h4><strong>code Injection</strong></h4><p>The extension’s <a href="https://developer.chrome.com/docs/extensions/mv3/content_scripts/">content script</a> code is executed in an <a href="https://developer.chrome.com/docs/extensions/mv3/content_scripts/#isolated_world">Isolated world</a> (<em>TL;DR</em> — “clean” execution environment), so I needed to inject a script that will execute code in the application context.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ObTrbbjE-EwBJreZ_rKzwA.png" /><figcaption>chrome-extension content script</figcaption></figure><h4><strong>code execution</strong></h4><p>This code is a basic example of how I changed the value of the input element, so the asset will be transferred to a different wallet.</p><p>I created <a href="https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver">MutationObserver</a> and observed the DOM for input elements that might indicate the input that changes the address of a transfer transaction.</p><p>I modified the <em>value</em><strong> </strong>(<em>HTMLInputElement.prototype.value</em>) property getter of the input of the recipient of the transfer protocol using <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty">defineProperty</a>, so when another code will try to get its value (<strong><em>step #3 </em></strong>of the transfer protocol), it will retrieve a different one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pkN7GTtWrUq6Uow_pGXLtg.png" /><figcaption>hack.js</figcaption></figure><blockquote>I also was able to hack the transfer protocol by modifying the network APIs directly, but the marketplace requested to not disclose this technique publicly.</blockquote><h3>Conclusion</h3><p>When I found out that the application is not safe for users I contacted the marketplace about it, and the incident was managed by <a href="https://hackerone.com/">Hackerone</a> platform (bug bounty platform).</p><p>Eventually, the breaches were fixed, and the incident was closed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-YrS5t31HqswtRbdKElfzA.png" /></figure><h4>Web applications security guidelines</h4><p>A <strong>general</strong> solution for securing users’ data on web3 applications, and its application layer in general, is not too different from any other web application security solution.</p><p>These three rules will reduce <strong>most</strong> of the security risks on web applications:</p><ol><li><strong>Protect The application from unwanted external code execution<br></strong>For example, use <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP"><strong>CSP</strong></a> (Content Security Policy) headers to restrict the sources (domain) of the resources that are fetched by the application.<br>If this header is shown on the response of the application document, the browser will restrict the resources that the application will fetch, for reducing the chance that external code will be able to be executed.</li><li><strong>Protect sensitive DOM elements (e.g forms) from being manipulated<br></strong>Use known methods for isolating sensitive DOM elements from the main execution of the application (TL;DR — use isolated iframe for that).<br>This exact method is used to protect credit card data on websites.<br>In other words, tread areas that are handling crypto transactions like you would tread areas that would use credit card data. (hint — this is part of <a href="https://www.pcisecuritystandards.org/"><strong>PCI</strong></a> regulations and standards…)</li><li><strong>Secure payload data (data integrity)<br></strong>make sure that the payload that transfers sensitive data is not able to be manipulated (or even make this effort to be hard for attackers to implement). There are several techniques for such a thing from using a checksum on the payload to checking the source of each request using dynamic tokens.</li></ol><h4>Data flow</h4><p>It is important to understand that the transaction data flow has two main parts.</p><ol><li><strong>Application → Wallet SDK<br></strong>The flow of the data from the application code to the extension code</li><li><strong>Wallet SDK → Blockchain<br></strong>The flow of the data from the extension code to the blockchain</li></ol><p>This post is about problems in the<strong> first flow</strong> (<em>Application → Wallet SDK</em>), and not about the security of the integration with the extension itself.</p><p>It will be logical to guess that the second flow (<em>Wallet SDK → Blockchain</em>) also has some flaws, but it is not in the scope of this post.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Eg5vX4yvXFiuSBel8_DjAQ.jpeg" /></figure><blockquote>1. This is not a call to hack web3 applications, but another proof that web3 applications should have official security guidelines.</blockquote><blockquote>2. The reason that I searched for the breach is that I wanted to check if the NFT marketplace that I’m using is safe.</blockquote><blockquote>3. The breach is not too sophisticated, in the technical aspect of it (relative to other crypto breaches). I used common techniques that malware is using to steal credit card data from users on infected web applications, but the result of the breach could be devastating for anyone who could potentially lose an expensive bored ape for fraud…</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9adcc6170198" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wix-engineering/how-safe-is-your-web3-application-9adcc6170198">How Safe Is Your Web3 Application?</a> was originally published in <a href="https://medium.com/wix-engineering">Wix Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ENS (Ethereum Name Service) Research Revealed Cool Results]]></title>
            <link>https://medium.com/@guybary/ens-ethereum-name-service-research-revealed-cool-results-5c38fb794a5e?source=rss-dfcf2f8c12c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c38fb794a5e</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[scraping]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[domain-names]]></category>
            <category><![CDATA[node]]></category>
            <dc:creator><![CDATA[Guy Bary]]></dc:creator>
            <pubDate>Sat, 07 May 2022 13:34:37 GMT</pubDate>
            <atom:updated>2022-05-15T11:07:16.357Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*VkP-1fxXeVEguLi1yNazRg.png" /></figure><p>If you haven’t heard about ENS, you should do it now!<br> To cut long story short, <a href="https://ens.domains/">ENS</a> is a service that maps Ethereum addresses to a meaningful URL (human-readable). it’s similar to what DNS is for IPs and URLs.</p><p>For example, such Ethereum address — <strong>0x7f13913E739d03c7CD55FD3693E256bB236C396B7</strong><br> Could be mapped to <strong>username.eth</strong>, <strong>someService.eth</strong>, <strong>someWeb3Application.eth</strong>, or any meaningful string that could be useful in a world where crypto will be more used and adopted.</p><p>ENS (as a service and as a concept) could be the next evolution for the internet (using <a href="https://en.wikipedia.org/wiki/Web3">web3</a>), so people and organizations are trying to grab and accumulate them as much as they can right now.</p><p>Another current hyped use case is to buy the index of the NFT that you own from a collection. let’s say you’re holding <a href="https://opensea.io/collection/boredapeyachtclub">bored ape yacht club</a> number <a href="https://opensea.io/assets/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/1234?ref=0x5c5321ae45550685308a405827575e3d6b4a84aa">#1234</a>, and you want to be associated with it, you would probably want to buy <a href="https://app.ens.domains/name/1234.eth/details">1234.eth</a>.</p><p>Don’t believe the hype? so take a look on <a href="https://opensea.io/assets/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/15550679067107822663889308061104024516714077050193371583584658233021245818692">555.eth</a>, which was sold for nothing less than <br> 55.5 Ethereum! (<a href="https://etherscan.io/tx/0x9f359cffe9bfee095dc9ff0c66253d088aec7f8e1fb47e4595cff6cff8e39a95">$149,584.71</a>) on 28/4/22</p><p>For this moment <a href="https://opensea.io/collection/ens">ENS: Ethereum Name Service</a> is the 8th most traded collection on Opensea with 375k domain owners and more than 1 million registered domains.</p><h3>Results</h3><p>Now, I was curious about what is the smallest available numeric ens address (e.g <strong>100.eth</strong>), and I was shocked to reveal that all the addresses between <strong>100.eth</strong> to <strong>100000.eth</strong> are already taken!</p><p>Fun fact — the smallest available numberic domain is <a href="https://app.ens.domains/search/100113"><strong>100113</strong></a></p><p><a href="https://github.com/bgauryy/ens-scraper/blob/main/n-available.txt">Available numeric domains</a> (updated on 8/5/22)</p><h3>Scraper Project</h3><p>In order to find available Ethereum domains efficiently, I created a <a href="https://github.com/bgauryy/ens-scraper">this project</a>, which allowed me to check for available addresses at a speed of ~0.45 seconds per domain.</p><p><em>I executed this code on my computer — the speed could be improved if it will be used with multiple processes (using docker for example…)</em></p><p>This code is just a POC and was made for fun, but feel free to fork and check for more available addresses.<br> Maybe they will be much more valuable in the future…</p><p>Have fun!</p><p><a href="https://github.com/bgauryy/ens-scraper">https://github.com/bgauryy/ens-scraper</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c38fb794a5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Application Dependencies — use them wisely]]></title>
            <link>https://medium.com/@guybary/web-application-dependencies-use-them-wisely-8c25825ecbb7?source=rss-dfcf2f8c12c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c25825ecbb7</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[node]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Guy Bary]]></dc:creator>
            <pubDate>Sat, 11 Apr 2020 12:21:53 GMT</pubDate>
            <atom:updated>2022-05-15T23:05:06.930Z</atom:updated>
            <content:encoded><![CDATA[<h3>Web Application Dependencies — use them wisely</h3><blockquote><em>This post is about node dependencies and their meaning in your web applications. If you’re using external dependencies in your project (and you’re probably are), this post is for you!</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/267/0*tiNV3bT244vOweux.gif" /></figure><p>The best thing about being a developer in <strong>2020</strong> is that there are a lot of open-source projects that can help with speeding up your developing process, and there are a lot of external libraries that can solve common problems seamlessly.</p><p>Using external dependencies has changed the game years ago since developers were able to invest more time in their application logic, by using out of the box solutions.</p><p>There are two kinds of dependencies:</p><ol><li><strong><em>Development</em></strong></li></ol><ul><li><em>Back-end dependencies</em></li><li>dependencies that take part in HTTP communication</li><li>dependencies that are running on you back-end environment</li><li><strong><em>Front-end dependencies</em></strong></li></ul><p>External libraries have given the ability to use code that was tested across many environments, and major projects usually have supportive communities and hard-working code owners (god bless them all), that keeps those projects alive.</p><p>On the other hand publishing, an open-source is not require anything but a valid user, and there is no regulation on the quality of open-source projects.<br><strong>npm registry</strong> has more than <em>350k</em> published packages at the moment, so statistically, some of them are not too good for your project.</p><p>External dependencies have three main effects on your web application (including dependencies from your <em>HTML</em> file)</p><p><strong>Security</strong> <br> Using external code could be dangerous since ambiguous libraries could add malicious code to your development environment or your user’s runtime (intentionally or by supply chain attacks)</p><p><em>examples</em>: back-end dependency that steals development credentials or front-end dependency that steals PII from your users.</p><p><strong>Performance</strong><br> Code execution is not “free” (Newton’s third law 😁 ), so adding external code might cause some performance issues since using generic and solutions for relatively easy problems could cause an overhead.</p><p><em>example</em> — using lodash.concat function instead of Array.prototype.concat with no good reason</p><p>Also, some libraries “hide” bugs, that might cause memory leaks or CPU overuse when used in scale or untested environments.<br> Some of these bugs are hard to detect, but as popular the open-source is, the less likely it will happen (or won’t be fixed)</p><p><strong>Bundle size</strong><br> Adding dependencies to the front-end bundle <strong>will</strong> increase the loading time of a page (more resources -&gt; more bytes to download -&gt; more time), and page loading time has a direct effect on conversion rate, so heavy and not optimized front-end libraries might become expensive to your business.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/0*2Zkp1j7TuJc3x_La.gif" /></figure><p>There is a trade-off between using dependencies freely and investing time on investigating them since dependencies are used to solve problems fast, and not to create more work.<br> Developers should have the freedom to use dependencies since they are decreasing development time and serve smart solutions out of the box, but dependencies should be used wisely.</p><h3>Solutions</h3><p><strong>Security</strong></p><ul><li>Scan your static dependencies using services such as Snyk. You can also add security alerts to your Github repository and to your CI/CD process.</li><li>Use lock files (package-lock.json, yarn.lock) to ensure that dependencies are installed currently between environments, and be strict with your dependencies versions (do not use * for versions in your package.json file)</li><li>Monitor your front end execution using web security services such as <a href="https://www.perimeterx.com/products/code-defender/">PerimeterX Code Defender</a>. You will never really know what is happening in your runtime if you won’t monitor it in the right way (you shouldn’t do it yourself).</li></ul><p><strong>Performance</strong></p><ul><li>Runtime monitoring</li><li>rendering</li><li>Document state change time (<em>load, DOMContentLoaded</em>)</li><li>Conversion rate changes (any business has its own conversion metric)</li><li>Measure your own code and your business logic (which is using the external dependencies)</li><li>Use <a href="https://github.com/GoogleChrome/lighthouse">lighthouse</a></li><li>Use <a href="https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/reference">chrome’s performance tab</a> to investigate performance issues</li></ul><p><em>Collecting data from 1% of your users is sufficient enough to detect bottlenecks</em></p><p><strong>Code size</strong></p><ul><li>Check the size of any external code (e.g don’t add 10k library only for one function…)</li><li>Avoid adding dependencies from your HTML file as much as you can. Adding dependencies in the compilation time will allow to us <a href="https://developers.google.com/web/fundamentals/performance/optimizing-javascript/tree-shaking">tree-shaking</a> to reduce the final payload size.</li></ul><p><strong>Personal suggestions</strong></p><ul><li>Read the code of open-source projects that you’re using. It will help you to detect potential bugs and will improve your coding skills.</li><li>Check for known issues and bugs of libraries that you’re using</li><li>Use <strong>only</strong> up-to-date dependencies (you can always check for the last commit). “Dead projects” means bugs and future compatibility issues.</li><li>Don’t use dependencies to solve all of your problems. Try to create your solution from time to time (when it make sense), and it will make you a better programmer.</li><li>Create or contribute to an open-source project. It is fun to contribute to the community, and it nice to know that your code is helping other projects (I’m working on these two projects these days: <a href="https://github.com/bgauryy/webscanner">webscanner</a>, <a href="https://github.com/bgauryy/ScriptPatternFactory">script-pattern-factory</a>)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/0*egyLmftCXowaug40.gif" /></figure><p>Thanks for reading!<br> This post is more about the <strong>awareness</strong> of using external code, and I hope that I could help you manage your dependencies in a better way.</p><p><em>Originally published at </em><a href="https://dev.to/bgauryy/dependencies-use-them-wisely-3g65"><em>https://dev.to</em></a><em> on April 11, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c25825ecbb7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>