<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abdullah Javed</title>
    <description>The latest articles on DEV Community by Abdullah Javed (@abdullah_javed_287f38c45e).</description>
    <link>https://dev.to/abdullah_javed_287f38c45e</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4204900%2Fa2cf2770-2ef7-4a8c-84a5-23277b81a01f.JPG</url>
      <title>DEV Community: Abdullah Javed</title>
      <link>https://dev.to/abdullah_javed_287f38c45e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abdullah_javed_287f38c45e"/>
    <language>en</language>
    <item>
      <title>Integrating YOLO Fire Detection with FastAPI and Next.js 🔥</title>
      <dc:creator>Abdullah Javed</dc:creator>
      <pubDate>Tue, 27 Oct 2026 11:42:55 +0000</pubDate>
      <link>https://dev.to/abdullah_javed_287f38c45e/integrating-yolo-fire-detection-with-fastapi-and-nextjs-19k1</link>
      <guid>https://dev.to/abdullah_javed_287f38c45e/integrating-yolo-fire-detection-with-fastapi-and-nextjs-19k1</guid>
      <description>&lt;p&gt;A practical walkthrough of setting up FlameGuard, connecting a custom YOLO model, and debugging a full-stack Computer Vision application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;I recently explored &lt;strong&gt;FlameGuard&lt;/strong&gt;, an open-source fire detection application built with YOLO, FastAPI, and Next.js.&lt;/p&gt;

&lt;p&gt;I wanted to understand how a trained object detection model works inside a complete web application.&lt;/p&gt;

&lt;p&gt;I used the &lt;a href="https://github.com/nohsangwoo/FlameGuard" rel="noopener noreferrer"&gt;original FlameGuard repository&lt;/a&gt; and adapted it to work with my own trained fire detection model.&lt;/p&gt;

&lt;p&gt;Here's a breakdown of the implementation and what I learned.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Python&lt;/td&gt;
&lt;td&gt;Backend development&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;YOLO&lt;/td&gt;
&lt;td&gt;Fire detection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenCV&lt;/td&gt;
&lt;td&gt;Image processing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FastAPI&lt;/td&gt;
&lt;td&gt;REST API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SQLite&lt;/td&gt;
&lt;td&gt;Detection history&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Next.js&lt;/td&gt;
&lt;td&gt;Frontend&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;React&lt;/td&gt;
&lt;td&gt;User interface&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Conda&lt;/td&gt;
&lt;td&gt;Dependency management&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  1. Project Setup
&lt;/h2&gt;

&lt;p&gt;Clone the repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/nohsangwoo/FlameGuard.git
&lt;span class="nb"&gt;cd &lt;/span&gt;FlameGuard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The main project structure is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FlameGuard/
├── backend/
│   ├── app/
│   └── environment.yml
├── frontend/
└── README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create the Python environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;backend
conda &lt;span class="nb"&gt;env &lt;/span&gt;create &lt;span class="nt"&gt;-f&lt;/span&gt; environment.yml
conda activate flameguard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Integrating the YOLO Model
&lt;/h2&gt;

&lt;p&gt;I already had a trained fire detection model named &lt;code&gt;best.pt&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The model contains one detection class:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fire&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I placed the model in the backend's assets directory and configured the detection endpoint to use it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pathlib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;ultralytics&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;YOLO&lt;/span&gt;

&lt;span class="n"&gt;APP_DIR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;__file__&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="n"&gt;parents&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="n"&gt;MODEL_PATH&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;APP_DIR&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;assets&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;best.pt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;YOLO&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;MODEL_PATH&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Loading the model outside the API handler avoids repeatedly initializing it for each request.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Running Fire Detection
&lt;/h2&gt;

&lt;p&gt;The prediction process uses the YOLO model to analyze an uploaded image.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;temp_file_path&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;conf&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;imgsz&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;640&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can extract detection information:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;box&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;boxes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;class_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;item&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="n"&gt;class_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;names&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;class_id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;confidence&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;conf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;item&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="n"&gt;bbox&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;xyxy&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;tolist&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;class_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bbox&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each detection includes a predicted class, confidence score, and bounding-box coordinates.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Creating Annotated Images
&lt;/h2&gt;

