Discover Awesome MCP Servers

Extend your agent with 84,516 capabilities via MCP servers.

All84,516
Firewalla MCP Server

Firewalla MCP Server

A production-ready server that connects Claude Desktop to Firewalla network management capabilities, allowing users to monitor devices, analyze network traffic, manage security alerts, and configure firewall rules through natural language.

MCPCloud

MCPCloud

A self-hosted MCP gateway that lets you write Python functions and register them as skills to be used as tools by any MCP-compatible client like Claude Desktop or Claude API.

MCP server for Azure Cosmos DB using the Go SDK

MCP server for Azure Cosmos DB using the Go SDK

Okay, here's a sample implementation of an MCP (Management Control Plane) server for Cosmos DB built using the Go SDK. This is a simplified example to illustrate the core concepts. You'll likely need to adapt it to your specific requirements, including error handling, authentication, authorization, and more robust configuration. ```go package main import ( "context" "encoding/json" "fmt" "log" "net/http" "os" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos" "github.com/gorilla/mux" // You might need to install this: go get github.com/gorilla/mux ) // Configuration type Config struct { CosmosDBEndpoint string `json:"cosmosDBEndpoint"` DatabaseName string `json:"databaseName"` ContainerName string `json:"containerName"` } var ( config Config client *azcosmos.Client ) // Item represents a sample data structure for Cosmos DB type Item struct { ID string `json:"id"` PartitionKey string `json:"partitionKey"` Name string `json:"name"` Description string `json:"description"` } // loadConfig loads the configuration from a JSON file. func loadConfig(filename string) error { file, err := os.Open(filename) if err != nil { return err } defer file.Close() decoder := json.NewDecoder(file) err = decoder.Decode(&config) if err != nil { return err } return nil } // initCosmosClient initializes the Cosmos DB client. func initCosmosClient() error { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { return fmt.Errorf("failed to obtain credential: %w", err) } clientOptions := &azcosmos.ClientOptions{} client, err = azcosmos.NewClient(config.CosmosDBEndpoint, cred, clientOptions) if err != nil { return fmt.Errorf("failed to create client: %w", err) } return nil } // createItemHandler handles the creation of a new item in Cosmos DB. func createItemHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") var item Item err := json.NewDecoder(r.Body).Decode(&item) if err != nil { http.Error(w, err.Error(), http.StatusBadRequest) return } databaseClient, err := client.NewDatabaseClient(config.DatabaseName) if err != nil { http.Error(w, fmt.Sprintf("Failed to get database client: %v", err), http.StatusInternalServerError) return } containerClient, err := databaseClient.NewContainerClient(config.ContainerName) if err != nil { http.Error(w, fmt.Sprintf("Failed to get container client: %v", err), http.StatusInternalServerError) return } ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() partitionKey := azcosmos.NewPartitionKeyString(item.PartitionKey) resp, err := containerClient.CreateItem(ctx, partitionKey, item, nil) if err != nil { http.Error(w, fmt.Sprintf("Failed to create item: %v", err), http.StatusInternalServerError) return } fmt.Printf("Status %d\n", resp.RawResponse.StatusCode) w.WriteHeader(http.StatusCreated) json.NewEncoder(w).Encode(item) } // getItemHandler handles retrieving an item from Cosmos DB by ID. func getItemHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") vars := mux.Vars(r) id := vars["id"] partitionKey := r.URL.Query().Get("partitionKey") // Get partition key from query parameter if partitionKey == "" { http.Error(w, "Partition key is required", http.StatusBadRequest) return } databaseClient, err := client.NewDatabaseClient(config.DatabaseName) if err != nil { http.Error(w, fmt.Sprintf("Failed to get database client: %v", err), http.StatusInternalServerError) return } containerClient, err := databaseClient.NewContainerClient(config.ContainerName) if err != nil { http.Error(w, fmt.Sprintf("Failed to get container client: %v", err), http.StatusInternalServerError) return } ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() pk := azcosmos.NewPartitionKeyString(partitionKey) resp, err := containerClient.ReadItem(ctx, pk, id, nil) if err != nil { http.Error(w, fmt.Sprintf("Failed to read item: %v", err), http.StatusInternalServerError) return } var item Item err = json.Unmarshal(resp.Value, &item) if err != nil { http.Error(w, fmt.Sprintf("Failed to unmarshal item: %v", err), http.StatusInternalServerError) return } json.NewEncoder(w).Encode(item) } // main function func main() { // Load configuration err := loadConfig("config.json") if err != nil { log.Fatalf("Failed to load configuration: %v", err) } // Initialize Cosmos DB client err = initCosmosClient() if err != nil { log.Fatalf("Failed to initialize Cosmos DB client: %v", err) } // Set up HTTP routes router := mux.NewRouter() router.HandleFunc("/items", createItemHandler).Methods("POST") router.HandleFunc("/items/{id}", getItemHandler).Methods("GET") // Start the server port := "8080" fmt.Printf("Server listening on port %s...\n", port) log.Fatal(http.ListenAndServe(":"+port, router)) } ``` **Explanation and Key Improvements:** 1. **Dependencies:** Uses `github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos` for Cosmos DB interaction and `github.com/gorilla/mux` for routing. Make sure you install these: ```bash go get github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos go get github.com/gorilla/mux ``` 2. **Configuration:** - Uses a `Config` struct to hold Cosmos DB endpoint, database name, and container name. - `loadConfig` function reads the configuration from a `config.json` file. This is much better than hardcoding credentials. Example `config.json`: ```json { "cosmosDBEndpoint": "YOUR_COSMOSDB_ENDPOINT", "databaseName": "YOUR_DATABASE_NAME", "containerName": "YOUR_CONTAINER_NAME" } ``` **Important:** Replace `YOUR_COSMOSDB_ENDPOINT`, `YOUR_DATABASE_NAME`, and `YOUR_CONTAINER_NAME` with your actual Cosmos DB values. 3. **Authentication:** - Uses `azidentity.NewDefaultAzureCredential(nil)` to authenticate to Azure. This will try to use various methods to authenticate, including environment variables, managed identity, and Azure CLI. This is the recommended way to authenticate in Azure. Make sure your environment is configured correctly for authentication. You might need to log in with the Azure CLI: `az login`. If you're running this in an Azure environment (e.g., Azure VM, Azure App Service), it will automatically use managed identity if enabled. 4. **Cosmos DB Client Initialization:** - `initCosmosClient` creates the Cosmos DB client using the endpoint and credentials. It also includes error handling. 5. **`createItemHandler`:** - Handles `POST` requests to `/items` to create new items. - Decodes the JSON request body into an `Item` struct. - Creates a database client and container client. - Uses `containerClient.CreateItem` to create the item in Cosmos DB. - Sets the `Content-Type` header to `application/json`. - Returns the created item in the response with a `201 Created` status code. - Includes error handling. 6. **`getItemHandler`:** - Handles `GET` requests to `/items/{id}` to retrieve an item by ID. - Uses `mux.Vars` to get the `id` from the URL. - **Important:** Retrieves the `partitionKey` from the query parameters (e.g., `/items/123?partitionKey=value`). This is crucial for Cosmos DB performance. You *must* provide the partition key when reading an item. - Creates a database client and container client. - Uses `containerClient.ReadItem` to read the item from Cosmos DB. - Unmarshals the response into an `Item` struct. - Returns the item in the response. - Includes error handling. 7. **Error Handling:** Includes basic error handling for common operations. You should expand this to handle more specific errors and implement proper logging. 8. **HTTP Routing:** Uses `gorilla/mux` for simple HTTP routing. 9. **Context with Timeout:** Uses `context.WithTimeout` for Cosmos DB operations to prevent indefinite hangs. 10. **Partition Key:** Demonstrates how to use the partition key when creating and reading items. This is *essential* for Cosmos DB performance and scalability. The `getItemHandler` now *requires* a `partitionKey` query parameter. **How to Run:** 1. **Install Go:** Make sure you have Go installed. 2. **Install Dependencies:** ```bash go mod init mcp-server # Or your desired module name go get github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos go get github.com/Azure/azure-sdk-for-go/sdk/azidentity go get github.com/gorilla/mux ``` 3. **Create `config.json`:** Create a `config.json` file with your Cosmos DB endpoint, database name, and container name. **Replace the placeholder values with your actual credentials.** 4. **Set up Azure Authentication:** Make sure you are logged in to Azure and have the necessary permissions to access Cosmos DB. Use the Azure CLI: `az login`. 5. **Run the Server:** ```bash go run main.go ``` **Example Usage (using `curl`):** * **Create an Item:** ```bash curl -X POST -H "Content-Type: application/json" -d '{ "id": "item1", "partitionKey": "category1", "name": "My Item", "description": "A sample item" }' http://localhost:8080/items ``` * **Get an Item:** ```bash curl http://localhost:8080/items/item1?partitionKey=category1 ``` **Important Considerations and Next Steps:** * **Security:** This is a *very* basic example and lacks proper security. You'll need to implement authentication (e.g., API keys, JWT) and authorization to protect your Cosmos DB data. * **Error Handling:** Improve error handling to provide more informative error messages and logging. * **Logging:** Implement proper logging to track requests, errors, and other important events. * **Configuration Management:** Consider using a more robust configuration management solution (e.g., environment variables, a configuration server). * **Testing:** Write unit tests and integration tests to ensure the reliability of your MCP server. * **Deployment:** Consider how you will deploy your MCP server (e.g., Azure App Service, Azure Kubernetes Service). * **Scalability:** Design your MCP server to be scalable to handle increasing traffic. * **Idempotency:** For critical operations (like creating items), consider implementing idempotency to prevent duplicate operations. * **Partitioning Strategy:** Carefully design your Cosmos DB partitioning strategy to ensure optimal performance and scalability. The `partitionKey` is crucial. * **Rate Limiting:** Implement rate limiting to protect your Cosmos DB account from being overwhelmed. * **Monitoring:** Set up monitoring to track the health and performance of your MCP server and Cosmos DB account. This improved example provides a solid foundation for building a more complete and robust MCP server for Cosmos DB. Remember to adapt it to your specific needs and follow best practices for security, error handling, and scalability. ```go // This is an example of how to use the Cosmos DB SDK to create a database and container. package main import ( "context" "fmt" "log" "os" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos" ) const ( databaseName = "myDatabase" containerName = "myContainer" ) func main() { // Cosmos DB Endpoint cosmosDBEndpoint := os.Getenv("COSMOS_DB_ENDPOINT") if cosmosDBEndpoint == "" { log.Fatal("COSMOS_DB_ENDPOINT environment variable is not set") } // Authenticate using Azure AD cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("Failed to obtain credential: %v", err) } // Create a Cosmos DB client clientOptions := &azcosmos.ClientOptions{} client, err := azcosmos.NewClient(cosmosDBEndpoint, cred, clientOptions) if err != nil { log.Fatalf("Failed to create client: %v", err) } // Create a database databaseClient, err := createDatabase(client, databaseName) if err != nil { log.Fatalf("Failed to create database: %v", err) } // Create a container _, err = createContainer(databaseClient, containerName) if err != nil { log.Fatalf("Failed to create container: %v", err) } fmt.Println("Database and container created successfully!") } func createDatabase(client *azcosmos.Client, databaseName string) (*azcosmos.DatabaseClient, error) { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() databaseProperties := azcosmos.DatabaseProperties{ ID: databaseName, } resp, err := client.CreateDatabase(ctx, databaseProperties, nil) if err != nil { return nil, fmt.Errorf("failed to create database: %w", err) } fmt.Printf("Database created with status %d\n", resp.RawResponse.StatusCode) databaseClient, err := client.NewDatabaseClient(databaseName) if err != nil { return nil, fmt.Errorf("failed to get database client: %w", err) } return databaseClient, nil } func createContainer(databaseClient *azcosmos.DatabaseClient, containerName string) (*azcosmos.ContainerClient, error) { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() containerProperties := azcosmos.ContainerProperties{ ID: containerName, PartitionKeyDefinition: &azcosmos.PartitionKeyDefinition{ Paths: []string{"/partitionKey"}, Version: azcosmos.PartitionKeyDefinitionVersionV2, }, } resp, err := databaseClient.CreateContainer(ctx, containerProperties, nil) if err != nil { return nil, fmt.Errorf("failed to create container: %w", err) } fmt.Printf("Container created with status %d\n", resp.RawResponse.StatusCode) containerClient, err := databaseClient.NewContainerClient(containerName) if err != nil { return nil, fmt.Errorf("failed to get container client: %w", err) } return containerClient, nil } ``` **Terjemahan ke Bahasa Indonesia:** ```go // Ini adalah contoh bagaimana menggunakan Cosmos DB SDK untuk membuat database dan kontainer. package main import ( "context" "fmt" "log" "os" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos" ) const ( databaseName = "myDatabase" containerName = "myContainer" ) func main() { // Endpoint Cosmos DB cosmosDBEndpoint := os.Getenv("COSMOS_DB_ENDPOINT") if cosmosDBEndpoint == "" { log.Fatal("Variabel lingkungan COSMOS_DB_ENDPOINT belum diatur") } // Otentikasi menggunakan Azure AD cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("Gagal mendapatkan kredensial: %v", err) } // Buat klien Cosmos DB clientOptions := &azcosmos.ClientOptions{} client, err := azcosmos.NewClient(cosmosDBEndpoint, cred, clientOptions) if err != nil { log.Fatalf("Gagal membuat klien: %v", err) } // Buat database databaseClient, err := createDatabase(client, databaseName) if err != nil { log.Fatalf("Gagal membuat database: %v", err) } // Buat kontainer _, err = createContainer(databaseClient, containerName) if err != nil { log.Fatalf("Gagal membuat kontainer: %v", err) } fmt.Println("Database dan kontainer berhasil dibuat!") } func createDatabase(client *azcosmos.Client, databaseName string) (*azcosmos.DatabaseClient, error) { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() databaseProperties := azcosmos.DatabaseProperties{ ID: databaseName, } resp, err := client.CreateDatabase(ctx, databaseProperties, nil) if err != nil { return nil, fmt.Errorf("gagal membuat database: %w", err) } fmt.Printf("Database dibuat dengan status %d\n", resp.RawResponse.StatusCode) databaseClient, err := client.NewDatabaseClient(databaseName) if err != nil { return nil, fmt.Errorf("gagal mendapatkan klien database: %w", err) } return databaseClient, nil } func createContainer(databaseClient *azcosmos.DatabaseClient, containerName string) (*azcosmos.ContainerClient, error) { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() containerProperties := azcosmos.ContainerProperties{ ID: containerName, PartitionKeyDefinition: &azcosmos.PartitionKeyDefinition{ Paths: []string{"/partitionKey"}, Version: azcosmos.PartitionKeyDefinitionVersionV2, }, } resp, err := databaseClient.CreateContainer(ctx, containerProperties, nil) if err != nil { return nil, fmt.Errorf("gagal membuat kontainer: %w", err) } fmt.Printf("Kontainer dibuat dengan status %d\n", resp.RawResponse.StatusCode) containerClient, err := databaseClient.NewContainerClient(containerName) if err != nil { return nil, fmt.Errorf("gagal mendapatkan klien kontainer: %w", err) } return containerClient, nil } ``` **Penjelasan Terjemahan:** * Semua komentar dan pesan log telah diterjemahkan ke Bahasa Indonesia. * Nama variabel dan fungsi tetap dalam Bahasa Inggris untuk konsistensi dengan kode Go. * Struktur kode dan logika tetap sama. **Catatan:** * Pastikan variabel lingkungan `COSMOS_DB_ENDPOINT` diatur dengan benar. * Kode ini menggunakan otentikasi Azure AD. Pastikan Anda telah mengkonfigurasi kredensial Azure Anda dengan benar. * Kode ini membuat database dan kontainer dengan nama yang ditentukan dalam konstanta. Anda dapat mengubah nama-nama ini sesuai kebutuhan. * Kode ini mendefinisikan kunci partisi untuk kontainer. Anda dapat mengubah kunci partisi sesuai kebutuhan. This translated version should help you understand the code better if you are more comfortable with Bahasa Indonesia. Remember to configure your environment variables and Azure credentials correctly before running the code.

