We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/LeomaiaJr/gemini-docs-skills'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
CLAUDE.md•1.94 KiB
# Gemini Docs MCP Server
This is an MCP (Model Context Protocol) server that provides tools to search and fetch Google's Gemini API documentation at https://ai.google.dev/gemini-api/docs.
## Project Structure
```
gemini-docs-mcp/
├── package.json # Node.js dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── README.md # User documentation
├── CLAUDE.md # This file
├── src/
│ ├── index.ts # MCP server entry point with tool registrations
│ ├── constants.ts # Configuration constants and documentation index
│ ├── test-mcp.ts # E2E tests for the tools
│ └── utils/
│ ├── parser.ts # HTML fetching and parsing utilities
│ └── search.ts # Search functionality
└── dist/ # Compiled JavaScript (npm run build)
```
## Tools Provided
1. **search_gemini_docs** - Searches the documentation index for relevant pages
2. **fetch_gemini_doc** - Fetches and parses a specific documentation page
## Key Files
- `src/index.ts` - Main MCP server with tool registrations using Zod schemas
- `src/constants.ts` - Contains DOC_INDEX with all known documentation pages and their keywords
- `src/utils/parser.ts` - Uses undici for HTTP and cheerio for HTML parsing
- `src/utils/search.ts` - Keyword-based search against the documentation index
## Development Commands
```bash
npm install # Install dependencies
npm run build # Compile TypeScript
npm run dev # Development mode with hot reload
npm run test # Run E2E tests
npm start # Run the built server
```
## Testing
Run `npm run test` to execute the E2E tests in `src/test-mcp.ts`. All 8 tests should pass.
## Notes
- The search uses a static index defined in `constants.ts` (not live search)
- Fetching pages makes real HTTP requests to ai.google.dev
- The server uses stdio transport for MCP communication