react-native-docs-mcp

react-native-docs-mcp

Enables AI agents to perform semantic search over React Native documentation, retrieve specific pages, and manage doc versions locally without API keys.

Category
访问服务器

README

<p align="center"> <img src="https://raw.githubusercontent.com/Sannnao/react-docs-mcp/master/poster.png" width="100%" alt="React Native Docs MCP"> </p>

React Native Docs MCP Server

AI-powered semantic search over React Native documentation for Claude, Cursor, and other MCP clients.

Looking for React docs instead? See react-docs-mcp.

🚀 Installation (One Command)

Claude Code

claude mcp add --transport stdio react-native-docs -- npx react-native-docs-mcp

Claude Desktop

Edit: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "react-native-docs": {
      "command": "npx",
      "args": ["-y", "react-native-docs-mcp"]
    }
  }
}

Cursor

Settings → Cursor settings → Tools and MCP → Add server:

{
  "mcpServers": {
    "react-native-docs": {
      "command": "npx",
      "args": ["-y", "react-native-docs-mcp"]
    }
  }
}

That's it! Restart your editor and ask about React Native.


Features

  • 🔑 No API Key: Unlike hosted docs services (Context7, GitMCP), everything runs on your machine — no account, no key, no rate limits
  • 🔌 Works Offline: Clones the official react-native-website docs repo once, then searches locally — no network calls at query time
  • 🔍 Semantic Search: AI-powered search using embeddings for conceptual matches
  • ⚡ Fast Results: In-memory vector search with hybrid keyword+semantic ranking
  • 📦 Zero Config: Works with npx - no installation needed
  • 🤖 Local AI: Runs embeddings locally (no API costs)
  • 📝 Concise Responses: Returns summaries instead of full documentation
  • 🔄 Auto-sync: Pulls latest docs from the react-native-website repo automatically
  • 📌 Version Pinning: --docs-version=0.77 scopes docs to the React Native release your app actually uses

Usage

Once configured, the server provides the following capabilities to AI agents:

Tools

search_react_native_docs

Search across React Native documentation.

Parameters:

  • query (required): Search query string
  • section (optional): Filter by section (the-new-architecture, legacy, releases)
  • limit (optional): Maximum number of results (default: 10, max: 50)

Example:

Search for "flexbox layout" in React Native docs

get_doc

Get a specific documentation page.

Parameters:

  • path (required): Document path (e.g., "getting-started", "the-new-architecture/using-codegen")
  • full (optional): Return the full raw page instead of the ~1500 char summary (default: false)

Example:

Get the React Native flexbox documentation

Why full? The default summary is enough for most reference pages, but long guides — like "The New Architecture" migration docs, or a full native-modules walkthrough — can run well past 1500 chars, and the summary may stop before the part you actually need. Ask for the complete page when that happens:

Get the full page for the-new-architecture/using-codegen, I need every step

which calls get_doc with { "path": "the-new-architecture/using-codegen", "full": true }.

list_sections

List all available documentation sections.

update_docs

Pull latest documentation from the Git repository.

Docs version

By default this server indexes the always-current docs/ folder from the react-native-website repo — the same docs shown on reactnative.dev today. To pin it to a specific past release's frozen docs snapshot instead, pass --docs-version:

npx react-native-docs-mcp --docs-version=0.77

or set the REACT_NATIVE_DOCS_VERSION env var (the CLI flag wins if both are set). With Claude Code:

claude mcp add --transport stdio react-native-docs -- npx react-native-docs-mcp --docs-version=0.77

(Bare --version prints the package version, as you'd expect from any CLI.)

Why pin a version? If your app is running React Native 0.77 but the agent searches always-current docs, it can suggest an API that only exists in 0.86, or miss that something was renamed/removed since your version. Pinning --docs-version to match your react-native dependency's version keeps suggestions consistent with the APIs actually available in your app — useful when working on an app that's a few releases behind latest, or when debugging something version-specific (e.g. "did this New Architecture behavior change between 0.78 and 0.82?" — run two instances, one per version, and compare).

Only latest (the default) is fully verified against the current docs structure; older version snapshots are indexed best-effort with the same settings.

Resources

The server exposes documentation as resources with the URI pattern:

react-native-docs://{section}/{path}

Limitations

  • Docs source: content is cloned from the unversioned docs/ folder in facebook/react-native-website, which is upstream's live editing source. It may occasionally be a few days ahead of the latest published release rather than pinned to a specific React Native version.
  • Sections: most React Native docs pages live flat at the root of docs/ with no meaningful section — only the-new-architecture, legacy, and releases are real subfolders. The section filter reliably narrows results only for those three; for everything else, search unfiltered.
  • Blog posts: website/blog/ is not indexed yet.
  • MDX rendering: .mdx-only syntax (JSX component imports, admonitions) is stripped as best-effort plain text for search indexing, so snippets/summaries for some pages may include stray import lines.

Development

This package shares its engine with react-docs-mcp — development happens in that monorepo (this standalone repo is a read-only mirror of packages/react-native-docs-mcp/; please file issues there). This package's own source only configures the shared engine with React Native-specific defaults (src/index.ts) and is bundled standalone with tsup.

npm install
npm run build
npm run dev   # run directly with tsx, no build step

License

MIT. React Native documentation content is © Meta Platforms, Inc. and licensed separately by the react-native-website project.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选