TerraPDF.Mcp
1.0.1
Prefix Reserved
The VS Code MCP server configuration entry cannot be generated because this package does not include a server.json file. Please refer to the package README and the MCP Configuration Guide for proper setup instructions.
dotnet tool install --global TerraPDF.Mcp --version 1.0.1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local TerraPDF.Mcp --version 1.0.1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=TerraPDF.Mcp&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package TerraPDF.Mcp --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
TerraPDF.Mcp
A Model Context Protocol server for TerraPDF. It gives any MCP client two capabilities:
| Tool | Use it to |
|---|---|
create_pdf |
Produce a PDF file from a JSON document description. The document is validated first, and errors come back with JSON paths. |
get_pdf_document_format |
Read the JSON document format and examples. |
get_terrapdf_csharp_guide |
Look up the verified TerraPDF C# API, recipes, and troubleshooting while writing code. |
Run
Requires the .NET 8 SDK or later. With the .NET 10 SDK, no install is needed:
dnx TerraPDF.Mcp --yes
Or install it as a global tool:
dotnet tool install -g TerraPDF.Mcp
terrapdf-mcp
| Setting | Argument | Environment variable | Default |
|---|---|---|---|
| Output directory | --output-dir <path> |
TERRAPDF_OUTPUT_DIR |
./pdf-output |
| Asset directory (image and font paths) | --asset-dir <path> |
TERRAPDF_ASSET_DIR |
working directory |
| Disallow file paths (base64 only) | --no-assets true |
TERRAPDF_NO_ASSETS=1 |
off |
Image and font paths cannot escape the asset directory, and URLs are never fetched.
Client configuration
VS Code / GitHub Copilot (.vscode/mcp.json):
{
"servers": {
"terrapdf": { "type": "stdio", "command": "dnx", "args": ["TerraPDF.Mcp", "--yes"] }
}
}
Cursor (.cursor/mcp.json) and Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"terrapdf": { "command": "dnx", "args": ["TerraPDF.Mcp", "--yes"] }
}
}
Claude Code:
claude mcp add terrapdf -- dnx TerraPDF.Mcp --yes
LangChain / LangGraph (Python) via langchain-mcp-adapters:
from langchain.agents import create_agent
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({
"terrapdf": {"transport": "stdio", "command": "dnx", "args": ["TerraPDF.Mcp", "--yes"],
"env": {"TERRAPDF_OUTPUT_DIR": "./reports"}},
})
tools = await client.get_tools()
agent = create_agent(model, tools) # model: any LangChain chat model with tool calling
await agent.ainvoke({"messages": [{"role": "user", "content": "Create a one-page PDF summary of Q3 sales: ..."}]})
LangChain.js uses the same server through @langchain/mcp-adapters.
For in-process .NET agents (Microsoft Agent Framework, Semantic Kernel), use
the TerraPDF.Agents package directly instead of this server.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.