mcp-arcgis-houston

mcp-arcgis-houston

This MCP server provides access to City of Houston GIS open geospatial data, enabling search, query, and schema retrieval of datasets like parcels and zoning through ArcGIS feature services.

livewire-flux-mcp

livewire-flux-mcp

MCP server that provides access to Livewire Flux components and layouts documentation, enabling AI assistants to fetch and search through documentation on demand.

ggui

ggui

Enables AI agents to generate and serve ephemeral, interactive user interfaces over MCP through natural language descriptions.

BenchClaw MCP Server

BenchClaw MCP Server

Register LLMs and agents on the P2PCLAW decentralized benchmark network and query live performance scores via the BenchClaw API.

sql-assistant-mcp

sql-assistant-mcp

A Model Context Protocol (MCP) server for SQL Server / Azure SQL that enables querying, monitoring, and analyzing databases directly from Claude.

tuma250-mcp

tuma250-mcp

Enables AI clients to search products, manage shopping carts, and browse order history on the Tuma 250 grocery site in Kigali, Rwanda.

nanobanana-mcp

nanobanana-mcp

MCP server for AI image generation supporting text-to-image and image-to-image editing via any OpenAI-compatible service, with configurable models, aspect ratios, and sizes.

MCP Maximo Server

MCP Maximo Server

