|
Download packages/cli/src/commands/extensions/examples/mcp-server/README.md from SaylorTwift/gemini-cli: direct link, hf CLI and curl.
- Browser
- Download file 859 Bytes
-
https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/cli/src/commands/extensions/examples/mcp-server/README.md
- Command line
-
hf download hf://SaylorTwift/gemini-cli/packages/cli/src/commands/extensions/examples/mcp-server/README.md
-
curl -L -o README.md https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/cli/src/commands/extensions/examples/mcp-server/README.md
859 Bytes
MCP Server Example
This is a basic example of an MCP (Model Context Protocol) server used as a Gemini CLI extension. It demonstrates how to expose tools and prompts to the Gemini CLI.
Description
The contents of this directory are a valid MCP server implementation using the
@modelcontextprotocol/sdk. It exposes:
- A tool
fetch_poststhat mock-fetches posts. - A prompt
poem-writer.
Structure
example.js: The main server entry point.gemini-extension.json: The configuration file that tells Gemini CLI how to use this extension.package.json: Helper for dependencies.
How to Use
Navigate to this directory:
cd packages/cli/src/commands/extensions/examples/mcp-serverInstall dependencies:
npm install
This example is typically used by gemini extensions new.