npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@yeshsurya/react-flow-mcp-server

v1.0.0

Published

A Model Context Protocol (MCP) server for React Flow library, providing AI assistants with access to React Flow components, hooks, types, utilities, and documentation.

Readme

React Flow MCP Server

A Model Context Protocol (MCP) server for the React Flow library. This server provides AI assistants with comprehensive access to React Flow components, hooks, types, utilities, examples, and documentation.

Features

  • Component Information: Get detailed documentation for all React Flow components (<ReactFlow />, <Handle />, <Background />, etc.)
  • Hooks Reference: Access information about all React Flow hooks (useReactFlow, useNodes, useEdges, etc.)
  • Type Definitions: Explore React Flow types (Node, Edge, Viewport, etc.)
  • Utility Functions: Learn about helper functions (addEdge, applyNodeChanges, getBezierPath, etc.)
  • Code Examples: Get complete, working code examples for common use cases
  • Documentation: Access guides on topics like getting started, performance, state management, and TypeScript

Installation

npm install @yeshsurya/react-flow-mcp-server

Or run directly with npx:

npx @yeshsurya/react-flow-mcp-server

Usage

As an MCP Server

Add to your MCP client configuration:

{
  "mcpServers": {
    "react-flow": {
      "command": "npx",
      "args": ["@yeshsurya/react-flow-mcp-server"]
    }
  }
}

Command Line Options

npx react-flow-mcp-server --help     # Show help
npx react-flow-mcp-server --version  # Show version

Environment Variables

  • LOG_LEVEL: Set logging level (debug, info, warn, error). Default: info

Available Tools

Component Tools

| Tool | Description | |------|-------------| | get_react_flow_component | Get detailed information about a specific component | | list_react_flow_components | List all available components (filterable by category) |

Hook Tools

| Tool | Description | |------|-------------| | get_react_flow_hook | Get detailed information about a specific hook | | list_react_flow_hooks | List all available hooks (filterable by category) |

Type Tools

| Tool | Description | |------|-------------| | get_react_flow_type | Get detailed information about a specific type | | list_react_flow_types | List all available types (filterable by category) |

Utility Tools

| Tool | Description | |------|-------------| | get_react_flow_utility | Get detailed information about a utility function | | list_react_flow_utilities | List all available utility functions |

Example Tools

| Tool | Description | |------|-------------| | get_react_flow_example | Get complete code for a specific example | | search_react_flow_examples | Search examples by keyword |

Documentation Tools

| Tool | Description | |------|-------------| | get_react_flow_docs | Get documentation for a specific topic |

Example Interactions

Getting Component Information

Tool: get_react_flow_component
Arguments: { "componentName": "Handle" }

Listing Hooks by Category

Tool: list_react_flow_hooks
Arguments: { "category": "state" }

Searching for Examples

Tool: search_react_flow_examples
Arguments: { "query": "drag drop" }

Getting Documentation

Tool: get_react_flow_docs
Arguments: { "topic": "getting-started" }

Available Examples

  • basic-flow - Simple React Flow setup
  • custom-node - Creating custom node components
  • custom-edge - Creating custom edge components
  • drag-and-drop - Adding nodes via drag and drop
  • sub-flows - Nested nodes with parent-child relationships
  • validation - Connection validation
  • save-restore - Persisting and loading flow state
  • resizable-node - Nodes with resize handles
  • toolbar-node - Nodes with selection toolbars
  • layout-elk - Automatic layout with ELK.js

Documentation Topics

  • getting-started - Installation and basic setup
  • concepts - Core concepts (nodes, edges, handles, viewport)
  • custom-nodes - Creating custom node components
  • custom-edges - Creating custom edge components
  • performance - Performance optimization tips
  • state-management - State management patterns
  • typescript - TypeScript usage guide
  • accessibility - Accessibility best practices

Development

Building from Source

git clone https://github.com/your-repo/react-flow-mcp-server.git
cd react-flow-mcp-server
npm install
npm run build

Running in Development

npm run dev

Project Structure

react-flow-mcp-server/
├── src/
│   ├── index.ts              # Entry point
│   ├── handler.ts            # MCP request handlers
│   ├── resources.ts          # Static resources
│   ├── prompts.ts            # Prompt definitions
│   ├── resource-templates.ts # Dynamic resource templates
│   ├── tools/
│   │   ├── index.ts          # Tool registry
│   │   ├── components/       # Component tools
│   │   ├── hooks/            # Hook tools
│   │   ├── types/            # Type tools
│   │   ├── utilities/        # Utility tools
│   │   ├── examples/         # Example tools
│   │   └── docs/             # Documentation tools
│   └── utils/
│       ├── logger.ts         # Winston logging
│       ├── cache.ts          # In-memory cache
│       ├── validation.ts     # Zod validation
│       └── circuit-breaker.ts # Resilience pattern
├── build/                    # Compiled JavaScript
├── package.json
└── tsconfig.json

License

MIT

Related Links