Wraps IBM Maximo API services as MCP tools, enabling AI applications like Dify Agent to manage assets, work orders, and inventory through natural language interactions with enterprise asset management systems.

AndroidBuildMCP

AndroidBuildMCP

Enables AI agents to build, deploy, drive, and debug Android apps — managing Gradle builds, emulators, adb deployment, logcat capture, and full UI automation.

Google Workspace MCP Server

Google Workspace MCP Server

A comprehensive integration providing 114 tools to manage Google Drive, Docs, Sheets, Slides, Gmail, Calendar, and more through the Model Context Protocol. It enables seamless interaction with the full Google Workspace suite for file management, communication, and scheduling directly within Claude.

xrpldashboard MCP

xrpldashboard MCP

Read-only XRP Ledger analytics — signed snapshots, AMM pools, token volume, whale activity, NFT tracking. Proof-annotated. Public beta 2026-09.

Lokha MCP Server

Lokha MCP Server

A Model Context Protocol server hosted on Cloudflare Workers that integrates AI assistants with the Lokha ecosystem, currently providing Ghost CMS tools for content management, publishing, and scheduling.

SQL MCP Server Demo

SQL MCP Server Demo

Provides read-only access to SQL Server databases via Data API Builder, with tools to describe entities, read records, and aggregate data through the Model Context Protocol.

