GroupDocs.Markdown.Mcp
AGENTS.md0 starsChanged 3 months agoMITView on GitHub
Brief orientation for AI coding agents (Claude Code, Copilot, Cursor, Aider, Amp, Codex) working in this repository. A standalone MCP server for GroupDocs.Markdown for .NET — exposes document-to-Markdown conversion as AI-callable tools via the Model Context Protocol. Published to NuGet as GroupDocs.Markdown.Mcp with the McpServer package type, and to ghcr.io/groupdocs-markdown/markdown-net-mcp + docker.io/groupdocs/markdown-net-mcp as a container image. Both tools accept FileInput (resolved via IFileResolver) and an optional password for protected documents. No ComposeFromMarkdown tool. Reverse Markdown → document composition (MarkdownConverter.FromMarkdownString) throws…
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 104
Do not hardcode the version in .csproj — it flows from $(GroupDocsMarkdownMcp) in dependencies.props.
- Very specific: line 105
Do not remove the <PackageType>McpServer</PackageType> or <ToolCommandName>groupdocs-markdown-mcp</ToolCommandName> from the csproj — …
- Very specific: line 106
Do not change the .mcp/server.json schema URL without cross-checking with the NuGet MCP docs.
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — Guide for AI coding agents
Brief orientation for AI coding agents (Claude Code, Copilot, Cursor, Aider, Amp, Codex) working in this repository.
What this repo is
A standalone MCP server for GroupDocs.Markdown for .NET — exposes document-to-Markdown conversion as AI-callable tools via the Model Context Protocol.
Published to NuGet as GroupDocs.Markdown.Mcp with the McpServer package type, and to ghcr.io/groupdocs-markdown/markdown-net-mcp + docker.io/groupdocs/markdown-net-mcp as a container image.
MCP tools exposed
| Tool | Description |
ConvertToMarkdown | Convert a document (PDF, DOCX, XLSX, EPUB, MOBI, …) to clean, structured Markdown; save the .md to storage and return the content inline. Supports images (base64/file/skip), pages, frontMatter, flavor. |
GetDocumentInfo | Return file format, page count, title, author, and encryption flag as JSON, without converting. |
Both tools accept FileInput (resolved via IFileResolver) and an optional password for protected documents.
No
ComposeFromMarkdowntool. Reverse Markdown → document composition (MarkdownConverter.FromMarkdownString) throwsNotImplementedExceptionin GroupDocs.Markdown 26.3.0 — so the server does not advertise the reverse direction. When the engine ships reverse conversion, add aComposeFromMarkdownTool+ unit test + integration test together (the framework subproject already has a scaffold to port from).
Folder layout
src/ ← all projects + sln + Directory.Build.props
GroupDocs.Markdown.Mcp/
Program.cs ← host bootstrap + stdio transport
MarkdownLicenseManager.cs ← applies GroupDocs.Total license
Tools/
ConvertToMarkdownTool.cs ← [McpServerTool] — ConvertToMarkdown
GetDocumentInfoTool.cs ← [McpServerTool] — GetDocumentInfo
.mcp/
server.json ← NuGet.org reads this to generate mcp.json snippet
GroupDocs.Markdown.Mcp.csproj ← PackageType=McpServer + ToolCommandName
GroupDocs.Markdown.Mcp.Tests/ ← xUnit unit tests (Moq)
GroupDocs.Markdown.Mcp.sln
Directory.Build.props
build/
dependencies.props ← single source of truth for all versions
changelog/ ← one MD file per change (see changelog/README.md)
docker/
Dockerfile ← multi-stage, runtime on aspnet:10.0
docker-compose.yml
.github/workflows/ ← build_packages.yml, run_tests.yml, publish_prod.yml, publish_docker.ymlDependencies
GroupDocs.Mcp.Core+GroupDocs.Mcp.Local.Storage— infrastructure NuGet packages from the GroupDocs.Mcp.Core repoGroupDocs.Markdown— the actual document-to-Markdown conversion engineSkiaSharp.NativeAssets.Linux.NoDependencies— self-contained native asset for image-bearing conversions on LinuxModelContextProtocol— MCP SDK for .NETMicrosoft.Extensions.Hosting— host builder for the stdio server
Commands you can run
# Restore + build
dotnet restore
dotnet build src/GroupDocs.Markdown.Mcp.sln -c Release
# Run tests
dotnet test src/GroupDocs.Markdown.Mcp.sln -c Release
# Run the server locally (stdio)
dotnet run --project src/GroupDocs.Markdown.Mcp
# Local pack (writes to ./build_out) — validates server.json version matches dependencies.props
pwsh ./build.ps1
# Build + run the Docker image
docker build -f docker/Dockerfile -t markdown-net-mcp:local .
docker run --rm -i -v $(pwd)/documents:/data markdown-net-mcp:localVersion scheme
CalVer YY.MM.N. The version lives in two places that MUST stay in lockstep:
build/dependencies.props→<GroupDocsMarkdownMcp>src/GroupDocs.Markdown.Mcp/.mcp/server.json→ both top-level"version"andpackages[0].version
build.ps1 enforces this at pack time (Assert-ServerJsonVersionMatchesDependencies) — if they drift, the build fails.
House rules
- Tools must have rich
[Description("...")]strings — these are what AI agents read via the MCP protocol. Write them as task-oriented sentences, not method-signature summaries. - Never add new env vars beyond
GROUPDOCS_MCP_STORAGE_PATH,GROUPDOCS_MCP_OUTPUT_PATH,GROUPDOCS_LICENSE_PATHwithout updatingserver.json,docker-compose.yml, andREADME.mdtogether. - Tests use xUnit + Moq — mock
IFileResolver,IFileStorage,ILicenseManager,OutputHelper. - Changelog entries required — any PR that changes behaviour adds
changelog/NNN-slug.md. - Do not edit
obj/orbuild_out/— build artifacts. - Target framework is
net10.0only — required bydnxand the MCP SDK.
Release flow
See RELEASE.md for the exact per-release checklist.
What NOT to change
- Do not hardcode the version in
.csproj— it flows from$(GroupDocsMarkdownMcp)independencies.props. - Do not remove the
<PackageType>McpServer</PackageType>or<ToolCommandName>groupdocs-markdown-mcp</ToolCommandName>from the csproj — NuGet.org discoverability anddnxinvocation depend on them. - Do not change the
.mcp/server.jsonschema URL without cross-checking with the NuGet MCP docs.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- llms.txtllms.txt
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

