<?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: Ali Raza</title>
    <description>The latest articles on DEV Community by Ali Raza (@ali_raza_1ce2540f37e01a91).</description>
    <link>https://dev.to/ali_raza_1ce2540f37e01a91</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%2F4031383%2Fc036ff88-bf13-4e5a-9b0d-5f1e2f7ed3ef.jpg</url>
      <title>DEV Community: Ali Raza</title>
      <link>https://dev.to/ali_raza_1ce2540f37e01a91</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ali_raza_1ce2540f37e01a91"/>
    <language>en</language>
    <item>
      <title>Building and Deploying a Remote MCP Server: Lessons from Connecting an Expense Tracker to Claude Desktop</title>
      <dc:creator>Ali Raza</dc:creator>
      <pubDate>Thu, 16 Jul 2026 07:21:50 +0000</pubDate>
      <link>https://dev.to/ali_raza_1ce2540f37e01a91/building-and-deploying-a-remote-mcp-server-lessons-from-connecting-an-expense-tracker-to-claude-2f4o</link>
      <guid>https://dev.to/ali_raza_1ce2540f37e01a91/building-and-deploying-a-remote-mcp-server-lessons-from-connecting-an-expense-tracker-to-claude-2f4o</guid>
      <description>&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%2Fy1wllebkn7lgah0m0dmx.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%2Fy1wllebkn7lgah0m0dmx.png" alt=" " width="800" height="729"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;The Problem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Personal finance tracking usually means switching between an app, a spreadsheet, or a browser tab just to log a single transaction. I wanted a lower-friction way to capture and query expenses — ideally through natural conversation with an AI assistant, without giving up structured storage or control over my own data.&lt;/p&gt;

&lt;p&gt;The Model Context Protocol (MCP) made this possible: it lets an AI client like Claude Desktop call tools exposed by a server I own and control, over a standard interface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Solution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I built and deployed a remote MCP server that exposes an expense tracker as a set of callable tools, then connected it directly to Claude Desktop as a live data source.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stack and architecture:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;FastMCP to define and expose tools (add_expense, get_summary, list_transactions, category management) over the MCP protocol&lt;br&gt;
aiosqlite for async-safe database access, migrated from a synchronous sqlite3 connection to avoid blocking calls in an async server&lt;br&gt;
A temporary, writable directory (via Python's tempfile) for database storage, since the deployment target does not guarantee a writable path at a fixed location&lt;br&gt;
Deployed remotely on Horizon, then registered as a connector in Claude Desktop's configuration&lt;/p&gt;

&lt;p&gt;The repository is public here: github.com/AliRaza3485/test-remote-mcp-server&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problems Along the Way&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Two issues took real debugging time and aren't well covered in introductory MCP material:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Locating the client configuration on Windows.&lt;/strong&gt;&lt;br&gt;
Claude Desktop on Windows is distributed as an MSIX package — Microsoft's sandboxed app packaging format, similar in spirit to how Android isolates APKs. MSIX apps don't write to the file paths a normal Windows install would use; the OS virtualizes the path so the app sees what looks like a standard location, while the actual file lives in an isolated, package-specific directory. This meant the config file wasn't where standard documentation implied — finding the correct sandboxed path required checking the MSIX virtualization behavior directly rather than trusting the "expected" path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. OAuth handling beyond the basics.&lt;/strong&gt;&lt;br&gt;
Most MCP quick-start guides demonstrate local, tool-only servers with no external authentication. As soon as a server needs to authorize against an external service, the flow requires handling the redirect, exchanging the returned code for a token, storing it safely, and refreshing it when it expires — none of which the beginner-level guides walk through. Getting this right meant working from the OAuth spec directly rather than a tutorial.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Outcome&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The result is a working setup where a plain-language instruction in Claude Desktop — for example, logging an expense with an amount and category — is routed through MCP to the deployed server and persisted in the database, with no separate app or manual form involved.&lt;/p&gt;

&lt;p&gt;More importantly, building this end-to-end (real deployment, real client integration, real platform-specific failure modes) surfaced problems that toy examples don't: packaging quirks, async database access, and authentication lifecycle management.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's Next&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'm currently extending this into more general agentic workflows using LangGraph — state graphs, checkpointing, and human-in-the-loop interrupts — with the goal of combining stateful agent logic with MCP-exposed tools.&lt;/p&gt;

&lt;p&gt;If you're building with MCP or LangGraph and want to compare notes, I'd welcome the conversation.&lt;/p&gt;

&lt;p&gt;GitHub: github.com/AliRaza3485&lt;br&gt;
Repo: github.com/AliRaza3485/test-remote-mcp-server&lt;/p&gt;

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