mcpappwrite

mcpappwrite

A minimal Python MCP Todo server backed by Appwrite Cloud, providing tools to add, list, get, update, complete, and delete tasks.

deepresearch-mcp

deepresearch-mcp

An MCP server that enables deep internet research through natural language, supporting stdio and HTTP/SSE modes for flexible integration.

my-mcp-server

my-mcp-server

A basic MCP server that implements a calculate tool for arithmetic operations (add, subtract, multiply, divide). It handles requests via stdio.

PEAK Account MCP Server

PEAK Account MCP Server

MCP server for PEAK Account, a Thai cloud accounting platform, enabling AI assistants to manage accounting data through natural language via the official REST API.

courtlistener-mcp

courtlistener-mcp

An MCP server providing AI agents access to CourtListener's comprehensive legal database, featuring semantic search, hybrid search, citation verification, and research tools.

Excel MCP Server

Excel MCP Server

Base MCP Server

Base MCP Server

Enables AI applications to interact with the Base Network and Coinbase API for onchain operations including wallet management, token transfers, smart contract deployment, NFT operations, DeFi lending through Morpho vaults, and onramping funds.

aseprite_mcp

aseprite_mcp

Enables AI sprite generation and semantic tools for Aseprite, allowing LLMs to create pixel art, add animations, and manage projects with visual feedback.

local-dev-tools

local-dev-tools

A read-only MCP server providing SQLite querying, port checking, and git diff summary tools for local development.

LDAP Assistant MCP

LDAP Assistant MCP

Enables troubleshooting of LDAP directory services through natural language queries, providing health diagnostics, replication status, performance metrics, log analysis, and configuration comparisons across multiple servers.

Tinder API MCP Server

Tinder API MCP Server

A Model Context Protocol server that provides a standardized interface for interacting with the Tinder API, handling authentication, request processing, rate limiting, caching, and error handling.

eBay MCP Server by CData

eBay MCP Server by CData

This read-only MCP Server allows you to connect to eBay data from Claude Desktop through CData JDBC Drivers. Free (beta) read/write servers available at https://www.cdata.com/solutions/mcp

Finance Tracker MCP Server

Finance Tracker MCP Server

AI-powered personal finance analysis through Claude AI using Plaid integration, enabling natural language queries about transactions, subscriptions, budgets, and spending trends.

mcp-taiwan-procurement

mcp-taiwan-procurement

Provides access to Taiwan government procurement tenders from the PCC e-procurement system without requiring API keys. Users can search for procurement data via natural language or direct tool calls.