Gemini MCP Client
A TypeScript client library for interacting with Gemini MCP (Multi-Cloud Platform) services.
Installation
npm install gemini-mcp
Features
- TypeScript support out of the box
- Promise-based API
- Comprehensive type definitions
- Easy integration with Node.js applications
Usage
import { ClientMCP } from 'gemini-mcp';
// Create a new instance
const client = new ClientMCP({
apiKey: 'your-api-key',
baseUrl: 'https://api.gemini-mcp.com/v1'
});
// Use the client
async function getBlogs() {
try {
const blogs = await client.getBlogs();
console.log(blogs);
} catch (error) {
console.error('Error fetching blogs:', error);
}
}
getBlogs();
API Reference
new ClientMCP(config: ClientMCPConfig)
Creates a new Gemini MCP client instance.
Parameters
config
(Object): Configuration objectapiKey
(string): Your Gemini MCP API keybaseUrl
(string): Base URL for the API (default: 'https://api.gemini-mcp.com/v1')timeout
(number): Request timeout in milliseconds (default: 30000)
Methods
getBlogs(): Promise<Blog[]>
Fetches all blogs for the authenticated user.
getBlog(id: string): Promise<Blog>
Fetches a specific blog by ID.
createBlog(blog: BlogCreate): Promise<Blog>
Creates a new blog.
Development
- Clone the repository
- Install dependencies:
npm install
- Build the project:
npm run build
- Run tests:
npm test
License
MIT
Description
Languages
TypeScript
99.3%
JavaScript
0.7%