<?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 Anil Kumar Singh on Medium]]></title>
        <description><![CDATA[Stories by Anil Kumar Singh on Medium]]></description>
        <link>https://medium.com/@er.anil.ec?source=rss-c96bbdc71ce8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*0UbdiZtBHWNDQpAb</url>
            <title>Stories by Anil Kumar Singh on Medium</title>
            <link>https://medium.com/@er.anil.ec?source=rss-c96bbdc71ce8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 03:34:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@er.anil.ec/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[#  Enhancing the Redmine MCP Server with StreamableHTTP Transport]]></title>
            <link>https://medium.com/@er.anil.ec/how-to-use-stream-able-http-transport-for-redmine-mcp-server-c865e8664e5d?source=rss-c96bbdc71ce8------2</link>
            <guid isPermaLink="false">https://medium.com/p/c865e8664e5d</guid>
            <dc:creator><![CDATA[Anil Kumar Singh]]></dc:creator>
            <pubDate>Tue, 16 Sep 2025 06:11:44 GMT</pubDate>
            <atom:updated>2025-09-16T06:12:19.862Z</atom:updated>
            <content:encoded><![CDATA[<p>The [Redmine MCP Server](https://github.com/yonaka15/mcp-server-redmine) is a powerful implementation of the Model Context Protocol (MCP) SDK, designed to interact with Redmine via structured tools. By default, it supports only `StdioServerTransport`, which is ideal for CLI-based interactions. But what if you want to expose it over HTTP for remote clients or web integrations?</p><p>In this post, we’ll walk through how to extend the Redmine MCP server to support **StreamableHTTPServerTransport**, enabling HTTP-based communication while preserving CLI compatibility.</p><p>— -</p><p>## 🧩 Understanding the Architecture</p><p>The original server setup uses:</p><p>```ts</p><p>const transport = new StdioServerTransport();</p><p>await server.connect(transport);</p><p>This works well for local development and CLI tools, but it doesn’t support remote HTTP clients. To modernize the server, we need to integrate:</p><pre><br>const transport = new StreamableHTTPServerTransport({ ... });<br>await server.connect(transport);</pre><h3>🛠️ Refactoring for Dual Transport Support</h3><p>We refactored the runServer() function to accept a mode (stdio or http) and initialize the appropriate transport. For HTTP, we added an Express server with endpoints for POST, GET, and DELETE to handle MCP sessions.</p><p>We also introduced session tracking using randomUUID() and a transport map to manage multiple concurrent sessions.</p><pre>app.post(&#39;/mcp&#39;, async (req, res) =&gt; {<br>  const sessionId = req.headers[&#39;mcp-session-id&#39;];<br>  let transport = transports[sessionId];<br><br>  if (!transport) {<br>    transport = new StreamableHTTPServerTransport({<br>      sessionIdGenerator: () =&gt; randomUUID(),<br>      onsessioninitialized: (id) =&gt; {<br>        transports[id] = transport;<br>      },<br>      enableDnsRebindingProtection: false,<br>    });<br>    await server.connect(transport);<br>  }<br><br>  await transport.handleRequest(req, res, req.body);<br>});</pre><h3>Fixing TypeScript Errors</h3><p>During integration, several TypeScript issues surfaced:</p><ul><li>❌ Missing type declarations for Express</li><li>❌ Incorrect return types in tool handlers</li><li>❌ Implicit any types for request/response objects</li><li>❌ Indexing errors due to strict typing on handler maps</li></ul><h3>✅ Solutions:</h3><ul><li>Installed @types/express for proper type support</li><li>Added Request and Response annotations</li><li>Used type guards and assertions for safe handler access</li><li>Ensured all tool handlers return valid ServerResult objects</li></ul><h3>✅ Final Result: Clean, Flexible Server</h3><p>The final index.ts supports both transports, handles errors gracefully, and is fully typed for TypeScript. You can now run:</p><pre>runServer(&#39;stdio&#39;); // CLI mode<br>runServer(&#39;http&#39;);  // HTTP mode</pre><p>This makes the server versatile and ready for both local and remote use cases.</p><h3>📝 Conclusion</h3><p>By integrating StreamableHTTP transport, the Redmine MCP server is now ready for modern web-based clients, enabling richer integrations and remote tool execution. This upgrade makes the server more versatile, scalable, and future-proof.</p><p>Whether you’re building a web dashboard, integrating with external systems, or just want more flexibility, this enhancement opens up a world of possibilities.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c865e8664e5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing FreeSWITCH from Source Using Docker and Docker Compose]]></title>
            <link>https://medium.com/@er.anil.ec/installing-freeswitch-from-source-using-docker-and-docker-compose-ed2cc4fa992e?source=rss-c96bbdc71ce8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed2cc4fa992e</guid>
            <category><![CDATA[freeswitch]]></category>
            <category><![CDATA[freeswitch-solution]]></category>
            <category><![CDATA[freeswitch-docker]]></category>
            <dc:creator><![CDATA[Anil Kumar Singh]]></dc:creator>
            <pubDate>Tue, 19 Aug 2025 10:31:56 GMT</pubDate>
            <atom:updated>2025-08-19T16:03:41.886Z</atom:updated>
            <content:encoded><![CDATA[<p>Installing FreeSWITCH from Source Using Docker and Docker Compose</p><p><strong>By Anil Kumar Singh — System Architect, Real-Time Media &amp; Embedded AI</strong></p><p>📦 Step 1: Crafting the Dockerfile</p><p>I started with Ubuntu 22.04 as the base image and layered in all the build tools and dependencies required by FreeSWITCH. Here’s a simplified version of the Dockerfile:</p><pre>FROM ubuntu:22.04<br>LABEL maintainer=&quot;Anil Kumar Singh&quot; <br>LABEL description=&quot;FreeSWITCH build from source with modular, debug-friendly setup&quot; <br>ENV DEBIAN_FRONTEND=noninteractive <br>ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig <br>ENV PATH=&quot;/usr/local/freeswitch/bin:$PATH&quot; <br># Base build tools <br>RUN apt update &amp;&amp; apt install -y \ <br>build-essential cmake git wget curl pkg-config \ <br>libtool libtool-bin autoconf automake bash \ <br>software-properties-common ca-certificates gnupg <br><br># Core dependencies <br>RUN apt install -y \ <br>libssl-dev libsqlite3-dev libcurl4-openssl-dev libpcre2-dev \ <br>libspeex-dev libspeexdsp-dev libsofia-sip-ua-dev libldns-dev \ <br>uuid-dev libpq-dev libopus-dev libsndfile1-dev libavformat-dev \ <br>libavcodec-dev libavutil-dev libswscale-dev libjpeg-dev libtiff-dev \ <br>libedit-dev liblua5.3-dev yasm nasm <br><br># Build libks and signalwire-c <br>RUN git clone https://github.com/signalwire/libks.git /usr/src/libks &amp;&amp; \ <br>cd /usr/src/libks &amp;&amp; cmake . &amp;&amp; make -j$(nproc) &amp;&amp; make install<br> <br>RUN git clone https://github.com/signalwire/signalwire-c.git /usr/src/signalwire-c &amp;&amp; \ <br>cd /usr/src/signalwire-c &amp;&amp; cmake . &amp;&amp; make -j$(nproc) &amp;&amp; make install <br><br># Build spandsp and sofia-sip from source <br>RUN git clone https://github.com/freeswitch/spandsp.git /usr/src/spandsp &amp;&amp; \ <br>cd /usr/src/spandsp &amp;&amp; ./bootstrap.sh &amp;&amp; ./configure &amp;&amp; make -j$(nproc) &amp;&amp; make install &amp;&amp; ldconfig <br>RUN git clone https://github.com/freeswitch/sofia-sip.git /usr/src/sofia-sip &amp;&amp; \ <br>cd /usr/src/sofia-sip &amp;&amp; ./bootstrap.sh &amp;&amp; ./configure &amp;&amp; make -j$(nproc) &amp;&amp; make install &amp;&amp; ldconfig <br><br># Clone and build FreeSWITCH <br>RUN git clone https://github.com/signalwire/freeswitch.git /usr/src/freeswitch &amp;&amp; \ <br>cd /usr/src/freeswitch &amp;&amp; chmod +x bootstrap.sh &amp;&amp; bash ./bootstrap.sh -j &amp;&amp; \ <br>./configure &amp;&amp; make -j$(nproc) &amp;&amp; make install &amp;&amp; \ <br>make sounds-install &amp;&amp; make moh-install <br>WORKDIR /usr/src/freeswitch <br>CMD [&quot;bash&quot;]</pre><p>� Step 2: Docker Compose Setup</p><p>To simplify container management and volume mounting, I created a docker-compose.yml:</p><p>Note : Make sure you are using correct image name instead of freeswitch-custom.</p><pre>services:<br>  freeswitch:<br>    image: freeswitch-custom<br>    container_name: freeswitch-dev<br>    ports:<br>      - &quot;5060:5060/udp&quot;         # SIP<br>      - &quot;5080:5080/udp&quot;         # External SIP<br>      - &quot;5060:5060&quot;<br>      - &quot;5080:5080&quot;<br>      - &quot;8021:8021&quot;             # Event Socket<br>      - &quot;8081:8081&quot;             # WebSocket (mod_verto)<br>      - &quot;7443:7443&quot;             # TLS WebSocket<br>      - &quot;16384-20000:16384-20000/udp&quot;  # RTP media<br>    volumes:<br>      - ./freeswitch-conf:/usr/local/freeswitch/conf        # Config override<br>      - ./freeswitch-logs:/usr/local/freeswitch/log         # Logs<br>      - ./custom-modules:/usr/src/freeswitch/src/mod        # Optional: custom modules<br>    restart: unless-stopped<br>    command: [ &quot;-nc&quot;, &quot;-conf&quot;, &quot;/usr/local/freeswitch/conf&quot;, &quot;-log&quot;, &quot;/usr/local/freeswitch/log&quot;, &quot;-db&quot;, &quot;/usr/local/freeswitch/db&quot;]<br>    #entrypoint: [&quot;sleep&quot;, &quot;3600&quot;]<br><br></pre><p>This setup allows me to mount configuration and log directories from the host, making it easy to tweak dialplans and inspect runtime behavior.</p><p>Just use “docker compose up — build -d” command to build and run.</p><p>⚠️ Challenges I Faced (and Solved)</p><p>1. <strong>Docker Volume Mount Errors on Windows</strong></p><p>Using $(pwd) in volume paths caused errors:</p><p>&quot;$(pwd)/conf&quot; includes invalid characters for a local volume name</p><p>✅ <strong>Fix</strong>: Use %cd% in Command Prompt or ${PWD} in PowerShell for absolute paths.</p><p>2. <strong>Missing Dependencies During </strong><strong>./configure</strong></p><p>Errors like:</p><p>No package ‘libpcre2–8’ found No usable sofia-sip No usable spandsp</p><p>✅ <strong>Fix</strong>: Installed libpcre2-dev, built sofia-sip and spandsp from source, and updated PKG_CONFIG_PATH.</p><p>3. <strong>Assembly Tools Not Found</strong></p><p>Neither yasm nor nasm have been found.</p><p>✅ <strong>Fix</strong>: Installed yasm and nasm to enable libvpx compilation.</p><p>4. <strong>Lua Headers Missing</strong></p><p>fatal error: lua.h: No such file or directory</p><p>✅ <strong>Fix</strong>: Installed liblua5.3-dev to compile mod_lua.</p><p>🚀 Running FreeSWITCH</p><p>After building the image:</p><p>docker-compose build docker-compose up</p><p>To access the FreeSWITCH CLI:</p><p>docker exec -it freeswitch fs_cli</p><p>🧠 Final Thoughts</p><p>Building FreeSWITCH from source in Docker isn’t just about getting it to run — it’s about creating a reproducible, modular, and debug-friendly environment. By resolving each dependency manually and layering the build process, I now have a container that’s ready for SIP testing, dialplan customization, and media server experimentation.</p><p>If you’re working on real-time media systems or SIP telephony, this setup is a solid foundation for deeper integration and automation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed2cc4fa992e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>