&lt;p&gt;Ultralytics provides a convenient method for drawing predicted bounding boxes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;annotated_img&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The annotated image can then be saved using OpenCV:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;cv2&lt;/span&gt;

&lt;span class="n"&gt;cv2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;imwrite&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;log_file_path&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;annotated_img&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These images can be used by the frontend to display detection results.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. FastAPI Integration
&lt;/h2&gt;

&lt;p&gt;The backend exposes a prediction endpoint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST /predict_fire
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It receives an uploaded image, processes it with YOLO, and returns a structured detection response.&lt;/p&gt;

&lt;p&gt;For example, one of my tests returned:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"fire detected"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"file_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"frame.jpg"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"detections"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"class_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"fire"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"confidence"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.419&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The API can also store detection information in SQLite for later retrieval.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Debugging Detection Images
&lt;/h2&gt;

&lt;p&gt;One issue I encountered was that the backend returned successful predictions, but detection images were missing.&lt;/p&gt;

&lt;p&gt;The logs showed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST /predict_fire 200 OK
GET /log/image.jpg 404 Not Found
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I investigated the image-saving and static-file directory paths.&lt;/p&gt;

&lt;p&gt;Using &lt;code&gt;pathlib&lt;/code&gt; helped keep the paths consistent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pathlib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;

&lt;span class="n"&gt;APP_DIR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;__file__&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="n"&gt;parents&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="n"&gt;LOG_DIR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;APP_DIR&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;log&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;LOG_DIR&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mkdir&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;parents&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;exist_ok&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This was a useful lesson in handling generated files inside FastAPI applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Running the Backend
&lt;/h2&gt;

&lt;p&gt;From the backend directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; uvicorn app.main:app &lt;span class="nt"&gt;--reload&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The backend runs at:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:8000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;API documentation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:8000/docs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  8. Running the Next.js Frontend
&lt;/h2&gt;

&lt;p&gt;Open another terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;frontend
pnpm &lt;span class="nb"&gt;install
&lt;/span&gt;pnpm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The frontend runs at:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:3000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The interface communicates with the FastAPI backend to process images and retrieve detection results.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Handling Camera Errors
&lt;/h2&gt;

&lt;p&gt;During testing, I encountered a browser error related to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nb"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mediaDevices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;enumerateDevices&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A simple feature check helps prevent the application from crashing when the browser camera API is unavailable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nb"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mediaDevices&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;enumerateDevices&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;warn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Camera API unavailable&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;devices&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mediaDevices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;enumerateDevices&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Browser permissions and secure-context requirements are important when working with camera-based applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Lessons Learned
&lt;/h2&gt;

&lt;p&gt;This project helped me better understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;YOLO inference and detection results.&lt;/li&gt;
&lt;li&gt;FastAPI integration with Computer Vision models.&lt;/li&gt;
&lt;li&gt;Image annotation and file management.&lt;/li&gt;
&lt;li&gt;SQLite detection logging.&lt;/li&gt;
&lt;li&gt;Next.js and backend communication.&lt;/li&gt;
&lt;li&gt;Debugging missing images and browser camera errors.&lt;/li&gt;
&lt;li&gt;Organizing a full-stack AI application.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Future Improvements
&lt;/h2&gt;

&lt;p&gt;I plan to explore better detection accuracy, improve frontend interactions, test more challenging images, and make the application more reliable for continuous monitoring.&lt;/p&gt;

&lt;p&gt;The current project is a learning experiment rather than a production-ready fire safety system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Working on FlameGuard was a valuable opportunity to connect Computer Vision concepts with full-stack application development.&lt;/p&gt;

&lt;p&gt;It also reminded me that a trained AI model is only one part of a complete application.&lt;/p&gt;

