Macroforge MCP Server
Provides tools for validating TypeScript code with @derive decorators, expanding Macroforge macros to show generated code, and accessing Macroforge documentation and macro information.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Macroforge MCP Server validate this TypeScript code with @derive decorators"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@macroforge/mcp-server
MCP server for Macroforge documentation and code analysis
Overview
@macroforge/mcp-server
Macroforge MCP (Model Context Protocol) Server
This module provides the main entry point for the Macroforge MCP server, which enables AI assistants and other MCP clients to access Macroforge documentation, validate code with @derive decorators, and expand macros.
The server communicates over stdio transport and exposes the following tools:
list-sections- List available documentation sectionsget-documentation- Retrieve documentation contentmacroforge-autofixer- Validate TypeScript code with @derive decoratorsexpand-code- Expand Macroforge macros and show generated codeget-macro-info- Get documentation for macros and decorators
@example
# Run the server directly
npx @macroforge/mcp-server
# Or configure in your MCP client settings
{
"mcpServers": {
"macroforge": {
"command": "npx",
"args": ["@macroforge/mcp-server"]
}
}
}Related MCP server: TypeScript LSP MCP
Installation
npm install @macroforge/mcp-serverExamples
# Run the server directly
npx @macroforge/mcp-server
# Or configure in your MCP client settings
{
"mcpServers": {
"macroforge": {
"command": "npx",
"args": ["@macroforge/mcp-server"]
}
}
}Documentation
See the full documentation on the Macroforge website.
License
MIT
Available Tools
5 toolsexpand-codeA
Expands Macroforge macros in TypeScript code and returns the transformed result.
Shows:
The fully expanded TypeScript code with all generated methods
Any diagnostics (errors, warnings, info) with line/column locations
Help text for fixing issues (when available)
Useful for:
Seeing what code the macros generate
Understanding how @derive decorators transform your classes
Debugging macro expansion issues
Inputs: code (required), filename.
get-documentationA
Retrieves full documentation content for Macroforge sections.
Supports flexible search by:
Title (e.g., "Debug", "Vite Plugin")
ID (e.g., "debug", "vite-plugin")
Partial matches
Can accept a single section name or an array of sections. After calling list-sections, analyze the use_cases and fetch ALL relevant sections at once.
Inputs: section (required).
get-macro-infoA
Get documentation for Macroforge macros and decorators.
Returns information about:
Macro descriptions (e.g., Debug, Serialize, Clone)
Decorator documentation (e.g., @serde, @debug field decorators)
Available macro options and configuration
Use without parameters to get the full manifest of all available macros and decorators. Use with a name parameter to get info for a specific macro or decorator.
Inputs: name.
list-sectionsA
Lists all Macroforge documentation sections.
Returns sections with:
title: Section name
use_cases: When this doc is useful (comma-separated keywords)
path: File path
category: Category name
WORKFLOW:
Call list-sections FIRST for any Macroforge-related task
Analyze use_cases to find relevant sections
Call get-documentation with ALL relevant section names
Example use_cases: "setup, install", "serialization, json", "validation, email"
Inputs: no named parameters.
macroforge-autofixerA
Validates TypeScript code with @derive decorators using Macroforge's native validation.
Returns structured JSON diagnostics with:
level: error | warning | info
message: What's wrong
location: Line and column number (when available)
help: Suggested fix (when available)
notes: Additional context (when available)
summary: Count of errors, warnings, and info messages
This tool MUST be used before sending Macroforge code to the user. If require_another_tool_call_after_fixing is true, fix the issues and validate again.
Detects:
Invalid/unknown macro names
Malformed @derive decorators
@serde validator issues (email, url, length, etc.)
Macro expansion failures
Syntax errors in generated code
Inputs: code (required), filename.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose with no overlap: expand-code transforms TypeScript code, get-documentation retrieves documentation content, get-macro-info provides macro/decorator details, list-sections lists documentation sections, and macroforge-autofixer validates code. The descriptions clearly differentiate their functions, making misselection unlikely.
The naming is mostly consistent with a verb_noun pattern (expand-code, get-documentation, get-macro-info, list-sections), but macroforge-autofixer deviates slightly by using a compound noun prefix instead of a verb. This minor inconsistency doesn't significantly hinder readability or predictability.
With 5 tools, this server is well-scoped for its purpose of Macroforge macro handling and documentation. Each tool earns its place by covering distinct aspects like code expansion, documentation retrieval, macro info, section listing, and validation, providing a complete workflow without being overly sparse or bloated.
The tool set offers complete coverage for the Macroforge domain: expand-code handles code transformation, get-documentation and get-macro-info cover documentation needs, list-sections supports discovery, and macroforge-autofixer ensures validation. This covers the full lifecycle from setup and usage to debugging and validation, with no obvious gaps.
Maintenance
Related MCP Connectors
Search @imqueue docs and scaffold typed services & clients from your AI coding agent.
Versioned documentation registry and semantic search for AI tools and coding assistants.
Nifra docs, runnable examples, and API types as an MCP server for any AI assistant.
Docsy gives AI assistants current, version-specific documentation for libraries, frameworks and SDKs. Resolve library IDs and versions, then search and fetch focused official documentation with original source links using five read-only MCP tools. Hosted Streamable HTTP with OAuth 2.1 sign-in.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides AI assistants with access to private React component library documentation, props, and code examples through type-safe TypeScript integration.-
- AlicenseBqualityDmaintenanceExposes TypeScript Language Server Protocol functionality to AI agents, enabling them to query types at specific positions, find definitions and references, get diagnostics, run type tests, and type-check inline code just like in an IDE.9297 npm3MIT
- AlicenseAqualityBmaintenanceEnables AI coding agents to interact with TypeScript projects through compiler-level code intelligence, providing tools for navigation, type information, diagnostics, refactoring, and semantic search.29179 npm4Apache 2.0
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to navigate and edit TypeScript/JavaScript source by named declarations, reading symbols, imports, diagnostics, and replacing code via the TypeScript AST.-