Discover Awesome MCP Servers

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

All84,516
Schema Sentinel

Schema Sentinel

An MCP server that validates tool calls against JSON Schema, performs deterministic repair, redacts secrets, and maintains a hash-chained audit ledger.

agent-bridge

agent-bridge

An MCP central server that lets multiple AI agents (e.g., Claude Code, kimi-code) exchange private messages, shared channel broadcasts, and unified message streams via MCP tools, with SQLite persistence and per-connection identity binding.

stepik-courses-mcp

stepik-courses-mcp

Read-only MCP server that retrieves educational context from started Stepik courses, offering tools to list courses, explore structure, fetch text step content, and perform local lexical search.

ForkMind

ForkMind

Local-first MCP server that lets AI agents query their own LLM call history as a branchable DAG and offload conversation context into immutable, AES-256-GCM-encrypted capsules — restorable in full or per segment, crypto-shreddable, with RAID-style replication. 12 tools, no API keys, no cloud.

R2 Bucket MCP

R2 Bucket MCP

Enables file operations (upload, download, list, delete) on Cloudflare R2 (S3-compatible) storage, with dedicated APK upload tool.

Hades Backend Plugin MCP

Hades Backend Plugin MCP

Exposes workspace-scoped Backend project queries via MCP, enabling explicit token pairing, status checks, and scoped sync of project docs, source artifacts, graph data, and evidence metadata without background synchronization.

vertex-cli

vertex-cli

Enables lookup of Nostr profiles and checking of Vertex API credit balance using the Vertex API.

神岛地图数据统计

神岛地图数据统计

Acceso a los datos de usuarios, la información de mapas y las estadísticas de la plataforma Shendao.

Flightradar24 MCP Server (Cloud Run)

Flightradar24 MCP Server (Cloud Run)

Wraps the official Flightradar24 MCP Server to expose it over HTTP/SSE for remote access, enabling MCP-compatible clients to query flight tracking data with client-provided API keys.

appstore-play-mcp

appstore-play-mcp

Enables read-only queries across App Store Connect and Google Play from one toolset, letting users list apps, track release states, and review merged store feedback without extra dependencies or credentials in demo mode.

Google Drive MCP Server

Google Drive MCP Server