&lt;p&gt;There is much more to explore, and I look forward to improving my understanding through more practical projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Original project:&lt;/strong&gt; &lt;a href="https://github.com/nohsangwoo/FlameGuard" rel="noopener noreferrer"&gt;FlameGuard by nohsangwoo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/abdullahjave" rel="noopener noreferrer"&gt;github.com/abdullahjave&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>python</category>
      <category>computervision</category>
      <category>ai</category>
      <category>powerapps</category>
    </item>
    <item>
      <title>Connecting AI Agents to Scientific Tools with MCP: My OSI Hackathon 2026</title>
      <dc:creator>Abdullah Javed</dc:creator>
      <pubDate>Sat, 24 Oct 2026 19:19:55 +0000</pubDate>
      <link>https://dev.to/abdullah_javed_287f38c45e/connecting-ai-agents-to-scientific-tools-with-mcp-my-osi-hackathon-2026-5g3</link>
      <guid>https://dev.to/abdullah_javed_287f38c45e/connecting-ai-agents-to-scientific-tools-with-mcp-my-osi-hackathon-2026-5g3</guid>
      <description>&lt;h1&gt;
  
  
  Connecting AI Agents to Scientific Tools with MCP: My OSI Hackathon 2026 Experience
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Building reproducible AI-agent workflows with Python, Claude Code, GitHub Copilot CLI, and scientific MCP tools.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;What happens when we connect AI coding agents to real scientific tools?&lt;/p&gt;

&lt;p&gt;That was one of the questions I explored while contributing to &lt;strong&gt;KnowledgeIsPower&lt;/strong&gt;, an open-source project developed during the &lt;strong&gt;OSI Hackathon 2026 (October 21–22)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Our team, led by Amit Shenoy, worked on a problem in &lt;strong&gt;single-cell proteomics&lt;/strong&gt;: estimating missing protein measurements using biological knowledge and data-driven methods.&lt;/p&gt;

&lt;p&gt;We developed &lt;code&gt;scp-graphfs-mcp&lt;/code&gt;, a scientific Model Context Protocol (MCP) server that enables AI agents to interact with protein-complex data, knowledge graphs, and imputation tools.&lt;/p&gt;

&lt;p&gt;My contribution focused on &lt;strong&gt;S5: MCP Client Integration, Testing, and Documentation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this article, I'll walk through the project architecture, how I connected AI agents to the MCP server, and what I learned from running a real scientific workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The Problem We Were Solving
&lt;/h2&gt;

&lt;p&gt;Single-cell proteomics helps researchers measure proteins in individual cells.&lt;/p&gt;

&lt;p&gt;However, mass-spectrometry experiments often produce incomplete measurements. Depending on the experiment, only around 20–60% of a cell's proteins may be quantified.&lt;/p&gt;

&lt;p&gt;Researchers use &lt;strong&gt;imputation&lt;/strong&gt; to estimate missing values.&lt;/p&gt;

&lt;p&gt;Traditional approaches, including k-nearest neighbors (kNN), rely on patterns already present in the dataset.&lt;/p&gt;

&lt;p&gt;Our team explored whether biological knowledge, particularly relationships between proteins, could improve these estimates.&lt;/p&gt;

&lt;p&gt;The project ultimately compared &lt;strong&gt;22 protein knowledge representations&lt;/strong&gt; and investigated methods for transferring protein co-regulation information from external datasets.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. What Is MCP?
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt; provides a standardized way for AI applications to connect with external tools and data sources.&lt;/p&gt;

&lt;p&gt;An MCP server exposes tools, while an MCP-compatible client allows an AI agent to discover and call them.&lt;/p&gt;

&lt;p&gt;For our project, the architecture looked like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;             AI Agent / MCP Client
                       |
           +-----------+-----------+
           |                       |
      Claude Code            GitHub Copilot CLI
           |                       |
           +-----------+-----------+
                       |
                MCP Protocol
                 (STDIO)
                       |
               scp-graphfs-mcp
                       |
             Scientific MCP Tools
                       |
       Protein Complexes / Knowledge Graphs
                       |
           Proteomics Dataset Analysis
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of writing a separate integration for every AI client, we could expose scientific capabilities through one MCP server.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. The Six Scientific MCP Tools
&lt;/h2&gt;

