Skip to main content
Glama
Alexcs24

Medusa.js Documentation MCP Server

by Alexcs24

šŸš€ Medusa.js Documentation MCP Server

A powerful Model Context Protocol (MCP) server that gives your AI assistants instant access to comprehensive Medusa.js v2 documentation with smart search capabilities and real-time assistance for enhanced development workflow.

šŸ“… Latest Documentation: September 2025 | šŸ“Š Coverage: 2,105+ sections | šŸ“¦ Size: 4.7MB

✨ Key Features

šŸŽÆ Feature

šŸ“ Description

šŸš€ Benefits

šŸ” Smart Search

Fuzzy search through 2,105+ documentation sections

Find answers even with partial or inexact queries

šŸ“– Precise Retrieval

Get exact sections by title or path

Access specific documentation instantly

šŸ“‹ Complete Browsing

List all available sections with filtering

Discover new features and capabilities

⚔ Lightning Fast

TypeScript-powered with optimized performance

Instant responses, no delays

šŸ“¦ Zero Setup

Documentation included, no external dependencies

Works out-of-the-box

šŸ”„ Real-time

Always up-to-date Medusa v2 documentation

Latest features and best practices

Related MCP server: Next.js Docs MCP

šŸ“‹ Prerequisites

šŸ›  Installation

1. Clone and Setup

# Clone the repository
git clone https://github.com/Alexcs24/Medusa.js-Documentation-MCP-Server
cd Medusa.js-Documentation-MCP-Server

# Install dependencies
npm install

# Build the TypeScript code
npm run build

2. Documentation Ready!

āœ… No additional setup needed! The repository includes comprehensive Medusa.js v2 documentation (4.7MB, September 2025) located at ./docs/medusa-docs.txt.

Optional: Use your own documentation file:

# Replace with your own documentation if needed
export MEDUSA_DOCS_PATH="/absolute/path/to/your/custom-docs.txt"

3. Configure Your AI Assistant

🟢 Claude Code CLI āœ… Tested & Working

Global Configuration (recommended):

# Create or edit global config
nano ~/.claude/claude_code_config.json

Add this configuration:

{
  "mcpServers": {
    "medusa-docs": {
      "command": "node",
      "args": ["/absolute/path/to/Medusa.js-Documentation-MCP-Server/dist/index.js"],
      "env": {
        "MEDUSA_DOCS_PATH": "/absolute/path/to/Medusa.js-Documentation-MCP-Server/docs/medusa-docs.txt"
      }
    }
  }
}

Project-specific Configuration:

# In your Medusa project root
mkdir -p .claude
cp claude_code_config.json .claude/mcp.json
# Edit paths to be relative to your project

Cursor IDE

Add to your Cursor settings (settings.json):

{
  "mcp": {
    "mcpServers": {
      "medusa-docs": {
        "command": "node",
        "args": ["/absolute/path/to/Medusa.js-Documentation-MCP-Server/dist/index.js"],
        "env": {
          "MEDUSA_DOCS_PATH": "/absolute/path/to/docs/medusa-docs.txt"
        }
      }
    }
  }
}

Windsurf

Create or edit windsurf-mcp-config.json:

{
  "mcpServers": {
    "medusa-docs": {
      "command": "node",
      "args": ["/absolute/path/to/Medusa.js-Documentation-MCP-Server/dist/index.js"],
      "env": {
        "MEDUSA_DOCS_PATH": "/absolute/path/to/docs/medusa-docs.txt"
      }
    }
  }
}

šŸŽÆ Usage & Natural Language Examples

After configuration, restart your AI assistant and interact using natural language:

šŸ” Smart Search Examples

šŸ’¬ "Search Medusa docs for payment providers"
šŸ’¬ "Find information about workflows in Medusa"
šŸ’¬ "Look up cart module documentation"
šŸ’¬ "How do I implement custom shipping methods?"
šŸ’¬ "Show me authentication examples"

šŸ“– Specific Section Retrieval

šŸ’¬ "Get the section about API routes"
šŸ’¬ "Show me the modules documentation"
šŸ’¬ "Retrieve workflow examples"
šŸ’¬ "I need the admin customization guide"
šŸ’¬ "Display the product catalog setup"

šŸ“‹ Browse Available Content

šŸ’¬ "List all available documentation sections"
šŸ’¬ "Show me categories in the docs"
šŸ’¬ "What documentation sections are available?"
šŸ’¬ "Browse workflow-related documentation"
šŸ’¬ "What payment integrations are documented?"

🌟 Advanced Usage Patterns

šŸ’¬ "Compare different payment providers in Medusa"
šŸ’¬ "Walk me through setting up a complete e-commerce store"
šŸ’¬ "What's the difference between modules and plugins?"
šŸ’¬ "Show me step-by-step workflow implementation"

šŸ”§ Available MCP Tools

