danielnaranjo/magnolia-docs-mcp
If you are the rightful owner of magnolia-docs-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
An MCP server for searching and retrieving information from Magnolia CMS documentation.
Magnolia CMS Documentation MCP Server (unofficial)
An MCP (Model Context Protocol) server that provides tools to search and retrieve information from the official Magnolia CMS documentation.
Overview
This MCP server allows AI assistants and language models to search the Magnolia CMS documentation directly, making it easier to get accurate and up-to-date information about Magnolia CMS features, configuration, and best practices.
Features
- Documentation Search: Search through the official Magnolia CMS documentation
- Structured Results: Returns formatted search results with titles, URLs, and snippets
- MCP Compatible: Works with any MCP-compatible client or AI assistant
Installation
- Clone or download this repository
- Install dependencies:
npm install
Usage
As a Standalone MCP Server
This server is designed to run as an MCP server using the stdio transport. You can test it directly:
node src/main.js
With MCP-Compatible Clients
To use this server with MCP-compatible clients (like Claude Desktop, Continue, or other AI assistants), you need to configure the client to connect to this server.
Example Configuration for Claude Desktop
Add the following to your MCP configuration file (usually ~/.config/claude-desktop/mcp.json or similar):
{
"mcpServers": {
"magnolia-docs": {
"command": "node",
"args": ["/path/to/your/project/src/main.js"],
"cwd": "/path/to/your/project"
}
}
}
Example Configuration for Other MCP Clients
The server can be configured as a stdio-based MCP server in any compatible client. Refer to your client's documentation for specific configuration instructions.
Available Tools
search_magnolia_docs
Searches the official Magnolia CMS documentation for the given query.
Parameters:
query(string, required): The search term or phrase
Returns:
- An array of search results containing:
title: The title of the documentation pageurl: The URL to the documentation pagesnippet: A brief excerpt from the page
Example Usage:
{
"name": "search_magnolia_docs",
"arguments": {
"query": "content types configuration"
}
}
Project Structure
magnolia-docs-mcp/
├── src/main.js # Main MCP server implementation
├── package.json # Project dependencies and metadata
└── README.md # This file
Dependencies
@modelcontextprotocol/sdk: MCP SDK for building MCP serverscheerio: HTML parsing for extracting search resultsnode-fetch: HTTP client for making requests to the documentation site
Development
Modifying Search Behavior
The search functionality is implemented in the search_magnolia_docs tool handler in main.js. You can modify:
- Search URL construction
- HTML parsing selectors (currently uses
.search-result,.title,.snippet) - Number of results returned (currently limited to 5)
- Result formatting
Adding New Tools
To add new tools:
- Add the tool definition to the
ListToolsRequestSchemahandler - Add the tool implementation to the
CallToolRequestSchemahandler - Update this README with the new tool documentation
Testing
You can test the server by running it directly and sending MCP requests via stdio:
node src/main.js
Then send JSON-RPC requests according to the MCP specification.
Error Handling
The server includes error handling for:
- Network failures when accessing the documentation site
- HTML parsing errors
- Invalid tool requests
Errors are returned as MCP error responses with descriptive messages.
License
MIT
Author
Daniel Naranjo
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test your changes
- Submit a pull request
Troubleshooting
Common Issues
- "Module not found" errors: Make sure you've run
npm installto install dependencies - Connection issues: Verify that the Magnolia CMS documentation site is accessible
- No search results: The HTML selectors might need updating if the documentation site structure changes
Debugging
Enable verbose logging by modifying the error handlers in main.js to include more detailed error information.
Roadmap
- Add support for different documentation sections
- Implement caching for better performance
- Add configuration options for search parameters
- Support for multiple documentation versions
- Enhanced result filtering and ranking