&lt;p&gt;Our server exposed six tools:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;MCP Tool&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_complexes&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Retrieve protein-complex information&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;explain_protein&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Explore biological information about a protein&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;build_prior&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Construct knowledge-based priors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;propagate_scores&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Propagate information through graph relationships&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;impute_with_prior&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Impute missing values using a biological prior&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;select_panel&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Support protein measurement-panel selection&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These tools made it possible to move from a natural-language research question to structured scientific operations.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Setting Up the Development Environment
&lt;/h2&gt;

&lt;p&gt;I worked with the project's Python environment and MCP server.&lt;/p&gt;

&lt;p&gt;After cloning the repository, I created a virtual environment and installed the development dependencies.&lt;/p&gt;

&lt;p&gt;On Windows PowerShell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;clone&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://github.com/xX-its-amit-Xx/knowledgeispower.git&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;knowledgeispower&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;switch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;claude/happy-hamilton-kdexid&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="n"&gt;python&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-m&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;venv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;venv&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;\.venv\Scripts\Activate.ps1&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="n"&gt;python&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-m&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pip&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-e&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;".[dev]"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The repository's active development branch was important because it contained the implementation used for the hackathon.&lt;/p&gt;

&lt;p&gt;I also ran the project's offline tests and checked that the MCP server exposed its expected tools.&lt;/p&gt;

&lt;p&gt;During my local testing, the offline suite reported:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;19 passed, 27 xfailed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This was a snapshot of my development environment, not the final project's complete test count.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Connecting Claude Code to the MCP Server
&lt;/h2&gt;

&lt;p&gt;One of my tasks was configuring Claude Code as an MCP client.&lt;/p&gt;

&lt;p&gt;I installed the Claude Code CLI and registered the local scientific server using STDIO transport.&lt;/p&gt;

&lt;p&gt;The following example uses a Windows virtual environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;claude&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;mcp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--transport&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;stdio&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--scope&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;local&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;scp-graphfs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;".\.venv\Scripts\scp-graphfs-mcp.exe"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a local installation, use the actual executable path from your environment. An absolute path is generally more reliable.&lt;/p&gt;

&lt;p&gt;To inspect the configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;claude&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;mcp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;list&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;claude&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;mcp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;get&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;scp-graphfs&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I successfully configured the connection and verified that Claude Code recognized the MCP server.&lt;/p&gt;

&lt;p&gt;However, I couldn't complete a full Claude Code AI session myself because I didn't have the required Claude access.&lt;/p&gt;

&lt;p&gt;The connection setup and verification were completed; a real Claude Code session transcript was not part of my individual submission.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Connecting GitHub Copilot CLI
&lt;/h2&gt;

&lt;p&gt;I also configured &lt;strong&gt;GitHub Copilot CLI&lt;/strong&gt; to communicate with &lt;code&gt;scp-graphfs-mcp&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;After installing and authenticating Copilot CLI, I used its MCP configuration interface to register the server.&lt;/p&gt;

&lt;p&gt;The configuration included:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Server name: scp-graphfs
Transport: STDIO
Command: &amp;lt;absolute-path-to-scp-graphfs-mcp.exe&amp;gt;
Environment variables: None required
Tools: *
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After configuration, the MCP server reported a connected status.&lt;/p&gt;

&lt;p&gt;All six scientific tools were available to the Copilot agent.&lt;/p&gt;

&lt;p&gt;This allowed me to run a real scientific analysis through an AI-agent workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Running a Real Scientific Experiment
&lt;/h2&gt;

&lt;p&gt;I used GitHub Copilot CLI to investigate the &lt;strong&gt;26S proteasome&lt;/strong&gt;, a protein complex involved in protein degradation.&lt;/p&gt;

&lt;p&gt;The research question was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which subunits of the 26S proteasome are measured in &lt;code&gt;data/datasets/petrosius2023_aml_sc.h5ad&lt;/code&gt;, and how many of their missing values can be filled from partners?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The workflow involved retrieving the protein complex, examining the dataset, preparing a 26S-only subset, and using the MCP imputation tool.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Retrieve the Protein Complex
&lt;/h3&gt;

