Pudu programming language
Menu
Package

@chrismichaelps / pudu-lang-mcp

Model Context Protocol server for Pudu language documentation and compiler tools

0.1.1Apache-2.01

InstallClose

_MOC.md

Markdown55 lines2.3 KB

GitHub ↗

Architecture


type: moc tags: [moc, architecture] aliases: [Architecture]


Shape

One process, one stdio connection, one message per line. Main reads a line, hands it to [[src/PuduLangMcp/App/Dispatch|Dispatch]] with the current [[domain/ProtocolEra|session]], writes every reply line it returns, and stops at end of input. Everything between the line and the reply is a pure function except the calls made through the [[seams/Toolchain]] record.

Dependencies point inward, from Main to App, from App to Services and Domain, and from those to the leaf layers:

LayerHoldsMay import
Constants/protocol and server literalsstd only
Errors/typed failures and their wire formConstants, std
Utils/small pure helpers (JSON access, text bounds, URIs)std only
Generated/the documentation corpus, written by tools/SyncDocs.puduDomain types
Domain/pure protocol, catalogue, documentation, and LSP logicUtils, Constants, Errors, Generated
Services/effects: processes, files, environmentDomain, Utils, Constants, Errors
App/use cases that answer one method eachDomain, Services, Utils, Constants, Errors
Maincomposition root and the stdio loopApp, Services

Protocol surface

Dual-era per [[decisions/ADR-0001-dual-era-protocol]]:

  • Modern (2026-07-28): every request carries io.modelcontextprotocol/protocolVersion and io.modelcontextprotocol/clientCapabilities in params._meta. Results carry resultType: "complete" and _meta["io.modelcontextprotocol/serverInfo"]; cacheable results carry ttlMs and cacheScope.
  • Legacy (2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05): initialize fixes the version for the rest of the process; ping answers {}.

Methods: server/discover, initialize, ping (legacy), tools/list, tools/call, resources/list, resources/read, resources/templates/list, prompts/list, prompts/get, completion/complete. Notifications (notifications/initialized, notifications/cancelled) are accepted and never answered.

Pages

  • [[architecture/LANGUAGE]] — the vocabulary every page uses.
  • [[grammar/pudu]] — the language rules the code follows.
  • [[architecture/TESTING]] — the test levels and what each proves.

Referenced by

[[00-INDEX]] · [[grammar/pudu]]