Skip to main content
Glama
Tai-DT
by Tai-DT

Expo Gemini MCP Server

🚀 Một Model Context Protocol (MCP) server cho tài liệu Expo với tích hợp Gemini AI

Server này cung cấp cho các AI assistant khả năng truy cập vào tài liệu Expo cập nhật với sự hỗ trợ của Gemini AI để tăng cường kết quả tìm kiếm và tạo ra các ví dụ code chất lượng cao.

✨ Tính năng

  • 🔍 Tìm kiếm ngữ nghĩa: Tìm kiếm thông minh trong tài liệu Expo sử dụng Gemini embeddings

  • 🤖 Hoàn toàn Gemini AI: Sử dụng Gemini cho cả embeddings và text generation

  • 📚 Tài liệu đầy đủ: Bao gồm API reference, guides, và tutorials

  • 🎯 MCP Protocol: Tuân thủ chuẩn Model Context Protocol

  • Tìm kiếm hybrid: Kết hợp tìm kiếm ngữ nghĩa và từ khóa

  • 🔧 Giải thích concepts: Giải thích chi tiết các khái niệm Expo

Related MCP server: Expo Docs MCP Server

🛠 Cài đặt

Yêu cầu hệ thống

  • Node.js (v16 hoặc cao hơn)

  • npm hoặc yarn

  • Gemini API key (duy nhất cần thiết)

Bước 1: Clone và cài đặt

git clone <repository-url>
cd expo-gemini-mcp-server
npm install

Bước 2: Cấu hình môi trường

cp .env.example .env

Chỉnh sửa file .env và thêm Gemini API key:

GEMINI_API_KEY=your_gemini_api_key_here
PORT=3000
NODE_ENV=development

Bước 3: Xây dựng index tài liệu

npm run build-index

Lệnh này sẽ:

  • Clone tài liệu Expo từ GitHub

  • Xử lý các file markdown

  • Tạo embeddings sử dụng OpenAI

  • Lưu vào vector store

Bước 4: Build và khởi chạy server

npm run build
npm start

Hoặc chạy trong development mode:

npm run dev

Bước 5: Test server

npm test

🎯 Sử dụng

MCP Tools có sẵn

1. search_expo_docs

Tìm kiếm trong tài liệu Expo với AI enhancement

{
  "query": "How to use Image component in Expo?",
  "maxResults": 5,
  "useGemini": true
}

2. get_expo_examples

Lấy code examples cho components/APIs cụ thể

{
  "component": "Camera",
  "complexity": "intermediate"
}

3. explain_expo_concept

Giải thích chi tiết các khái niệm Expo

{
  "concept": "Expo Router",
  "audience": "beginner"
}

Kết nối với AI Assistants

Claude Desktop

Thêm vào claude_desktop_config.json:

{
  "mcpServers": {
    "expo-gemini-docs": {
      "command": "node",
      "args": ["/path/to/expo-gemini-mcp-server/dist/index.js"],
      "env": {
        "OPENAI_API_KEY": "your_key",
        "GEMINI_API_KEY": "your_key"
      }
    }
  }
}

Cursor/VS Code

Sử dụng MCP extension và cấu hình server endpoint.

🧠 Tích hợp Gemini AI

Tăng cường kết quả tìm kiếm

Gemini AI sẽ:

  • Đánh giá mức độ liên quan của kết quả

  • Thêm tóm tắt cho mỗi kết quả

  • Đề xuất topics liên quan

  • Highlight thông tin quan trọng

Tạo code examples

Gemini có thể tạo:

  • Examples hoàn chỉnh và có thể chạy được

  • Use cases phổ biến

  • Best practices

  • Cảnh báo về common pitfalls

Giải thích concepts

Gemini điều chỉnh explanations theo:

  • Beginner: Ngôn ngữ đơn giản, bao gồm setup steps

  • Intermediate: Tập trung vào practical usage

  • Expert: Chi tiết advanced, performance considerations

📁 Cấu trúc dự án

expo-gemini-mcp-server/
├── src/
│   ├── index.ts              # Entry point chính
│   ├── services/
│   │   ├── GeminiService.ts  # Tích hợp Gemini AI
│   │   ├── VectorStoreService.ts # Vector database
│   │   └── ExpoDocsService.ts    # Logic xử lý docs
│   └── utils/
│       └── logger.ts         # Logging utilities
├── scripts/
│   └── build-index.js        # Script build documentation index
├── data/                     # Vector store và search index
├── logs/                     # Log files
├── docs-source/              # Expo documentation (cloned)
├── package.json
├── tsconfig.json
├── mcp-config.json          # MCP configuration
└── README.md

🔧 Scripts có sẵn

  • npm run build: Compile TypeScript sang JavaScript

  • npm start: Khởi chạy server (production)

  • npm run dev: Khởi chạy với watch mode (development)

  • npm run build-index: Xây dựng documentation index

  • npm run update-docs: Cập nhật docs và rebuild index

  • npm test: Test server functionality

🔍 Troubleshooting

Vector store trống

# Rebuild index
npm run build-index

Gemini API errors

  • Kiểm tra API key trong .env

  • Verify quotas và billing

  • Check network connectivity

OpenAI embedding errors

  • Kiểm tra API key và credits

  • Rate limiting - script tự động pause

  • Reduce batch size nếu cần

Memory issues

  • Tăng Node.js memory limit:

node --max-old-space-size=4096 scripts/build-index.js