The MCP server provides 3 powerful tools to access Medusa.js documentation:

šŸ” 1. search_docs - Smart Documentation Search

What it does: Intelligently searches through 2,105+ documentation sections using fuzzy matching Perfect for: Finding relevant information when you don't know the exact section name

Parameters:

  • query (string, required): Your search query

  • limit (number, optional): Maximum results to return (default: 5)

✨ Example Usage:

{
  "name": "search_docs",
  "arguments": {
    "query": "workflow payment providers",
    "limit": 3
  }
}

Returns: Workflow Engine Module, timeout configurations, and In-Memory workflow setup


šŸ“– 2. get_section - Precise Section Retrieval

What it does: Fetches exact documentation sections by title or path Perfect for: Getting detailed information about a specific topic you know exists

Parameters:

  • identifier (string, required): Exact section title or path

✨ Example Usage:

{
  "name": "get_section",
  "arguments": {
    "identifier": "Debug Workflows"
  }
}

Returns: Complete section content with debugging approaches and techniques


šŸ“‹ 3. list_sections - Browse All Available Content

What it does: Lists all 2,105+ available documentation sections Perfect for: Discovering what documentation is available or browsing by category

Parameters:

  • category (string, optional): Filter sections by specific category

✨ Example Usage:

{
  "name": "list_sections",
  "arguments": {
    "category": "workflows"
  }
}

Returns: Complete list of workflow-related documentation sections


šŸš€ Real-World Usage Examples

Scenario 1: "How do I set up payments in Medusa?"

  1. Use search_docs with query "payment setup"

  2. Get relevant sections about payment modules and providers

  3. Use get_section to dive deep into specific payment provider setup

Scenario 2: "What workflow features are available?"

  1. Use list_sections with category "workflows"

  2. Browse available workflow documentation

  3. Use get_section to read specific workflow implementation guides

Scenario 3: "I need help with cart functionality"

  1. Use search_docs with query "cart module"

  2. Find cart-related sections and APIs

  3. Access detailed cart implementation examples

🚧 Development

Scripts

# Development server with hot reload
npm run dev

# Watch mode (auto-restart on changes)
npm run watch

# Build TypeScript
npm run build

# Start production server
npm run start

Testing

Test the MCP server manually:

# Start the server
node dist/index.js

# In another terminal, send MCP requests
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | node dist/index.js

Debug Mode

# Enable debug logging
DEBUG=1 node dist/index.js

# Or with environment variables
MEDUSA_DOCS_PATH="/path/to/docs.txt" DEBUG=1 node dist/index.js

šŸ“ Project Structure

Medusa.js-Documentation-MCP-Server/
ā”œā”€ā”€ src/
│   └── index.ts              # Main MCP server implementation
ā”œā”€ā”€ dist/                     # Compiled JavaScript (auto-generated)
ā”œā”€ā”€ docs/
│   └── medusa-docs.txt       # Complete Medusa v2 docs (4.7MB, Sep 2025)
ā”œā”€ā”€ config.json               # Server configuration settings
ā”œā”€ā”€ example-docs.txt          # Example documentation format
ā”œā”€ā”€ claude_code_config.json   # Example Claude Code config
ā”œā”€ā”€ package.json              # Node.js dependencies
ā”œā”€ā”€ tsconfig.json            # TypeScript configuration
ā”œā”€ā”€ .gitignore               # Git ignore rules
ā”œā”€ā”€ LICENSE                  # MIT License
└── README.md                # This file

āš™ļø Configuration

All server settings can be customized in config.json:

{
  "searchDefaults": {
    "maxResults": 5,           // Default number of search results
    "threshold": 0.4,          // Search sensitivity (0-1, lower = more strict)
    "minMatchCharLength": 3    // Minimum characters for search matching
  },
  "listDefaults": {
    "maxSections": 50          // Maximum sections shown in list_sections
  },
  "server": {
    "name": "medusa-docs-mcp",
    "version": "1.0.0"
  },
  "documentation": {
    "previewLength": 500,      // Length of content preview in search results
    "fallbackPaths": [         // Paths to search for documentation file
      "docs/medusa-docs.txt",
      "llms-full.txt",
      "../llms-full.txt",
      "../../llms-full.txt",
      "/home/claude/llms-full.txt"
    ]
  }
}

šŸ”§ Customize Your Settings

  • More search results: Increase searchDefaults.maxResults

  • Stricter search: Lower searchDefaults.threshold (0.2 = very strict, 0.8 = very loose)

  • Longer previews: Increase documentation.previewLength

  • More list items: Increase listDefaults.maxSections

šŸ”’ Environment Variables

  • MEDUSA_DOCS_PATH: Absolute path to your documentation file

  • DEBUG: Enable debug logging (set to 1 or true)

šŸ› Troubleshooting