&lt;p&gt;The agent called the MCP tool with parameters equivalent to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"PSMB5"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"sources"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"complexportal"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The tool identified:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Complex Portal ID: CPX-5993
Complex: 26S proteasome
Total subunits: 33
Measured subunits: 31
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two subunits, &lt;code&gt;PSMB3&lt;/code&gt; and &lt;code&gt;SEM1&lt;/code&gt;, were not measured in the dataset.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Prepare the Dataset
&lt;/h3&gt;

&lt;p&gt;The experiment used the Petrosius 2023 single-cell proteomics dataset.&lt;/p&gt;

&lt;p&gt;The agent-assisted workflow prepared a temporary &lt;code&gt;.h5ad&lt;/code&gt; subset containing the measured 26S proteasome proteins.&lt;/p&gt;

&lt;p&gt;This subset was important because the following imputation counts applied specifically to the 26S proteasome experiment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Impute Missing Measurements
&lt;/h3&gt;

&lt;p&gt;The agent called &lt;code&gt;impute_with_prior&lt;/code&gt; using the Complex Portal biological prior.&lt;/p&gt;

&lt;p&gt;The resulting metrics were:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Total missing values&lt;/td&gt;
&lt;td&gt;638&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Imputed from protein partners&lt;/td&gt;
&lt;td&gt;607&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;kNN fallback imputations&lt;/td&gt;
&lt;td&gt;31&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Partner-based coverage&lt;/td&gt;
&lt;td&gt;95.1%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The experiment showed that the MCP tool could use protein-complex relationships to fill many missing entries in this particular subset.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; The 95.1% figure describes the fraction of missing entries handled through partner-based imputation. It is not an accuracy score or evidence that this method outperformed kNN.&lt;/p&gt;

&lt;p&gt;The complete real-session transcript was preserved in the repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. What Did the Team's Research Show?
&lt;/h2&gt;

&lt;p&gt;Alongside MCP integration, the team conducted a broader scientific benchmark.&lt;/p&gt;

&lt;h3&gt;
  
  
  Finding 1: Curated Biological Knowledge Was Useful but Insufficient
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fodc8bgbj348uku1j0lff.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fodc8bgbj348uku1j0lff.png" alt="Comparison of 22 biological knowledge representations" width="665" height="662"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 1. Comparison of 22 biological knowledge representations. Curated physical complexes ranked highest among the priors, but none independently beat the plain kNN baseline. Source: KnowledgeIsPower team, OSI Hackathon 2026.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The top curated knowledge sources included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Complex Portal&lt;/li&gt;
&lt;li&gt;PDB co-structure&lt;/li&gt;
&lt;li&gt;CORUM&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These represented meaningful biological relationships, but none of the individual priors passed the project's development gate against the strongest data-only methods.&lt;/p&gt;

&lt;h3&gt;
  
  
  Finding 2: Reference-Based Protein Imputation Improved the Final Holdout Results
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuxrh4anxe364rtzxddid.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuxrh4anxe364rtzxddid.png" alt="Untouched Brunner 2022 holdout results comparing the reference-based method with data-only baselines" width="799" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 2. Untouched Brunner 2022 holdout experiment. The reference-based method reduced in-complex RMSE compared with the strongest data-only baseline. Source: KnowledgeIsPower team, OSI Hackathon 2026.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The final reported comparison showed:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Baseline&lt;/th&gt;
&lt;th&gt;MCAR improvement&lt;/th&gt;
&lt;th&gt;MNAR improvement&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;kNN&lt;/td&gt;
&lt;td&gt;6.0%&lt;/td&gt;
&lt;td&gt;8.9%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;kNN + low-rank&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.4%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;5.4%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scrambled reference&lt;/td&gt;
&lt;td&gt;2.5%&lt;/td&gt;
&lt;td&gt;4.3%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;All six reported paired-bootstrap 95% confidence intervals were below zero.&lt;/p&gt;

&lt;p&gt;However, an earlier holdout produced weaker results against the strongest data-only baseline, so replication remained an important limitation.&lt;/p&gt;

&lt;p&gt;The key research lesson was that &lt;strong&gt;learning protein relationships from external biological data could be more effective than relying on curated protein-complex knowledge alone&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. My Open-Source Contribution
&lt;/h2&gt;