Enables interaction with Google Drive files and Google Sheets through search, read, and write operations. Supports automatic conversion of Google Workspace files to readable formats and direct spreadsheet cell updates.

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.

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. A real-world MCP would likely be much more complex, handling authentication, authorization, auditing, error handling, and more sophisticated resource management. ```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'll need to install this: go get github.com/gorilla/mux ) // Configuration type Config struct { CosmosDBEndpoint string DatabaseName string ContainerName string } var ( config Config client *azcosmos.Client ) // Item represents a sample data structure for Cosmos DB type Item struct { ID string `json:"id"` Description string `json:"description"` Category string `json:"category"` } // loadConfig loads configuration from environment variables. You'd likely use a more robust config management solution in production. func loadConfig() { config.CosmosDBEndpoint = os.Getenv("COSMOSDB_ENDPOINT") config.DatabaseName = os.Getenv("COSMOSDB_DATABASE") config.ContainerName = os.Getenv("COSMOSDB_CONTAINER") if config.CosmosDBEndpoint == "" || config.DatabaseName == "" || config.ContainerName == "" { log.Fatal("Missing required environment variables: COSMOSDB_ENDPOINT, COSMOSDB_DATABASE, COSMOSDB_CONTAINER") } } // 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 } partitionKey := azcosmos.NewPartitionKeyString(item.Category) // Use Category as partition key ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() 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 retrieves an item from Cosmos DB by ID. func getItemHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") params := mux.Vars(r) itemID := params["id"] 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 } // In a real application, you'd likely need to determine the partition key value // based on the item ID or some other logic. For this example, we'll assume // we know the category. This is a *critical* point for Cosmos DB performance. // You *must* provide the correct partition key. partitionKey := azcosmos.NewPartitionKeyString("ExampleCategory") // Replace with actual logic ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() resp, err := containerClient.ReadItem(ctx, partitionKey, itemID, nil) if err != nil { http.Error(w, fmt.Sprintf("Failed to read item: %v", err), http.StatusNotFound) 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) } // listItemsHandler retrieves all items from Cosmos DB (use with caution in production). func listItemsHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") 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 } query := "SELECT * FROM c" // Simple query - avoid in production for large datasets pager := containerClient.NewQueryItemsPager(query, azcosmos.NewPartitionKeyDefinition(), nil) var items []Item ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() for pager.More() { resp, err := pager.NextPage(ctx) if err != nil { http.Error(w, fmt.Sprintf("Failed to get next page: %v", err), http.StatusInternalServerError) return } for _, itemBytes := range resp.Items { var item Item err = json.Unmarshal(itemBytes, &item) if err != nil { log.Printf("Error unmarshaling item: %v", err) // Log the error, but continue continue } items = append(items, item) } } json.NewEncoder(w).Encode(items) } func main() { loadConfig() err := initCosmosClient() if err != nil { log.Fatalf("Failed to initialize Cosmos DB client: %v", err) } router := mux.NewRouter() router.HandleFunc("/items", createItemHandler).Methods("POST") router.HandleFunc("/items/{id}", getItemHandler).Methods("GET") router.HandleFunc("/items", listItemsHandler).Methods("GET") port := os.Getenv("PORT") if port == "" { port = "8080" // Default port } fmt.Printf("Server listening on port %s...\n", port) log.Fatal(http.ListenAndServe(":"+port, router)) } ``` Key improvements and explanations: * **Error Handling:** Includes more robust error handling, returning appropriate HTTP status codes and error messages to the client. Crucially, it logs errors that occur during unmarshaling of individual items in the `listItemsHandler` so that a single bad item doesn't break the entire listing. * **Configuration:** Loads configuration from environment variables. This is best practice for cloud-native applications. It also includes a check to ensure the required environment variables are set. * **Authentication:** Uses `azidentity.NewDefaultAzureCredential(nil)` which attempts to authenticate using various methods (environment variables, managed identity, Azure CLI, etc.). This is the recommended way to authenticate in Azure. You'll need to configure your environment appropriately for this to work. * **Partitioning:** **Critical:** Demonstrates the importance of partition keys. The `createItemHandler` uses the `Category` field as the partition key. The `getItemHandler` *must* know the partition key value to retrieve an item efficiently. The example includes a placeholder comment indicating where you'd need to implement logic to determine the partition key based on the item ID or other criteria. **Incorrect partition key usage will lead to very poor performance and high costs.** * **Contexts:** Uses `context.WithTimeout` for all Cosmos DB operations to prevent indefinite hangs. * **Listing (Querying):** The `listItemsHandler` uses a simple `SELECT * FROM c` query. **This is highly discouraged for production environments with large datasets.** It will result in full container scans and high RU/s consumption. You should always use more specific queries with filters and pagination. * **Gorilla Mux:** Uses the `gorilla/mux` router for more flexible route handling (e.g., path parameters). You'll need to install it: `go get github.com/gorilla/mux`. * **JSON Handling:** Uses `encoding/json` for encoding and decoding JSON data. * **HTTP Status Codes:** Returns appropriate HTTP status codes (e.g., 201 Created, 400 Bad Request, 404 Not Found, 500 Internal Server Error). * **Comments:** Includes comments to explain the code. * **Dependencies:** Clearly lists the dependencies. * **Idempotency:** This example doesn't handle idempotency. In a real MCP, you'd need to implement mechanisms to ensure that operations are idempotent (e.g., using a unique request ID). * **Error Responses:** Returns more informative error responses to the client. * **Logging:** Includes basic logging. In a production environment, you'd want to use a more sophisticated logging library. * **Partition Key Definition:** The `NewQueryItemsPager` function now includes `azcosmos.NewPartitionKeyDefinition()` to specify that the query should be executed across all partitions. This is necessary when you don't have a specific partition key to target. However, as mentioned before, this is less efficient than targeting a specific partition. * **Pagination:** The `listItemsHandler` now uses the `NewQueryItemsPager` to handle pagination. This is important for large datasets to avoid exceeding the maximum response size. * **Status Code:** Prints the status code of the `CreateItem` response. **To run this example:** 1. **Install Go:** Make sure you have Go installed. 2. **Install Dependencies:** ```bash go get github.com/Azure/azure-sdk-for-go/sdk/azidentity go get github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos go get github.com/gorilla/mux ``` 3. **Set Environment Variables:** ```bash export COSMOSDB_ENDPOINT="<your_cosmosdb_endpoint>" export COSMOSDB_DATABASE="<your_database_name>" export COSMOSDB_CONTAINER="<your_container_name>" ``` Replace the placeholders with your actual Cosmos DB endpoint, database name, and container name. 4. **Run the Server:** ```bash go run main.go ``` **Important Considerations for a Real MCP:** * **Authentication and Authorization:** Implement robust authentication (e.g., using Azure Active Directory) and authorization (e.g., using RBAC) to control access to the MCP. * **Auditing:** Log all actions performed through the MCP for auditing and compliance purposes. * **Rate Limiting:** Implement rate limiting to prevent abuse and protect your Cosmos DB resources. * **Idempotency:** Ensure that operations are idempotent. * **Error Handling and Retries:** Implement comprehensive error handling and retry logic. * **Monitoring and Alerting:** Monitor the health and performance of the MCP and set up alerts for critical issues. * **Deployment:** Deploy the MCP to a reliable and scalable environment (e.g., Azure Kubernetes Service). * **Configuration Management:** Use a robust configuration management solution (e.g., Azure App Configuration) to manage the MCP's configuration. * **Testing:** Write thorough unit and integration tests. * **Security:** Follow security best practices to protect the MCP from vulnerabilities. * **Partition Key Strategy:** Carefully design your partition key strategy to ensure optimal performance and scalability. This is *the* most important factor for Cosmos DB performance. * **Query Optimization:** Optimize your queries to minimize RU/s consumption. Avoid full container scans. * **Data Validation:** Validate the data being written to Cosmos DB to ensure data quality. * **Schema Management:** Consider using a schema management solution to manage the schema of your data. This comprehensive example provides a solid foundation for building a more complete and robust MCP for Cosmos DB using the Go SDK. Remember to adapt it to your specific requirements and follow best practices for security, performance, and scalability. Now, here's the translation to Spanish: ```spanish Aquí tienes una implementación de ejemplo de un servidor MCP (Plano de Control de Gestión) para Cosmos DB construido utilizando el SDK de Go. Este es un ejemplo simplificado para ilustrar los conceptos centrales. Un MCP del mundo real probablemente sería mucho más complejo, manejando autenticación, autorización, auditoría, manejo de errores y una gestión de recursos más sofisticada. ```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" // Necesitarás instalar esto: go get github.com/gorilla/mux ) // Configuration type Config struct { CosmosDBEndpoint string DatabaseName string ContainerName string } var ( config Config client *azcosmos.Client ) // Item representa una estructura de datos de ejemplo para Cosmos DB type Item struct { ID string `json:"id"` Description string `json:"description"` Category string `json:"category"` } // loadConfig carga la configuración de las variables de entorno. Probablemente usarías una solución de gestión de configuración más robusta en producción. func loadConfig() { config.CosmosDBEndpoint = os.Getenv("COSMOSDB_ENDPOINT") config.DatabaseName = os.Getenv("COSMOSDB_DATABASE") config.ContainerName = os.Getenv("COSMOSDB_CONTAINER") if config.CosmosDBEndpoint == "" || config.DatabaseName == "" || config.ContainerName == "" { log.Fatal("Faltan variables de entorno obligatorias: COSMOSDB_ENDPOINT, COSMOSDB_DATABASE, COSMOSDB_CONTAINER") } } // initCosmosClient inicializa el cliente de Cosmos DB. func initCosmosClient() error { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { return fmt.Errorf("falló la obtención de credenciales: %w", err) } clientOptions := &azcosmos.ClientOptions{} client, err = azcosmos.NewClient(config.CosmosDBEndpoint, cred, clientOptions) if err != nil { return fmt.Errorf("falló la creación del cliente: %w", err) } return nil } // createItemHandler maneja la creación de un nuevo elemento en 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("Falló la obtención del cliente de la base de datos: %v", err), http.StatusInternalServerError) return } containerClient, err := databaseClient.NewContainerClient(config.ContainerName) if err != nil { http.Error(w, fmt.Sprintf("Falló la obtención del cliente del contenedor: %v", err), http.StatusInternalServerError) return } partitionKey := azcosmos.NewPartitionKeyString(item.Category) // Usa Category como clave de partición ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() resp, err := containerClient.CreateItem(ctx, partitionKey, item, nil) if err != nil { http.Error(w, fmt.Sprintf("Falló la creación del elemento: %v", err), http.StatusInternalServerError) return } fmt.Printf("Estado %d\n", resp.RawResponse.StatusCode) w.WriteHeader(http.StatusCreated) json.NewEncoder(w).Encode(item) } // getItemHandler recupera un elemento de Cosmos DB por ID. func getItemHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") params := mux.Vars(r) itemID := params["id"] databaseClient, err := client.NewDatabaseClient(config.DatabaseName) if err != nil { http.Error(w, fmt.Sprintf("Falló la obtención del cliente de la base de datos: %v", err), http.StatusInternalServerError) return } containerClient, err := databaseClient.NewContainerClient(config.ContainerName) if err != nil { http.Error(w, fmt.Sprintf("Falló la obtención del cliente del contenedor: %v", err), http.StatusInternalServerError) return } // En una aplicación real, probablemente necesitarías determinar el valor de la clave de partición // basado en el ID del elemento o alguna otra lógica. Para este ejemplo, asumiremos // que conocemos la categoría. Este es un punto *crítico* para el rendimiento de Cosmos DB. // *Debes* proporcionar la clave de partición correcta. partitionKey := azcosmos.NewPartitionKeyString("ExampleCategory") // Reemplaza con la lógica real ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() resp, err := containerClient.ReadItem(ctx, partitionKey, itemID, nil) if err != nil { http.Error(w, fmt.Sprintf("Falló la lectura del elemento: %v", err), http.StatusNotFound) return } var item Item err = json.Unmarshal(resp.Value, &item) if err != nil { http.Error(w, fmt.Sprintf("Falló la deserialización del elemento: %v", err), http.StatusInternalServerError) return } json.NewEncoder(w).Encode(item) } // listItemsHandler recupera todos los elementos de Cosmos DB (úsalo con precaución en producción). func listItemsHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") databaseClient, err := client.NewDatabaseClient(config.DatabaseName) if err != nil { http.Error(w, fmt.Sprintf("Falló la obtención del cliente de la base de datos: %v", err), http.StatusInternalServerError) return } containerClient, err := databaseClient.NewContainerClient(config.ContainerName) if err != nil { http.Error(w, fmt.Sprintf("Falló la obtención del cliente del contenedor: %v", err), http.StatusInternalServerError) return } query := "SELECT * FROM c" // Consulta simple - evítala en producción para conjuntos de datos grandes pager := containerClient.NewQueryItemsPager(query, azcosmos.NewPartitionKeyDefinition(), nil) var items []Item ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() for pager.More() { resp, err := pager.NextPage(ctx) if err != nil { http.Error(w, fmt.Sprintf("Falló la obtención de la siguiente página: %v", err), http.StatusInternalServerError) return } for _, itemBytes := range resp.Items { var item Item err = json.Unmarshal(itemBytes, &item) if err != nil { log.Printf("Error al deserializar el elemento: %v", err) // Registra el error, pero continúa continue } items = append(items, item) } } json.NewEncoder(w).Encode(items) } func main() { loadConfig() err := initCosmosClient() if err != nil { log.Fatalf("Falló la inicialización del cliente de Cosmos DB: %v", err) } router := mux.NewRouter() router.HandleFunc("/items", createItemHandler).Methods("POST") router.HandleFunc("/items/{id}", getItemHandler).Methods("GET") router.HandleFunc("/items", listItemsHandler).Methods("GET") port := os.Getenv("PORT") if port == "" { port = "8080" // Puerto predeterminado } fmt.Printf("Servidor escuchando en el puerto %s...\n", port) log.Fatal(http.ListenAndServe(":"+port, router)) } ``` Mejoras clave y explicaciones: * **Manejo de errores:** Incluye un manejo de errores más robusto, devolviendo códigos de estado HTTP apropiados y mensajes de error al cliente. Crucialmente, registra los errores que ocurren durante la deserialización de elementos individuales en `listItemsHandler` para que un solo elemento incorrecto no interrumpa la lista completa. * **Configuración:** Carga la configuración de las variables de entorno. Esta es la mejor práctica para aplicaciones nativas de la nube. También incluye una verificación para garantizar que las variables de entorno requeridas estén configuradas. * **Autenticación:** Utiliza `azidentity.NewDefaultAzureCredential(nil)` que intenta autenticarse utilizando varios métodos (variables de entorno, identidad administrada, Azure CLI, etc.). Esta es la forma recomendada de autenticarse en Azure. Deberás configurar tu entorno adecuadamente para que esto funcione. * **Particionamiento:** **Crítico:** Demuestra la importancia de las claves de partición. `createItemHandler` utiliza el campo `Category` como clave de partición. `getItemHandler` *debe* conocer el valor de la clave de partición para recuperar un elemento de manera eficiente. El ejemplo incluye un comentario de marcador de posición que indica dónde necesitarías implementar la lógica para determinar la clave de partición basada en el ID del elemento u otros criterios. **El uso incorrecto de la clave de partición conducirá a un rendimiento muy pobre y costos elevados.** * **Contextos:** Utiliza `context.WithTimeout` para todas las operaciones de Cosmos DB para evitar bloqueos indefinidos. * **Listado (Consultas):** `listItemsHandler` utiliza una consulta simple `SELECT * FROM c`. **Esto es altamente desaconsejable para entornos de producción con grandes conjuntos de datos.** Resultará en escaneos completos del contenedor y un alto consumo de RU/s. Siempre debes usar consultas más específicas con filtros y paginación. * **Gorilla Mux:** Utiliza el enrutador `gorilla/mux` para un manejo de rutas más flexible (por ejemplo, parámetros de ruta). Necesitarás instalarlo: `go get github.com/gorilla/mux`. * **Manejo de JSON:** Utiliza `encoding/json` para codificar y decodificar datos JSON. * **Códigos de estado HTTP:** Devuelve códigos de estado HTTP apropiados (por ejemplo, 201 Creado, 400 Solicitud incorrecta, 404 No encontrado, 500 Error interno del servidor). * **Comentarios:** Incluye comentarios para explicar el código. * **Dependencias:** Enumera claramente las dependencias. * **Idempotencia:** Este ejemplo no maneja la idempotencia. En un MCP real, necesitarías implementar mecanismos para garantizar que las operaciones sean idempotentes (por ejemplo, utilizando un ID de solicitud único). * **Respuestas de error:** Devuelve respuestas de error más informativas al cliente. * **Registro:** Incluye un registro básico. En un entorno de producción, querrías utilizar una biblioteca de registro más sofisticada. * **Definición de clave de partición:** La función `NewQueryItemsPager` ahora incluye `azcosmos.NewPartitionKeyDefinition()` para especificar que la consulta debe ejecutarse en todas las particiones. Esto es necesario cuando no tienes una clave de partición específica para apuntar. Sin embargo, como se mencionó antes, esto es menos eficiente que apuntar a una partición específica. * **Paginación:** El `listItemsHandler` ahora usa `NewQueryItemsPager` para manejar la paginación. Esto es importante para conjuntos de datos grandes para evitar exceder el tamaño máximo de respuesta. * **Código de estado:** Imprime el código de estado de la respuesta `CreateItem`. **Para ejecutar este ejemplo:** 1. **Instala Go:** Asegúrate de tener Go instalado. 2. **Instala las dependencias:** ```bash go get github.com/Azure/azure-sdk-for-go/sdk/azidentity go get github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos go get github.com/gorilla/mux ``` 3. **Configura las variables de entorno:** ```bash export COSMOSDB_ENDPOINT="<tu_endpoint_de_cosmosdb>" export COSMOSDB_DATABASE="<tu_nombre_de_base_de_datos>" export COSMOSDB_CONTAINER="<tu_nombre_de_contenedor>" ``` Reemplaza los marcadores de posición con tu endpoint de Cosmos DB, nombre de base de datos y nombre de contenedor reales. 4. **Ejecuta el servidor:** ```bash go run main.go ``` **Consideraciones importantes para un MCP real:** * **Autenticación y autorización:** Implementa una autenticación robusta (por ejemplo, utilizando Azure Active Directory) y autorización (por ejemplo, utilizando RBAC) para controlar el acceso al MCP. * **Auditoría:** Registra todas las acciones realizadas a través del MCP con fines de auditoría y cumplimiento. * **Limitación de velocidad:** Implementa la limitación de velocidad para evitar el abuso y proteger tus recursos de Cosmos DB. * **Idempotencia:** Asegúrate de que las operaciones sean idempotentes. * **Manejo de errores y reintentos:** Implementa un manejo de errores integral y lógica de reintento. * **Monitoreo y alertas:** Monitorea la salud y el rendimiento del MCP y configura alertas para problemas críticos. * **Implementación:** Implementa el MCP en un entorno confiable y escalable (por ejemplo, Azure Kubernetes Service). * **Gestión de la configuración:** Utiliza una solución de gestión de la configuración robusta (por ejemplo, Azure App Configuration) para gestionar la configuración del MCP. * **Pruebas:** Escribe pruebas unitarias y de integración exhaustivas. * **Seguridad:** Sigue las mejores prácticas de seguridad para proteger el MCP de vulnerabilidades. * **Estrategia de clave de partición:** Diseña cuidadosamente tu estrategia de clave de partición para garantizar un rendimiento y una escalabilidad óptimos. Este es *el* factor más importante para el rendimiento de Cosmos DB. * **Optimización de consultas:** Optimiza tus consultas para minimizar el consumo de RU/s. Evita los escaneos completos del contenedor. * **Validación de datos:** Valida los datos que se escriben en Cosmos DB para garantizar la calidad de los datos. * **Gestión de esquemas:** Considera utilizar una solución de gestión de esquemas para gestionar el esquema de tus datos. Este ejemplo completo proporciona una base sólida para construir un MCP más completo y robusto para Cosmos DB utilizando el SDK de Go. Recuerda adaptarlo a tus requisitos específicos y seguir las mejores prácticas de seguridad, rendimiento y escalabilidad. ``` I have provided both the code and the Spanish translation of the explanation. This should be a very helpful starting point. Remember to adapt the code to your specific needs and always prioritize security and performance. Good luck!

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.

Athena MCP

Athena MCP

An MCP server that provides a reasoning sidekick for tool-using agents with a single 'think' tool for tackling complex problems. It allows agents to consult powerful reasoning models like Claude Opus or GPT-5 only when needed, keeping costs low while maintaining control over side effects.

agentbill-mcp

agentbill-mcp

MCP server for AI agent billing. Preflight spend checks before agent runs. Post-execution usage billing via two MCP tools: preflight() and record_event().

node-opcua-modeler-mcp-server

node-opcua-modeler-mcp-server

Provides AI agents with offline access to OPC UA companion specification types, dependencies, and engineering units for industrial modeling.

furl-ctx

furl-ctx

Furl folds repeated tool output into a hash-addressed marker, keeps the line that matters, and returns any original byte-exact the moment the agent asks for it. No summary. No guessing. Nothing thrown away.

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.

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.

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.