Fastmcp Simple
No description available
Ask AI about Fastmcp Simple
Powered by Claude Β· Grounded in docs
I know everything about Fastmcp Simple. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
FastMCP Simple
A FastMCP server with Google Gemini AI integration and phone book management tools. Get your gemini api key for free from https://aistudio.google.com/app/api-keys
50 requests per day allowed
Features
- MCP Tools: searchPhoneBook, getPhoneBook, getPhoneBookTable
- Web Interface: Express server with Swagger UI documentation
- Gemini AI Integration: Chat with AI using MCP tool context
- Phone Book: Search and manage contacts with multiple output formats (text, table, JSON)
Quick Start
-
Install dependencies:
npm install -
Set up environment: Create
.envfile with your Gemini API key:GEMINI_API_KEY=your_api_key_here -
Run the server:
npm start -
Test with client (in another terminal):
npm run client -
Launch web interface:
npm run webThen visit: http://localhost:3000
Output Formats
Phone book tools support multiple formats:
Text: Human-readable contact details
Table: Formatted table with columns
JSON: Structured data for API integration
Example table output:
name | phone | department | location
---------------|--------------|-------------|----------
John Smith | +1-555-0123 | Engineering | New York
David Wilson | +1-555-0654 | Engineering | Seattle
Project Structure
βββ package.json # Project dependencies and scripts
βββ server.js # FastMCP server implementation
βββ client.js # MCP client with Gemini integration
βββ web-server.js # Express web server with Swagger UI
βββ phonebook-sample.json # Sample phone book data
βββ README.md # This file
Available Tools
| Tool | Description | Key Parameters |
|---|---|---|
searchPhoneBook | Search contacts | query, searchType?, format? |
getPhoneBook | Get all contacts | format?: "text"|"table"|"json" |
getPhoneBookTable | Structured table data | query?, columns?, maxResults? |
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/tools | GET | List available MCP tools |
/api/tools/{toolName} | POST | Execute specific tool |
/api/gemini/chat | POST | Chat with Gemini AI |
/api/gemini/chat-with-tools | POST | Chat with tool context |
/api/phonebook/search | POST | Search contacts |
/api/phonebook/all | GET | Get all contacts |
/api-docs | GET | Swagger UI documentation |
Troubleshooting
- Missing API key: Create
.envfile withGEMINI_API_KEY=your_key - Connection errors: Start server before running client
- Tool errors: Check server logs for details
