Provides access to comprehensive Stimulus JS documentation, including the complete handbook and reference materials covering actions, controllers, CSS classes, lifecycle callbacks, outlets, targets, values, and TypeScript integration.
Offers documentation on using TypeScript with Stimulus JS, enabling type-safe development in Stimulus applications.
Stimulus Docs MCP Server
An MCP server to access up to date documentation for Stimulus JS.
⚠️ This is Experimental Software
This MCP is in early development. It may contain bugs, have limited functionality, or undergo breaking changes without notice. Use at your own risk and expect potential instability.
Building the MCP Server
Prerequisites
Node.js: Minimum version 18.0.0 or higher
npm: Comes bundled with Node.js
Build Instructions
Clone this repository and navigate to the project directory
Install dependencies:
npm installBuild the project using the provided script:
npm run build
This will compile the TypeScript source code and create the executable in the build/
directory.
Usage
With Claude Desktop
First, build the MCP server following the instructions above
Follow the instructions at https://modelcontextprotocol.io/quickstart/user to add a new MCP server.
Add the following configuration:
Replace
/path/to/your/stimulus-docs-mcp-server
with the actual path to this projectRestart Claude Desktop
The Stimulus documentation tools should now be available in your Claude conversations
With VS Code
Build the MCP server following the instructions above
Follow the instructions at https://code.visualstudio.com/docs/copilot/chat/mcp-servers
Using your preferred method based on the instructions above, configure the MCP server by pointing it to the built executable:
{ "stimulus-docs": { "type": "stdio", "command": "node", "args": [ "path/to/your/stimulus-docs-mcp-server" ] } }Replace
path/to/your/stimulus-docs-mcp-server
with the path to theindex.js
file built in step 1.The Stimulus documentation will be accessible through the MCP client interface
Troubleshooting
Claude
You may see the following errors when opening Claude after configuring the MCP:
This is because the path to the node
executable can not be found. If that's the case, instead of "command": "node"
use the complete path to the node. If you use mise
it may be something like:
Documentation Source & Caching Strategy
This MCP server fetches the latest Stimulus documentation directly from the official stimulus-site repository on GitHub. To ensure optimal performance and reduce API calls, the server implements the following caching strategy:
How It Works
Fresh Content Detection: The server checks the latest commit SHA and timestamp from the GitHub repository
Cache Key Generation: A unique cache key is generated using the commit SHA (first 7 characters) and timestamp
Caching: Documentation files are cached locally using the cache key as the folder structure
Cache Validation: Before fetching from GitHub, the server checks if content is already cached for the current commit
Fallback Strategy: If GitHub is unavailable, the server falls back to local documentation files
Cache Structure
Benefits
Always Up-to-Date: Content is automatically updated when the Stimulus repository changes
Performance: Cached content loads instantly without network requests
Reliability: Local fallback ensures the server works even when GitHub is unavailable
Efficient: Only fetches new content when the repository has been updated
The local documentation files in src/docs/
serve as a backup and ensure the MCP server remains functional even without internet connectivity.
All credit for the documentation content goes to the Stimulus team and contributors.
Available Tools
This MCP server provides access to the complete Stimulus documentation, organized into:
Handbook:
The Origin of Stimulus
Introduction
Hello Stimulus Tutorial
Building Something Real
Designing for Resilience
Managing State
Working with External Resources
Installing Stimulus
Reference:
Actions
Controllers
CSS Classes
Lifecycle Callbacks
Outlets
Targets
Using TypeScript
Values
Each documentation section is available as a separate tool that can be called to retrieve the relevant content.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
An MCP server that provides access to up-to-date Stimulus JS documentation directly within Claude conversations and VS Code.
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server implementation that integrates Claude with Salesforce, enabling natural language interactions with Salesforce data and metadata for querying, modifying, and managing objects and records.Last updated -78614MIT License
- AsecurityAlicenseAqualityThis project aims to build a Claude Code MCP server and implement its associated tools (explain\_code, review\_code, fix\_code, edit\_code, test\_code, simulate\_command, your\_own\_query). The server is implemented using Node.js and the MCP SDK. It receives tool requests from clients via Stdio, dynamicallyLast updated -72130MIT License
- AsecurityAlicenseAqualityAn MCP server implementation that integrates Claude with Salesforce, enabling natural language interactions with Salesforce data and metadata.Last updated -886MIT License
- -securityFlicense-qualityAn MCP server that enables Claude to generate, search, and manage documentation for codebases using vector embeddings and semantic search, providing tools for creating user guides, technical documentation, code explanations, and architectural diagrams.Last updated -5