🤝 Đóng góp

  1. Fork repository

  2. Tạo feature branch (git checkout -b feature/amazing-feature)

  3. Commit changes (git commit -m 'Add amazing feature')

  4. Push to branch (git push origin feature/amazing-feature)

  5. Tạo Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.

🙏 Acknowledgments

📞 Hỗ trợ

Có vấn đề gì? Tạo issue hoặc liên hệ qua email.


Happy coding with Expo and AI! 🚀🤖

Available Tools

3 tools
explain_expo_conceptC

Get detailed explanations of Expo concepts using Gemini AI

ParametersJSON Schema
NameRequiredDescriptionDefault
conceptYesThe Expo concept to explain
audienceNoTarget audience levelintermediate

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'using Gemini AI' but does not explain what the response contains beyond 'detailed explanations,' nor does it address potential latency, need for external API calls, or any limitations. The behavior is under-specified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise, but it relies on the vague phrase 'detailed explanations' and adds little substantive value. It is not overly long, yet it could be more informative without sacrificing brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity and full schema coverage, the description is minimally adequate but not complete. It lacks guidance on when to use the tool, what output format to expect, and how the 'audience' parameter affects the explanation—gaps that matter more because no output schema or annotations exist.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already provides descriptions for both parameters (concept and audience), with 100% coverage, so the baseline is 3. The description adds no additional parameter semantics beyond what the schema offers, and it does not elaborate on how 'concept' or 'audience' interact with the explanation's detail level.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Get detailed explanations of Expo concepts using Gemini AI.' This uses a specific verb ('Get detailed explanations') and identifies the resource (Expo concepts), distinguishing it from sibling tools like search_expo_docs and get_expo_examples, though the added 'using Gemini AI' is implementation detail rather than core purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like search_expo_docs or get_expo_examples. The description implies use for explanations but lacks explicit when/when-not scenarios or mention of sibling tools, leaving the agent to infer the appropriate context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_expo_examplesA

Get code examples for specific Expo components or APIs using Gemini AI

ParametersJSON Schema
NameRequiredDescriptionDefault
componentYesThe Expo component or API name
complexityNoThe complexity level of examplesbasic

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the burden of behavioral disclosure. It does mention 'using Gemini AI', which hints at generated content and potential non-determinism, but it does not describe the output format, any rate limits, or possible inaccuracies. This is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the main action and object. Every word contributes to understanding the tool's purpose, with no wasted effort.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is sufficient for a simple tool with only two parameters, but the absence of an output schema means it should clarify what a successful response looks like. It does not specify the structure or format of the returned code examples, leaving some ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already has 100% coverage, describing both 'component' and 'complexity' clearly. The description adds no additional parameter-level meaning, so it stays at the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: to get code examples for specific Expo components or APIs. It includes a specific verb (get) and resource (code examples) and distinguishes itself from sibling tools like search_expo_docs and explain_expo_concept by focusing on example code.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies that this tool is for obtaining code examples, which is a clear context of use. However, it does not explicitly contrast with sibling tools or provide exclusions, so it misses the full 'when-not-to-use' guidance that would make it a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_expo_docsB

Search through Expo documentation using semantic search with Gemini AI enhancement

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesThe search query for Expo documentation
useGeminiNoWhether to use Gemini AI for enhanced results (default: true)
maxResultsNoMaximum number of results to return (default: 5)

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of behavioral disclosure. It mentions semantic search and Gemini AI enhancement, but these are also reflected in the useGemini parameter. It does not disclose return format, failure modes, or what 'enhancement' actually does, leaving significant behavioral ambiguity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler or redundant information. It is appropriately concise for a search tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, yet the description does not explain what the tool returns or how maxResults affects results. It also lacks any context about result format or behavior on empty queries, making it incomplete for an agent to predict the tool's output reliably.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% coverage with clear descriptions for query, useGemini, and maxResults. The description adds little beyond the schema, only indirectly referencing Gemini enhancement, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches Expo documentation, with specific details about semantic search and Gemini AI enhancement. This distinguishes it from sibling tools like get_expo_examples and explain_expo_concept, which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no explicit guidance on when to use this tool versus the sibling tools. It only implies usage through the action 'Search through Expo documentation,' with no mention of alternatives, exclusions, or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • First observedexplain_expo_concept
    • First observedget_expo_examples
    • First observedsearch_expo_docs

TDQS

A3.5/5.0

Scored across 3 tools

Disambiguation4/5

Tools are mostly distinct: search discovers relevant docs, get_expo_examples fetches code samples, and explain_expo_concept provides conceptual overviews. There is minor overlap between search and explain for concept queries, but the descriptions make the primary intent clear.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: search_expo_docs, get_expo_examples, explain_expo_concept. This makes the intended action and target clear for each tool.

Tool Count5/5

With only 3 tools, the server is tightly scoped to its purpose of assisting with Expo documentation, examples, and concepts. Each tool serves a distinct needed function without redundancy.

Completeness4/5

The tool set covers the primary ways an agent would interact with Expo documentation: searching, retrieving examples, and getting explanations. A minor gap is the absence of a direct 'get_document' tool for known pages, but search effectively compensates.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI-powered semantic search through Expo SDK documentation across multiple versions (v51-v53 and latest), allowing developers to quickly find relevant documentation with configurable similarity scoring.
    47 npm
    2
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Provides AI agents with accurate, version-aware documentation for React Native, Expo, React Navigation, and Ignite by automatically detecting project dependencies and fetching matching documentation.
    12
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to execute Expo and EAS operations including project setup, cloud builds, OTA updates, app submission, and diagnostics.
    MIT