Stimulus Docs MCP Server
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.
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., "@Stimulus Docs MCP Server explain how to use targets in Stimulus"
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.
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.
Related MCP server: Turbo Docs MCP Server
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:
{
"mcpServers": {
"stimulus-docs": {
"command": "node",
"args": ["/path/to/your/stimulus-docs-mcp-server/build/index.js"],
"env": {}
}
}
}Replace
/path/to/your/stimulus-docs-mcp-serverwith 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-serverwith the path to theindex.jsfile 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:
MCP stimulus-docs: spawn node ENOENT (2)
Could not connect to MCP server stimulus-docs
MCP stimulus-docs: Server disconnected. For troubleshooting guidance [...]
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:
"command": "/Users/<YOUR USER NAME/.local/share/mise/installs/node/20.18.3/bin/nodeDocumentation 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
cache/
{commit-sha}-{timestamp}/
handbook/
01_introduction.md
02_hello_stimulus.md
...
reference/
actions.md
targets.md
...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.
Available Tools
16 toolshandbook-buildingB
Build a real-world clipboard controller example - demonstrates practical Stimulus patterns, CSS classes, and connecting JavaScript to HTML elements
Inputs: no named parameters.
handbook-externalC
Techniques for integrating external APIs and resources - covers AJAX requests, working with third-party libraries, and asynchronous operations
Inputs: no named parameters.
handbook-helloB
Step-by-step tutorial for building your first Stimulus controller - covers creating a greeting controller with targets, actions, and DOM event handling
Inputs: no named parameters.
handbook-installingB
Complete guide to installing Stimulus in your application - covers Webpack, import maps, Rails integration, and manual setup options
Inputs: no named parameters.
handbook-introductionB
Introduction to Stimulus core concepts: controllers, actions, targets, and values. Explains how Stimulus enhances server-rendered HTML and separates content from behavior
Inputs: no named parameters.
handbook-originB
Learn why Stimulus was created by DHH - covers the philosophy of modest JavaScript frameworks, server-rendered HTML, and how Stimulus differs from mainstream JavaScript frameworks like React
Inputs: no named parameters.
handbook-resilienceB
Best practices for building robust Stimulus applications - covers progressive enhancement, graceful degradation, and handling edge cases
Inputs: no named parameters.
handbook-stateC
Learn how Stimulus manages state through values and data attributes - covers reactive programming patterns and keeping state in sync with the DOM
Inputs: no named parameters.
reference-actionsC
Complete reference for Stimulus actions - covers action descriptors, event handling, keyboard filters, global events, action parameters, and event options like :prevent and :stop
Inputs: no named parameters.
reference-controllersC
Controller API reference - covers controller lifecycle, scopes, nested controllers, cross-controller communication with events, and registration patterns
Inputs: no named parameters.
reference-css-classesC
CSS classes API reference - learn how to dynamically manage CSS classes in Stimulus controllers for styling and visual state management
Inputs: no named parameters.
reference-lifecycleB
Controller lifecycle callbacks reference - covers connect(), disconnect(), and target connection/disconnection callbacks for managing controller state
Inputs: no named parameters.
reference-outletsC
Outlets API reference - learn how to connect controllers to each other for component communication and coordination between different parts of your application
Inputs: no named parameters.
reference-targetsC
Targets API reference - covers target definitions, properties (singular/plural/existential), shared targets, optional targets, and target lifecycle callbacks
Inputs: no named parameters.
reference-typescriptB
TypeScript integration guide - covers type definitions, strongly typed targets/values/outlets, and best practices for using Stimulus with TypeScript
Inputs: no named parameters.
reference-valuesB
Values API reference - covers value definitions, type coercion, change callbacks, and using values for reactive data binding between HTML and JavaScript
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Every tool has a clearly distinct purpose with no ambiguity. The 'handbook-' tools are tutorial-focused covering different aspects like installation, concepts, and best practices, while the 'reference-' tools are API-focused covering specific features like actions, controllers, and values. There is no overlap in functionality between tools.
Tool names follow a highly consistent pattern throughout. All tools use a prefix ('handbook-' or 'reference-') followed by a descriptive noun or concept, with consistent kebab-case formatting. This predictable structure makes it easy to understand the tool's category and purpose at a glance.
The 16 tools are well-scoped for a documentation server covering both tutorial and reference material. Each tool earns its place by addressing a specific aspect of Stimulus, from introductory tutorials to detailed API references, without feeling excessive or insufficient for the domain.
The tool surface provides complete coverage for a Stimulus documentation server. It includes both tutorial tools for learning (installation, concepts, examples) and comprehensive reference tools for all major API features (controllers, actions, targets, values, etc.), with no obvious gaps in the domain.
Maintenance
Related MCP Connectors
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
The OpenRouter MCP server plugs OpenRouter into the AI tools you already use. Once connected, your assistant can pull live OpenRouter data (models, prices, your credits, rankings, and docs) and send quick test messages, all without leaving your editor.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceAn 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.6-
- AlicenseAqualityDmaintenanceAn MCP server that provides access to up-to-date Turbo JS documentation through Claude Desktop and VS Code integrations.136ISC
- AlicenseAqualityBmaintenanceAn MCP server that gives Claude IDE capabilities inside VS Code and Cursor, enabling file operations, shell commands, and workspace management via natural language.12MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that makes project documentation instantly accessible in Claude Code through @ mentions, allowing Claude to understand your codebase's conventions and architecture.6MIT