https://github.com/qduc/llm-mcp
https://github.com/qduc/llm-mcp
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/qduc/llm-mcp
- Owner: qduc
- Created: 2025-07-21T16:22:01.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-21T16:51:35.000Z (11 months ago)
- Last Synced: 2025-07-21T18:52:35.756Z (11 months ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LLM MCP Server
A Model Context Protocol (MCP) server that enables AI clients to query multiple Large Language Models (OpenAI GPT, Anthropic Claude, and Google Gemini) through a unified interface.
## Prerequisites
- [Node.js](https://nodejs.org/) (v16 or higher recommended)
- [npm](https://www.npmjs.com/) (comes with Node.js)
- API keys for the LLM providers you want to use:
- OpenAI API key (for GPT models)
- Anthropic API key (for Claude models)
- Google API key (for Gemini models)
## Installation
Clone the repository and install dependencies:
```bash
npm install
```
## Usage
This MCP server provides three tools for querying different AI models:
- `ask_gpt` - Query OpenAI GPT models (default: gpt-4o-2024-11-20)
- `ask_claude` - Query Anthropic Claude models (default: claude-4-sonnet)
- `ask_gemini` - Query Google Gemini models (default: gemini-2.5-flash)
### Available Tools
Each tool accepts the following parameters:
- `question` (required): The question to ask the AI model
- `model` (optional): Specific model to use (defaults provided)
- `max_tokens` (optional): Maximum tokens in response (default: 4000)
### Connecting to MCP Clients
This server is designed to work with MCP-compatible clients like Claude Desktop. Add it to your MCP client configuration to access the LLM querying tools.
```json
{
"ask-llm": {
"command": "node",
"args": [
"path/to/llm-mcp/index.js"
],
"env": {
"OPENAI_API_KEY": "your-openai-key",
"ANTHROPIC_API_KEY": "your-anthropic-key",
"GOOGLE_API_KEY": "your-google-key"
}
}
}
```
You only need API keys for the models you plan to use.
## Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
## License
ISC