Skip to content
Luz y TaquígrafosThe Diarios de Sesiones of the Congress of Deputies, 1931–1945

luz-mcp · open source · MIT licence

What if you asked an AI assistant?

An AI assistant such as Claude can query the dataset for you. Write the question in your own words: the assistant searches, counts and returns figures, passages and charts.

It does so through an open connector, luz-mcp. MCP is the standard that assistants use to call external tools. It works with Claude, ChatGPT desktop, Cursor, Antigravity, OpenCode and others.

In Claude Code, one line

claude mcp add luz -s user -- uvx luz-mcp

See how to install it

What you can ask

The connector works with the two deposited datasets, Luz y Taquígrafos and Afinidades Elegidas, and links them: from a measure it jumps to the debate where it was defended.

About what was said

  • How often a word or phrase is said, year by year, by legislature or by political family.
  • Which words set two groups apart, with or without the Chair.
  • How much each political family speaks compared with its seats.
  • Passages in context, the whole intervention and the session it comes from.

About who signed with whom

  • The jointly signed measures, who signed them and the debate where they were read.
  • The co-sponsorship network of each legislature: who signs with whom and who bridges parties.
  • How far each party, family or district keeps to itself.
  • Whether the deputies who hold the network together speak differently on the floor.

To take away

  • Networks of words, of people mentioned and of who names whom, over the debates you choose.
  • The series ready for R or Python, its chart and the citation of each dataset with its DOI.
  • A methods note with everything the assistant has run.

Back to contents

Sample questions

Written as you would write them. Under each one, what the assistant does and the connector tool it uses.

  1. ‘How does “agrarian reform” evolve against “public order” between 1931 and 1936?’

    It counts both phrases year by year, relative to everything that was said, and draws one line for each.

    ngram_viewer

  2. ‘Which political families speak more than their seats would suggest in the Constituent Cortes?’

    It compares each family's share of the words with its share of the seats.

    share_of_voice

  3. ‘Which words set the Socialists apart from the conservatives, leaving out the Chair?’

    It compares the vocabulary of both groups and leaves out the turns of whoever presides, which only give the floor.

    distinctive_words

  4. ‘Find the amendments on agrarian matters defended on the floor and show me the debate.’

    It finds the measures by topic and opens each one with the session where it was read and defended.

    search_measures · get_measure

  5. ‘Who bridges parties when signing measures, in each legislature?’

    It computes from the signatures the brokerage roles and the share of co-signatures that cross party lines.

    brokerage_roles · transpartisan_cosigning

  6. ‘Do the deputies who hold the network together speak differently on the floor from those who stay within their party?’

    It gathers the speeches of each network role and compares their vocabulary.

    speech_by_network · distinctive_words

Back to contents

Installing it

You need uv, a free Python installer. There is no code to download: the connector is on PyPI.

Claude Code

claude mcp add luz -s user -- uvx luz-mcp

ChatGPT desktop and Codex

codex mcp add luz -- uvx luz-mcp

Claude Desktop, Cursor, Antigravity, Gemini CLI and most others

{
  "mcpServers": {
    "luz": { "command": "uvx", "args": ["luz-mcp"] }
  }
}

Restart the program after changing its configuration. If the connector does not start, replace uvx with the full path that which uvx returns.

The first time, ask the assistant to download the data. They come from Harvard Dataverse, are checked file by file and are stored on your computer.

The repository README has the configuration for each program, OpenCode included.

See the repository  See the package on PyPI 

Back to contents

Worth knowing

The connector knows the limits of both datasets and states them. These are the ones that most change an answer.

  • It counts and searches; it does not interpret. Reading each result is up to whoever asks.
  • Not everything is speech. Each session's summary, documents read out and votes are set aside to study what was said.
  • There is no sex variable in either dataset: nothing can be broken down by sex.
  • Two sets of party labels. To compare voice and seats, the connector uses those of the Afinidades register, which shares the list of deputies.
  • The network metrics are the published ones. When it computes a measure from the signatures, it says so and explains how.
  • Some signature lists are truncated in the Diario, and those measures lack some ties.

Back to contents

Licence and citation

The code is open, under the MIT licence. If you use an answer in your work, cite each dataset with its DOI; the assistant gives you the citation with the how_to_cite tool.

Every figure it returns can be checked against the Diario. Read the passage in the explorer, or download the dataset and repeat the count.

Open the explorer Download the data