&lt;p&gt;My work focused on practical MCP integration and reproducible documentation.&lt;/p&gt;

&lt;p&gt;I completed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude Code CLI installation, MCP registration, and connection verification.&lt;/li&gt;
&lt;li&gt;GitHub Copilot CLI authentication and MCP integration.&lt;/li&gt;
&lt;li&gt;Verification of all six scientific MCP tools.&lt;/li&gt;
&lt;li&gt;A real agent-assisted proteomics experiment.&lt;/li&gt;
&lt;li&gt;Local development setup and offline testing.&lt;/li&gt;
&lt;li&gt;A reproducible GitHub Copilot CLI setup guide.&lt;/li&gt;
&lt;li&gt;Export and redaction of the real agent-session transcript.&lt;/li&gt;
&lt;li&gt;Submission of the documentation through &lt;strong&gt;merged Pull Request #8&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My merged contribution is available here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/xX-its-amit-Xx/knowledgeispower/pull/8" rel="noopener noreferrer"&gt;https://github.com/xX-its-amit-Xx/knowledgeispower/pull/8&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The scientific benchmark results discussed above were produced by the broader KnowledgeIsPower team.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. What I Learned
&lt;/h2&gt;

&lt;p&gt;This project gave me hands-on experience with several technologies and practices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCP integration:&lt;/strong&gt; How AI agents can communicate with specialized tools using a standard protocol.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI-assisted scientific workflows:&lt;/strong&gt; How an agent can combine natural-language questions with structured scientific operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python and bioinformatics:&lt;/strong&gt; Working with proteomics datasets, protein identifiers, and scientific tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Testing and reproducibility:&lt;/strong&gt; Why setup instructions, tool outputs, and real session transcripts matter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open-source collaboration:&lt;/strong&gt; Contributing to an existing repository, following project specifications, and submitting pull requests.&lt;/p&gt;

&lt;p&gt;Coming from a computer vision and machine learning background, I found it especially interesting to see how AI agents could support research outside my usual domain.&lt;/p&gt;

&lt;h2&gt;
  
  
  11. Final Thoughts
&lt;/h2&gt;

&lt;p&gt;The OSI Hackathon 2026 was an opportunity to explore the intersection of &lt;strong&gt;AI agents, scientific computing, biological knowledge, and open-source software&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Our team built a functional MCP-based research system and reported both positive findings and important limitations.&lt;/p&gt;

&lt;p&gt;My contribution helped demonstrate how an external AI coding agent could connect to the scientific server and execute a reproducible analysis.&lt;/p&gt;

&lt;p&gt;I'm grateful to our team lead &lt;strong&gt;Amit Shenoy&lt;/strong&gt; and my teammates &lt;strong&gt;Ratish Panda, Eeshan Khan, Fatima Zahra, and Asiya Ali&lt;/strong&gt; for the collaboration.&lt;/p&gt;

&lt;p&gt;I look forward to working on more projects involving AI agents, MCP, computer vision, and scientific research.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Links
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Official OSI Hackathon 2026:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://scientificintelligence.org/campaigns/osi-hackathon-2026" rel="noopener noreferrer"&gt;https://scientificintelligence.org/campaigns/osi-hackathon-2026&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;KnowledgeIsPower Submission:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://scientificintelligence.org/campaigns/osi-hackathon-2026/submissions/190" rel="noopener noreferrer"&gt;https://scientificintelligence.org/campaigns/osi-hackathon-2026/submissions/190&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Repository:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/xX-its-amit-Xx/knowledgeispower" rel="noopener noreferrer"&gt;https://github.com/xX-its-amit-Xx/knowledgeispower&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Merged Pull Request:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/xX-its-amit-Xx/knowledgeispower/pull/8" rel="noopener noreferrer"&gt;https://github.com/xX-its-amit-Xx/knowledgeispower/pull/8&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My GitHub:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/abdullahjave" rel="noopener noreferrer"&gt;https://github.com/abdullahjave&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Written by Abdullah Javed — Computer Science student, AI and Computer Vision enthusiast, and open-source contributor.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>mcp</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