Server not found

  1. Restart your AI assistant after configuration changes

  2. Check that file paths are absolute, not relative

  3. Verify the dist/index.js file exists (run npm run build)

Documentation not loading

  1. Verify MEDUSA_DOCS_PATH points to the correct file

  2. Check file permissions (should be readable)

  3. Ensure the file exists and is not empty

Permission errors

# Fix file permissions
chmod 644 /path/to/docs/medusa-docs.txt
chmod +x /path/to/Medusa.js-Documentation-MCP-Server/dist/index.js

Debug connection issues

# Test MCP server manually
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | MEDUSA_DOCS_PATH="/path/to/docs.txt" node dist/index.js

Check your AI assistant's MCP logs:

  • Claude Code CLI: View → Output → MCP logs

  • Cursor IDE: Developer Tools → Console

  • Windsurf: Check extension logs in developer tools

šŸ¤ Contributing

  1. Fork the repository

  2. Create a feature branch (git checkout -b feature/amazing-feature)

  3. Make your changes

  4. Update configuration in config.json if needed

  5. Build and test (npm run build)

  6. Commit your changes (git commit -m 'Add amazing feature')

  7. Push to the branch (git push origin feature/amazing-feature)

  8. Open a Pull Request

šŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

šŸ™ Acknowledgments

šŸ“ž Support


⭐ Star this repo if it helps your Medusa development workflow!

Available Tools

3 tools
get_sectionB

Get a specific documentation section by title or path

ParametersJSON Schema
NameRequiredDescriptionDefault
identifierYesSection title or path to retrieve

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must convey behavioral traits. It merely states the action without mentioning whether it's read-only, what is returned, or any prerequisites like authentication.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence with no wasted words. However, it could be more informative while remaining concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While the tool is simple and has one parameter, the lack of an output schema means the description should clarify what is returned. It does not, leaving some ambiguity about the response format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the parameter description already states 'Section title or path to retrieve'. The tool description adds no extra meaning beyond this, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Get') and resource ('documentation section') along with the method ('by title or path'). It clearly distinguishes from siblings like 'list_sections' and 'search_docs'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives, such as 'list_sections' or 'search_docs'. The description implies use when the identifier is known, but lacks explicit context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_sectionsB

List all available documentation sections

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryNoFilter sections by category (optional)

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but only states 'List all...'. It fails to mention that the operation is read-only, any authentication requirements, potential side effects, or whether results are paginated. This is insufficient for safe invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is a single, direct sentence with no wasted words. It is front-loaded and immediately actionable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While the core purpose is covered, the description omits details about the output format, ordering, pagination, or how this listing interacts with sibling tools. For a simple tool this may suffice, but more context would improve reliability.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema fully describes the single parameter 'category' with a clear description. The tool description adds nothing beyond what the schema provides, earning the baseline score for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description explicitly states 'List all available documentation sections' – a clear verb+resource combination. The tool name 'list_sections' is distinct from siblings 'get_section' (single section) and 'search_docs' (keyword search), making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like get_section or search_docs. The agent must infer from tool names only; explicit advice on use cases or exclusions is missing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_docsB

Search Medusa.js documentation for specific topics

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query for finding relevant documentation
limitNoMaximum number of results to return (default: 5)

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully bears the burden of behavioral disclosure. It only states the basic action of searching, but omits traits such as whether the operation is read-only, what format results are returned in (e.g., snippets, links), or any rate limits. The description is insufficient for an agent to understand the tool's behavior beyond the core action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no wasted words, achieving high conciseness. However, it is slightly underspecified and could incorporate more information without losing brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity (2 parameters, no output schema, no annotations), the description provides the minimum viable information. It tells the agent what the tool does, but lacks details about the return value format, the scope of documentation searched, or any behavioral expectations. This is adequate but leaves gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters ('query', 'limit') having descriptions. The tool description adds no additional meaning beyond the schema, so baseline 3 is appropriate. No further value is provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Search', the resource 'Medusa.js documentation', and the purpose 'for specific topics'. It distinguishes from sibling tools 'get_section' and 'list_sections' which focus on retrieving specific sections or lists, not full-text search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool vs alternatives. It does not mention any exclusions, prerequisites, or context for when searching is appropriate compared to using get_section or list_sections.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • First observedget_section
    • First observedlist_sections
    • First observedsearch_docs

TDQS

A3.7/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: listing sections, retrieving a specific section, and searching content. No overlap exists.

Naming Consistency5/5

All tools follow a consistent verb_noun snake_case pattern (get_section, list_sections, search_docs), making naming predictable.

Tool Count5/5

3 tools is well-scoped for a documentation server, covering essential operations without being too few or excessive.

Completeness4/5

The set covers listing, retrieving, and searching documentation, leaving minor gaps like filtering or navigation structure.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers