<?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: Catalunya 2022</title>
    <description>The latest articles on DEV Community by Catalunya 2022 (@catalunya2022).</description>
    <link>https://dev.to/catalunya2022</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3873837%2Fcd5d5d6e-e773-4db5-ba03-6565d333fa86.png</url>
      <title>DEV Community: Catalunya 2022</title>
      <link>https://dev.to/catalunya2022</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/catalunya2022"/>
    <language>en</language>
    <item>
      <title>How we turned a 91-action Catalan civic policy document into a remote MCP server</title>
      <dc:creator>Catalunya 2022</dc:creator>
      <pubDate>Sat, 11 Apr 2026 17:16:21 +0000</pubDate>
      <link>https://dev.to/catalunya2022/how-we-turned-a-91-action-catalan-civic-policy-document-into-a-remote-mcp-server-h4e</link>
      <guid>https://dev.to/catalunya2022/how-we-turned-a-91-action-catalan-civic-policy-document-into-a-remote-mcp-server-h4e</guid>
      <description>&lt;p&gt;In 2021, a task force of 30 Catalan experts published &lt;em&gt;Catalunya 2022 - RESET: Crida per reactivar el país&lt;/em&gt; — a strategic action plan for Catalonia's future, structured across 3 spheres, 12 goals, and 91 concrete actions. The document was the product of nearly 400 collaborators and over 1,400 citizen proposals, developed above party lines.&lt;/p&gt;

&lt;p&gt;Five years later, we wanted to make this document queryable by any AI assistant, expand it from the static PDF file and make it accessible as structured data through the &lt;a href="https://modelcontextprotocol.io" rel="noopener noreferrer"&gt;Model Context Protocol (MCP)&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The result is a remote MCP server at &lt;a href="https://2022.cat/mcp" rel="noopener noreferrer"&gt;mcp.2022.cat&lt;/a&gt; that any MCP-compatible client can connect to in seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the server exposes
&lt;/h2&gt;

&lt;p&gt;The document is available in three languages (Catalan, English, Spanish) through four tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;search_document&lt;/code&gt;&lt;/strong&gt; — full-text search across all content with locale filtering&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;get_section&lt;/code&gt;&lt;/strong&gt; — retrieve any sphere, goal, or action by its canonical slug&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;get_document_metadata&lt;/code&gt;&lt;/strong&gt; — the complete document hierarchy with titles and counts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;list_proposals&lt;/code&gt;&lt;/strong&gt; — list all 91 actions, filterable by sphere or goal&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every tool accepts a &lt;code&gt;locale&lt;/code&gt; parameter (&lt;code&gt;ca&lt;/code&gt;, &lt;code&gt;en&lt;/code&gt;, or &lt;code&gt;es&lt;/code&gt;). Default is Catalan.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it now
&lt;/h2&gt;

&lt;p&gt;No API keys, no authentication. Just add this to your MCP client config:&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;"mcpServers"&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;"catalunya-2022"&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;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://mcp.2022.cat"&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;Or with Claude Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add &lt;span class="nt"&gt;--transport&lt;/span&gt; http catalunya-2022 https://mcp.2022.cat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then ask it something:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;"Quins són els objectius de l'àmbit 2?"&lt;/em&gt; (Catalan)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;"List all actions related to housing"&lt;/em&gt; (English)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;"Resume la esfera de Sociedad Justa"&lt;/em&gt; (Spanish)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How it's built
&lt;/h2&gt;

&lt;p&gt;The server is built with TypeScript using the official &lt;a href="https://github.com/modelcontextprotocol/sdk" rel="noopener noreferrer"&gt;MCP SDK&lt;/a&gt;, Express, and &lt;a href="https://github.com/nextapps-de/flexsearch" rel="noopener noreferrer"&gt;FlexSearch&lt;/a&gt; for full-text search with diacritic support (important for Catalan and Spanish).&lt;/p&gt;

&lt;p&gt;The content pipeline works like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The original document lives as MDX files in three parallel directory trees (&lt;code&gt;content/ca/&lt;/code&gt;, &lt;code&gt;content/en/&lt;/code&gt;, &lt;code&gt;content/es/&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;A build script processes the MDX into a single &lt;code&gt;corpus.json&lt;/code&gt; — a pre-built index of all sections, titles, identifiers, and body text&lt;/li&gt;
&lt;li&gt;At startup, the server loads &lt;code&gt;corpus.json&lt;/code&gt; into memory and builds FlexSearch indexes with &lt;code&gt;LatinBalance&lt;/code&gt; charset encoding for proper diacritic handling&lt;/li&gt;
&lt;li&gt;Every MCP tool query runs against this in-memory corpus — no database, no file I/O at runtime&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The server runs as a Streamable HTTP endpoint (stateless, one transport per request) behind Nginx on a VPS.&lt;/p&gt;

&lt;h2&gt;
  
  
  The document structure
&lt;/h2&gt;

&lt;p&gt;The corpus follows a strict hierarchy that maps directly to the MCP tools:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3 Spheres
  Sphere 1: Fair Society (Goals 1-4)
  Sphere 2: Economy (Goals 5-8)
  Sphere 3: Public Sector (Goals 9-12)
    Each goal contains 4-12 actions
      91 actions total
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Plus static pages: introduction, executive summary, and the "train of prosperity" framework.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to find it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="https://2022.cat" rel="noopener noreferrer"&gt;2022.cat&lt;/a&gt; — the full trilingual document with 444 pages&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP endpoint:&lt;/strong&gt; &lt;a href="https://mcp.2022.cat" rel="noopener noreferrer"&gt;mcp.2022.cat&lt;/a&gt; — connect any MCP client&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP info page:&lt;/strong&gt; &lt;a href="https://2022.cat/mcp" rel="noopener noreferrer"&gt;2022.cat/mcp&lt;/a&gt; — setup instructions for every major client&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Official MCP Registry:&lt;/strong&gt; &lt;a href="https://registry.modelcontextprotocol.io/v0.1/servers?search=catalunya" rel="noopener noreferrer"&gt;cat.2022/catalunya-2022&lt;/a&gt; — listed on the official registry&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zenodo DOI:&lt;/strong&gt; &lt;a href="https://doi.org/10.5281/zenodo.19500831" rel="noopener noreferrer"&gt;10.5281/zenodo.19500831&lt;/a&gt; — citable academic deposit with the trilingual PDFs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ChatGPT Custom GPT:&lt;/strong&gt; &lt;a href="https://chatgpt.com/g/g-69b11fba75588191b031e6311036a470-catalunya-2022" rel="noopener noreferrer"&gt;Catalunya 2022 on GPT Store&lt;/a&gt; — also available for ChatGPT users&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source code:&lt;/strong&gt; &lt;a href="https://github.com/Catalunya-2022/mcp" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why MCP for a policy document?
&lt;/h2&gt;

&lt;p&gt;Policy documents are traditionally static, usually published as PDFs, maybe summarized in a press release, then forgotten. Making one queryable via MCP means any AI assistant can search, analyze, and cite specific proposals on demand. A researcher can ask "what does Catalunya 2022 propose about renewable energy?" and get the exact action text in three languages, with the canonical slug to link back to the source.&lt;/p&gt;

&lt;p&gt;This is a small experiment in making civic policy AI-native and making it accessible where people already work.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Catalunya 2022 - RESET: Crida per reactivar el país, was created by a task force of 30 experts convened in 2020, with input from nearly 400 collaborators and over 1,400 citizen proposals. The full document is available at &lt;a href="https://2022.cat" rel="noopener noreferrer"&gt;2022.cat&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

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