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

README.md

Markdown109 lines3.6 KB

GitHub ↗

pudu-lang-mcp

Pudu

Pudu | Documentation | MCP specification | Contributing

A Model Context Protocol server for writing Pudu. It gives any MCP client the Pudu language documentation, the API reference of the installed standard library and packages, and the compiler's own answers: diagnostics, formatting, lint findings, confined runs, tests, and language-server questions such as hover, definition, references, and completion.

Powered by Pudu: the server is itself a Pudu program and a Pudu package, @chrismichaelps/pudu-lang-mcp.

Tools

AreaTools
Documentationpudu_docs_search, pudu_docs_read
API referencepudu_reference_search, pudu_module_reference
Compilerpudu_check, pudu_format, pudu_lint, pudu_run, pudu_test
Language serverpudu_hover, pudu_definition, pudu_references, pudu_completion, pudu_signature_help, pudu_code_actions, pudu_rename_preview, pudu_document_symbols, pudu_workspace_symbols
Toolchainpudu_toolchain

Code is passed inline as source, or as a path inside the workspace. Positions are 1-based. pudu_run always runs confined: no files, processes, network, or foreign code. Nothing writes to the workspace.

The documentation is also offered as resources (pudu://docs/<chapter>, pudu://examples/<name>, and more), each module's reference as pudu://reference/{module}, and four prompts for writing, fixing, reviewing, and explaining Pudu code.

The server speaks MCP 2026-07-28 per request and the initialize handshake of 2025-11-25, 2025-06-18, 2025-03-26, and 2024-11-05, over stdio.

Installing

It needs Pudu 0.1.1 or later on PATH.

git clone https://github.com/chrismichaelps/pudu-lang-mcp
cd pudu-lang-mcp
pudu build src/Main.pudu -o pudu-lang-mcp

Register the executable with your MCP client as a stdio server. Most clients read a configuration of this shape:

{
  "mcpServers": {
    "pudu": {
      "command": "/path/to/pudu-lang-mcp",
      "env": { "PUDU_MCP_ROOT": "/path/to/your/project" }
    }
  }
}
VariableMeaningDefault
PUDU_MCP_ROOTThe workspace that path arguments must stay insidethe directory the server starts in
PUDU_BINThe pudu executable to usethe first pudu on PATH
PUDU_LIBThe standard library to read the reference fromthe one installed beside pudu

As a package

The server is also the package @chrismichaelps/pudu-lang-mcp. Every module it ships is under PuduLangMcp, so it never takes a module name from the program that installs it:

pudu install @chrismichaelps/pudu-lang-mcp
module Main

import PuduLangMcp

fn main() -> Int {
  PuduLangMcp.serve()
}

Developing

pudu test test                          # unit, application, and end-to-end suites
pudu run tools/Mutate.pudu --every 3 --threshold 100  # pull-request mutation gate
pudu fmt --check src test tools && pudu lint src test tools

Before a release, run the full mutation pass with pudu run tools/Mutate.pudu --threshold 100.

The design lives in the wiki vault: one page per source file, the decisions behind the protocol and toolchain choices, and the Pudu grammar rules the code follows.

License

Apache License 2.0.