Thanks for considering a contribution. A few ground rules that keep the codebase maintainable:
This repository is intentionally small. Before adding code, please skim the Architecture section of README.md. The key invariants:
InvoiceXml.Mcp.Coreknows nothing about authentication. Credentials are attached by the host via anHttpClientDelegatingHandler. If you find yourself adding anApiKeyproperty toInvoiceXmlClientOptions, stop.- Adding a tool means adding one method on
IInvoiceXmlClientand one[McpServerTool]class. No changes to wiring, no edits toProgram.cs. - Adding an auth mode means adding one arm to
AuthExtensions.AddHostAuthand one folder underHost/Auth/<Mode>/. No edits to Core. - Folder convention: in every
InvoiceXml.*class library, contracts live inInterfaces/and implementations inServices/. The folder mirrors the namespace. - No secrets, ever, in any committed file. That includes
appsettings.Development.json(gitignored),.env*files, and any sample config in docs.
# Set up your local API key once (kept outside the repo):
dotnet user-secrets --project src/InvoiceXml.Mcp.Host set "Mcp:ApiKey:Value" "<your key>"
# Build + run tests
dotnet build
dotnet test
# Run the host
dotnet run --project src/InvoiceXml.Mcp.HostAdd or upgrade dependencies in Directory.Packages.props (central package
management) — never in individual .csproj files.
.editorconfig is authoritative. TreatWarningsAsErrors is on; analyzer
warnings must be fixed, not suppressed. Prefer file-scoped namespaces and
expression-bodied members where they're clearer.
- One concern per PR. Refactors and feature work go in separate PRs.
InvoiceXml.Mcp.Coreis consumed in-repo by the host via ProjectReference; treat its public surface as a stable contract and flag any breaking change in the PR description.- Tests are required for new functionality.