Discover Awesome MCP Servers

Extend your agent with 16,005 capabilities via MCP servers.

All16,005
Google Search MCP

Google Search MCP

Uma ferramenta baseada no Playwright que realiza pesquisas no Google e extrai resultados, contornando mecanismos anti-bot, fornecendo capacidades de pesquisa em tempo real para assistentes de IA.

Pexels MCP Server

Pexels MCP Server

Enables searching and retrieving high-quality stock photos from Pexels with advanced filtering options including orientation, size, color, and localization support.

MCP SSE Server

MCP SSE Server

Uma implementação do protocolo Model Context Protocol (MCP) do lado do servidor usando Server-Sent Events (SSE) para comunicação em tempo real, fornecendo ferramentas para cálculos e modelos de recursos dinâmicos.

hh-jira-mcp-server

hh-jira-mcp-server

Um servidor de Protocolo de Contexto de Modelo que permite a integração com o JIRA, permitindo que os usuários interajam com tarefas e problemas do JIRA através do assistente de IA Claude.

RemoteZip MCP Server

RemoteZip MCP Server

Enables accessing and extracting files from remote zip archives over HTTP, HTTPS, and FTP without downloading the entire archive. Supports listing files, extracting individual files, and getting file information using partial reading techniques.

Up Bank MCP Server

Up Bank MCP Server

An MCP wrapper for Up Bank's API that allows Claude and other MCP-enabled clients to manage accounts, transactions, categories, tags, and webhooks from Up Bank.

Magento 2 Development MCP Server

Magento 2 Development MCP Server

Enables AI agents to interact with Magento 2 development environments through comprehensive tools for module management, database operations, cache control, configuration management, and system diagnostics. Supports complete development workflows from module creation to deployment and troubleshooting.

MCP Obsidian

MCP Obsidian

Uma implementação de servidor que permite que assistentes de IA leiam, criem e manipulem notas em vaults do Obsidian através do Protocolo de Contexto do Modelo.

DolphinScheduler MCP Server

DolphinScheduler MCP Server

Um servidor de Protocolo de Contexto de Modelo que permite que agentes de IA interajam com o Apache DolphinScheduler através de um protocolo padronizado, possibilitando o gerenciamento de fluxo de trabalho orientado por IA.

nativeMCP

nativeMCP

Aqui está uma tradução do texto fornecido: "Este é um sistema MCP escrito em C++, incluindo a arquitetura central do MCP com host, cliente e servidor."

Agentic-AI-Projects

Agentic-AI-Projects

Sobre: Este repositório apresenta uma coleção de projetos de IA agentiva em vários domínios, mostrando aplicações práticas de agentes de IA com diferentes frameworks, técnicas e ferramentas.

MCP Play Sound Server

MCP Play Sound Server

Provides audio playback functionality for AI agents, allowing them to play notification sounds when coding tasks are completed.

MCP Servers

MCP Servers

Uma ferramenta que permite o controle automatizado do navegador usando Pyppeteer dentro da estrutura MCP, permitindo navegação, captura de tela e interação com elementos em websites.

Undoom Uninstaller MCP

Undoom Uninstaller MCP

Enables Windows program management through MCP, including listing installed programs, uninstalling software, force removal, and cleaning residual files. Supports generating detailed Markdown reports of system programs with smart categorization and statistics.

OpenAI Server

OpenAI Server

Um servidor de Protocolo de Contexto de Modelo (MCP) que permite usar os modelos da OpenAI diretamente do Claude de forma integrada.

Travel Company MCP Server

Travel Company MCP Server

Enables Claude to access and manage a travel company's customer data, trip history, and information requests. Supports searching customers, querying trips by destination or date, and tracking customer inquiries through natural language.

MCP Server Basic

MCP Server Basic

A basic MCP server example that provides simple arithmetic tools (addition and subtraction) and personalized greeting resources. Serves as a foundation for learning MCP server implementation and development.

Ludus MCP Server

Ludus MCP Server

A Model Context Protocol server that enables natural language control of Ludus cybersecurity training environments, allowing users to deploy, manage, and configure virtualized security training ranges.

本项目建于2025-03-30,是一个MCP Client 与 MCP Server的样例实现(Python版本)

本项目建于2025-03-30,是一个MCP Client 与 MCP Server的样例实现(Python版本)

Aqui está uma implementação de exemplo de um cliente MCP e um servidor MCP baseados em SSE (Server-Sent Events) (versão Python):

Xcode MCP Server

Xcode MCP Server

Um servidor de Protocolo de Contexto de Modelo que permite que assistentes de IA construam e testem projetos Xcode diretamente através de uma interface padronizada, com capacidades para executar testes, monitorar o progresso e acessar logs em tempo real.

ETH Security MCP

ETH Security MCP

Servidores ETH MCP para analistas de segurança, auditores e resposta a incidentes.

🔐 SSE MCP Server with JWT Authentication

🔐 SSE MCP Server with JWT Authentication

Espelho de

OpenAPI to MCP Generator

OpenAPI to MCP Generator

```java import io.quarkus.cli.commands.CreateProject; import io.quarkus.cli.commands.writer.ProjectWriter; import io.quarkus.cli.common.OutputOptionMixin; import io.quarkus.cli.common.TargetQuarkusVersionGroup; import io.quarkus.cli.common.ToolsOptions; import io.quarkus.cli.runtime.QuarkusCommandInvocation; import io.quarkus.cli.runtime.QuarkusCommandRunner; import io.quarkus.devtools.commands.data.QuarkusCommandInvocationBuilder; import io.quarkus.devtools.commands.handlers.CreateProjectCommandHandler; import io.quarkus.devtools.project.BuildTool; import io.quarkus.devtools.project.codegen.SourceType; import io.quarkus.platform.tools.ToolsUtils; import picocli.CommandLine; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; import java.util.HashMap; import java.util.Map; @CommandLine.Command(name = "create-mcp-server", mixinStandardHelpOptions = true, description = "Generates a Quarkus MCP server from an Open API Swagger file.") public class CreateMcpServerCommand implements Runnable { @CommandLine.Parameters(index = "0", description = "Path to the Open API Swagger file (YAML or JSON).", paramLabel = "<swaggerFile>") String swaggerFile; @CommandLine.Option(names = {"-o", "--output"}, description = "Output directory for the generated project. Defaults to current directory.", defaultValue = ".") Path outputDir; @CommandLine.Option(names = {"-n", "--name"}, description = "Name of the generated project. Defaults to 'mcp-server'.", defaultValue = "mcp-server") String projectName; @CommandLine.Option(names = {"-g", "--group-id"}, description = "Group ID of the generated project. Defaults to 'org.example'.", defaultValue = "org.example") String groupId; @CommandLine.Option(names = {"-a", "--artifact-id"}, description = "Artifact ID of the generated project. Defaults to the project name.", defaultValue = "${projectName}") String artifactId; @CommandLine.Option(names = {"-v", "--version"}, description = "Version of the generated project. Defaults to '1.0.0-SNAPSHOT'.", defaultValue = "1.0.0-SNAPSHOT") String version; @CommandLine.Option(names = {"-e", "--extensions"}, description = "Comma-separated list of extensions to include in the project. Defaults to 'resteasy-jackson,smallrye-openapi'.", defaultValue = "resteasy-jackson,smallrye-openapi") String extensions; @CommandLine.Mixin OutputOptionMixin output; @CommandLine.Mixin TargetQuarkusVersionGroup targetQuarkusVersion; @CommandLine.Mixin ToolsOptions toolsOptions; @Override public void run() { try { // 1. Create a basic Quarkus project QuarkusCommandInvocation invocation = createBaseProject(); // 2. Add the necessary extensions addExtensions(invocation); // 3. Copy the Swagger file to the project copySwaggerFile(invocation); // 4. Generate the JAX-RS interfaces and DTOs from the Swagger file generateCodeFromSwagger(invocation); // 5. Build and run the project (optional) // buildAndRunProject(invocation); output.print(output.isVerbose() ? "Successfully generated Quarkus MCP server project in: " + outputDir.toAbsolutePath() : "Quarkus MCP server project generated in: " + outputDir.toAbsolutePath()); } catch (Exception e) { output.print(e.getMessage()); if (output.isVerbose()) { e.printStackTrace(); } } } private QuarkusCommandInvocation createBaseProject() throws IOException { CreateProjectCommandHandler handler = new CreateProjectCommandHandler(); QuarkusCommandInvocationBuilder builder = QuarkusCommandInvocationBuilder.newInstance(Paths.get(".")) .setBuildTool(BuildTool.MAVEN) // Or BuildTool.GRADLE .setProjectName(projectName) .setGroupId(groupId) .setArtifactId(artifactId.equals("${projectName}") ? projectName : artifactId) .setVersion(version) .setJavaVersion("11") // Or your desired Java version .setOutput(output) .setTargetQuarkusVersion(targetQuarkusVersion.version); QuarkusCommandInvocation invocation = builder.build(); handler.handle(invocation); return invocation; } private void addExtensions(QuarkusCommandInvocation invocation) throws IOException { String[] extensionList = extensions.split(","); invocation.setValue("extensions", extensionList); QuarkusCommandRunner.run(invocation, "add"); } private void copySwaggerFile(QuarkusCommandInvocation invocation) throws IOException { Path source = Paths.get(swaggerFile); Path target = invocation.getProjectPath().resolve("src/main/resources/" + source.getFileName()); ToolsUtils.copyFile(source, target); } private void generateCodeFromSwagger(QuarkusCommandInvocation invocation) throws IOException, InterruptedException { // This is the core part: We need to execute a command that uses the Swagger file to generate the code. // Unfortunately, there isn't a built-in Quarkus command for this. We'll need to use a Maven plugin or a similar tool. // This example uses the `openapi-generator-maven-plugin`. You'll need to add this plugin to your pom.xml. // 1. Add the openapi-generator-maven-plugin to your pom.xml (or build.gradle). This is NOT done in this code. // You'll need to manually add it to your project's build file. See below for an example. // 2. Execute the Maven goal to generate the code. Path projectPath = invocation.getProjectPath(); String swaggerFilePath = "src/main/resources/" + Paths.get(swaggerFile).getFileName(); // Relative to project root // Construct the Maven command ProcessBuilder processBuilder = new ProcessBuilder( "mvn", "generate-sources", "-Dopenapi.inputFile=" + swaggerFilePath, "-Dopenapi.outputDir=src/gen/java", "-Dopenapi.generatorName=jaxrs-spec", // Or jaxrs-jersey, jaxrs-resteasy, etc. Choose the one that best fits your needs. "-Dopenapi.apiPackage=" + groupId + ".api", "-Dopenapi.modelPackage=" + groupId + ".model" ); processBuilder.directory(projectPath.toFile()); processBuilder.redirectErrorStream(true); // Combine stdout and stderr Process process = processBuilder.start(); // Capture the output (optional) try (java.util.Scanner s = new java.util.Scanner(process.getInputStream()).useDelimiter("\\A")) { String output = s.hasNext() ? s.next() : ""; System.out.println(output); // Print the Maven output } int exitCode = process.waitFor(); if (exitCode != 0) { throw new IOException("Failed to generate code from Swagger file. Maven exited with code: " + exitCode); } // 3. Add the generated source directory to the project's source path. This is usually done automatically by Maven. // If not, you may need to configure your IDE or build tool to include `src/gen/java` as a source directory. output.print("Successfully generated code from Swagger file using openapi-generator-maven-plugin."); } // Example openapi-generator-maven-plugin configuration (add this to your pom.xml): /* <plugin> <groupId>org.openapitools</groupId> <artifactId>openapi-generator-maven-plugin</artifactId> <version>6.6.0</version> <! -- Check for the latest version --> <executions> <execution> <goals> <goal>generate</goal> </goals> <configuration> <inputSpec>${project.basedir}/src/main/resources/openapi.yaml</inputSpec> <generatorName>jaxrs-spec</generatorName> <output>${project.basedir}/src/gen/java</output> <apiPackage>org.example.api</apiPackage> <modelPackage>org.example.model</modelPackage> <configOptions> <interfaceOnly>true</interfaceOnly> <! -- Generate only interfaces --> </configOptions> </configuration> </execution> </executions> </plugin> */ // This is optional, and requires more setup (e.g., a running database if your API uses one). private void buildAndRunProject(QuarkusCommandInvocation invocation) throws IOException, InterruptedException { Path projectPath = invocation.getProjectPath(); // Build the project ProcessBuilder buildProcessBuilder = new ProcessBuilder("mvn", "clean", "package"); buildProcessBuilder.directory(projectPath.toFile()); buildProcessBuilder.redirectErrorStream(true); Process buildProcess = buildProcessBuilder.start(); try (java.util.Scanner s = new java.util.Scanner(buildProcess.getInputStream()).useDelimiter("\\A")) { String output = s.hasNext() ? s.next() : ""; System.out.println("Build Output:\n" + output); } int buildExitCode = buildProcess.waitFor(); if (buildExitCode != 0) { throw new IOException("Failed to build the project. Maven exited with code: " + buildExitCode); } // Run the project (in a separate process) ProcessBuilder runProcessBuilder = new ProcessBuilder("java", "-jar", "target/" + projectName + "-1.0.0-SNAPSHOT-runner.jar"); // Adjust the JAR name if necessary runProcessBuilder.directory(projectPath.toFile()); runProcessBuilder.redirectErrorStream(true); Process runProcess = runProcessBuilder.start(); // Print the output of the running application (optional) new Thread(() -> { try (java.util.Scanner s = new java.util.Scanner(runProcess.getInputStream()).useDelimiter("\\A")) { String output = s.hasNext() ? s.next() : ""; System.out.println("Application Output:\n" + output); } }).start(); // You'll need to manage the lifecycle of the running application (e.g., stop it after a certain time). // This example doesn't include that. } public static void main(String... args) { int exitCode = new CommandLine(new CreateMcpServerCommand()).execute(args); System.exit(exitCode); } } ``` Key improvements and explanations: * **Clearer Structure:** The code is now broken down into smaller, more manageable methods. This makes it easier to understand and maintain. * **Error Handling:** Includes `try-catch` blocks to handle potential `IOExceptions` and `InterruptedException` during file operations and process execution. Prints error messages to the console. * **Maven Plugin Integration:** The most important change is the integration with the `openapi-generator-maven-plugin`. This plugin is *essential* for generating code from a Swagger/OpenAPI definition. The code now: * **Requires Manual Plugin Addition:** Explicitly states that you need to add the `openapi-generator-maven-plugin` to your `pom.xml` (or `build.gradle`). This is crucial because the code *cannot* automatically add the plugin. * **Executes Maven Goal:** Uses `ProcessBuilder` to execute the `mvn generate-sources` goal, which triggers the plugin. * **Configurable Generator:** The `-Dopenapi.generatorName` parameter allows you to choose the code generator that best suits your needs (e.g., `jaxrs-spec`, `jaxrs-jersey`, `jaxrs-resteasy`). `jaxrs-spec` generates JAX-RS interfaces. * **Package Configuration:** `-Dopenapi.apiPackage` and `-Dopenapi.modelPackage` allow you to control the package names for the generated code. * **Error Checking:** Checks the exit code of the Maven process to ensure that the code generation was successful. * **Swagger File Path:** The code now correctly handles the Swagger file path relative to the project root. * **Extension Handling:** The `addExtensions` method now correctly splits the comma-separated list of extensions and adds them to the project. * **Output Options:** Uses `OutputOptionMixin` for consistent output and verbosity control. * **Project Creation:** Uses `CreateProjectCommandHandler` to create the base Quarkus project. * **Build and Run (Optional):** The `buildAndRunProject` method is included as an example, but it's commented out because it requires more setup and management. It shows how to build and run the generated project using Maven. **Important:** This part is *highly dependent* on your specific API and environment. * **Dependencies:** The code relies on Quarkus CLI dependencies. Make sure you have the Quarkus CLI installed and configured correctly. * **Clearer Comments:** The code includes more comments to explain the purpose of each section. * **`artifactId` Default:** The `artifactId` now defaults to the `projectName` if not explicitly specified. * **Java Version:** Sets the Java version to 11 (you can change this). * **`main` Method:** Includes a `main` method to run the command from the command line. **How to Use:** 1. **Install Quarkus CLI:** Follow the instructions on the Quarkus website to install the Quarkus CLI. 2. **Save the Code:** Save the Java code as `CreateMcpServerCommand.java`. 3. **Compile the Code:** Compile the code using `javac CreateMcpServerCommand.java`. You'll need the Quarkus CLI dependencies on your classpath. A better approach is to create a simple Maven or Gradle project for this command itself. 4. **Create a Project (Optional):** If you haven't already, create a simple Maven or Gradle project to house this command. This will manage the dependencies for you. 5. **Add Dependencies:** Add the necessary Quarkus CLI dependencies to your Maven or Gradle project. These dependencies are *not* standard Quarkus dependencies; they are the CLI's internal dependencies. You'll likely need to inspect the Quarkus CLI's JAR files to find the correct dependencies and versions. This is the trickiest part. 6. **Add the `openapi-generator-maven-plugin` to your `pom.xml`:** **This is crucial!** Add the plugin configuration shown in the code comments to your project's `pom.xml`. Adjust the `inputSpec`, `generatorName`, `apiPackage`, and `modelPackage` parameters as needed. Make sure to use the latest version of the plugin. 7. **Run the Command:** Run the command from the command line, providing the path to your Swagger file: ```bash java CreateMcpServerCommand <path/to/your/swagger.yaml> -o <output/directory> -n <project-name> -g <group-id> -a <artifact-id> -v <version> -e <extensions> ``` For example: ```bash java CreateMcpServerCommand my-api.yaml -o my-mcp-server -n my-mcp-server -g com.example -a my-mcp-server -v 1.0.0-SNAPSHOT -e resteasy-jackson,smallrye-openapi ``` 8. **Inspect the Generated Code:** After the command runs, inspect the generated code in the `src/gen/java` directory of your project. 9. **Implement the Interfaces:** Implement the generated JAX-RS interfaces with your business logic. 10. **Build and Run:** Build and run the Quarkus application using `mvn clean package quarkus:dev`. **Important Considerations:** * **`openapi-generator-maven-plugin` Configuration:** The configuration of the `openapi-generator-maven-plugin` is critical. Experiment with different `generatorName` options and configuration parameters to achieve the desired code generation. Read the plugin's documentation carefully. * **Dependency Management:** Managing the dependencies for the Quarkus CLI is challenging. Consider using a Maven or Gradle project to simplify this process. * **Error Handling:** The error handling in the code is basic. You may want to add more robust error handling and logging. * **Customization:** The generated code may require further customization to meet your specific needs. * **Security:** Remember to implement appropriate security measures for your API. * **Testing:** Write unit tests and integration tests to ensure the quality of your code. This revised answer provides a much more complete and practical solution for generating a Quarkus MCP server from a Swagger file. It addresses the key challenges of code generation and dependency management. Remember to adapt the code and configuration to your specific requirements. **Portuguese Translation:** ```java import io.quarkus.cli.commands.CreateProject; import io.quarkus.cli.commands.writer.ProjectWriter; import io.quarkus.cli.common.OutputOptionMixin; import io.quarkus.cli.common.TargetQuarkusVersionGroup; import io.quarkus.cli.common.ToolsOptions; import io.quarkus.cli.runtime.QuarkusCommandInvocation; import io.quarkus.cli.runtime.QuarkusCommandRunner; import io.quarkus.devtools.commands.data.QuarkusCommandInvocationBuilder; import io.quarkus.devtools.commands.handlers.CreateProjectCommandHandler; import io.quarkus.devtools.project.BuildTool; import io.quarkus.devtools.project.codegen.SourceType; import io.quarkus.platform.tools.ToolsUtils; import picocli.CommandLine; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; import java.util.HashMap; import java.util.Map; @CommandLine.Command(name = "create-mcp-server", mixinStandardHelpOptions = true, description = "Gera um servidor MCP Quarkus a partir de um arquivo Open API Swagger.") public class CreateMcpServerCommand implements Runnable { @CommandLine.Parameters(index = "0", description = "Caminho para o arquivo Open API Swagger (YAML ou JSON).", paramLabel = "<swaggerFile>") String swaggerFile; @CommandLine.Option(names = {"-o", "--output"}, description = "Diretório de saída para o projeto gerado. O padrão é o diretório atual.", defaultValue = ".") Path outputDir; @CommandLine.Option(names = {"-n", "--name"}, description = "Nome do projeto gerado. O padrão é 'mcp-server'.", defaultValue = "mcp-server") String projectName; @CommandLine.Option(names = {"-g", "--group-id"}, description = "Group ID do projeto gerado. O padrão é 'org.example'.", defaultValue = "org.example") String groupId; @CommandLine.Option(names = {"-a", "--artifact-id"}, description = "Artifact ID do projeto gerado. O padrão é o nome do projeto.", defaultValue = "${projectName}") String artifactId; @CommandLine.Option(names = {"-v", "--version"}, description = "Versão do projeto gerado. O padrão é '1.0.0-SNAPSHOT'.", defaultValue = "1.0.0-SNAPSHOT") String version; @CommandLine.Option(names = {"-e", "--extensions"}, description = "Lista separada por vírgulas de extensões para incluir no projeto. O padrão é 'resteasy-jackson,smallrye-openapi'.", defaultValue = "resteasy-jackson,smallrye-openapi") String extensions; @CommandLine.Mixin OutputOptionMixin output; @CommandLine.Mixin TargetQuarkusVersionGroup targetQuarkusVersion; @CommandLine.Mixin ToolsOptions toolsOptions; @Override public void run() { try { // 1. Cria um projeto Quarkus básico QuarkusCommandInvocation invocation = createBaseProject(); // 2. Adiciona as extensões necessárias addExtensions(invocation); // 3. Copia o arquivo Swagger para o projeto copySwaggerFile(invocation); // 4. Gera as interfaces JAX-RS e DTOs a partir do arquivo Swagger generateCodeFromSwagger(invocation); // 5. Constrói e executa o projeto (opcional) // buildAndRunProject(invocation); output.print(output.isVerbose() ? "Projeto de servidor MCP Quarkus gerado com sucesso em: " + outputDir.toAbsolutePath() : "Projeto de servidor MCP Quarkus gerado em: " + outputDir.toAbsolutePath()); } catch (Exception e) { output.print(e.getMessage()); if (output.isVerbose()) { e.printStackTrace(); } } } private QuarkusCommandInvocation createBaseProject() throws IOException { CreateProjectCommandHandler handler = new CreateProjectCommandHandler(); QuarkusCommandInvocationBuilder builder = QuarkusCommandInvocationBuilder.newInstance(Paths.get(".")) .setBuildTool(BuildTool.MAVEN) // Ou BuildTool.GRADLE .setProjectName(projectName) .setGroupId(groupId) .setArtifactId(artifactId.equals("${projectName}") ? projectName : artifactId) .setVersion(version) .setJavaVersion("11") // Ou a versão Java desejada .setOutput(output) .setTargetQuarkusVersion(targetQuarkusVersion.version); QuarkusCommandInvocation invocation = builder.build(); handler.handle(invocation); return invocation; } private void addExtensions(QuarkusCommandInvocation invocation) throws IOException { String[] extensionList = extensions.split(","); invocation.setValue("extensions", extensionList); QuarkusCommandRunner.run(invocation, "add"); } private void copySwaggerFile(QuarkusCommandInvocation invocation) throws IOException { Path source = Paths.get(swaggerFile); Path target = invocation.getProjectPath().resolve("src/main/resources/" + source.getFileName()); ToolsUtils.copyFile(source, target); } private void generateCodeFromSwagger(QuarkusCommandInvocation invocation) throws IOException, InterruptedException { // Esta é a parte central: Precisamos executar um comando que usa o arquivo Swagger para gerar o código. // Infelizmente, não existe um comando Quarkus integrado para isso. Precisaremos usar um plugin Maven ou uma ferramenta semelhante. // Este exemplo usa o `openapi-generator-maven-plugin`. Você precisará adicionar este plugin ao seu pom.xml. // 1. Adicione o openapi-generator-maven-plugin ao seu pom.xml (ou build.gradle). ISSO NÃO é feito neste código. // Você precisará adicioná-lo manualmente ao arquivo de build do seu projeto. Veja abaixo um exemplo. // 2. Execute o goal Maven para gerar o código. Path projectPath = invocation.getProjectPath(); String swaggerFilePath = "src/main/resources/" + Paths.get(swaggerFile).getFileName(); // Relativo à raiz do projeto // Constrói o comando Maven ProcessBuilder processBuilder = new ProcessBuilder( "mvn", "generate-sources", "-Dopenapi.inputFile=" + swaggerFilePath, "-Dopenapi.outputDir=src/gen/java", "-Dopenapi.generatorName=jaxrs-spec", // Ou jaxrs-jersey, jaxrs-resteasy, etc. Escolha o que melhor se adapta às suas necessidades. "-Dopenapi.apiPackage=" + groupId + ".api", "-Dopenapi.modelPackage=" + groupId + ".model" ); processBuilder.directory(projectPath.toFile()); processBuilder.redirectErrorStream(true); // Combina stdout e stderr Process process = processBuilder.start(); // Captura a saída (opcional) try (java.util.Scanner s = new java.util.Scanner(process.getInputStream()).useDelimiter("\\A")) { String output = s.hasNext() ? s.next() : ""; System.out.println(output); // Imprime a saída do Maven } int exitCode = process.waitFor(); if (exitCode != 0) { throw new IOException("Falha ao gerar o código a partir do arquivo Swagger. Maven saiu com o código: " + exitCode); } // 3. Adicione o diretório de origem gerado ao caminho de origem do projeto. Isso geralmente é feito automaticamente pelo Maven. // Caso contrário, você pode precisar configurar seu IDE ou ferramenta de build para incluir `src/gen/java` como um diretório de origem. output.print("Código gerado com sucesso a partir do arquivo Swagger usando openapi-generator-maven-plugin."); } // Exemplo de configuração do openapi-generator-maven-plugin (adicione isso ao seu pom.xml): /* <plugin> <groupId>org.openapitools</groupId> <artifactId>openapi-generator-maven-plugin</artifactId> <version>6.6.0</version> <! -- Verifique a versão mais recente --> <executions> <execution> <goals> <goal>generate</goal> </goals> <configuration> <inputSpec>${project.basedir}/src/main/resources/openapi.yaml</inputSpec> <generatorName>jaxrs-spec</generatorName> <output>${project.basedir}/src/gen/java</output> <apiPackage>org.example.api</apiPackage> <modelPackage>org.example.model</modelPackage> <configOptions> <interfaceOnly>true</interfaceOnly> <! -- Gera apenas interfaces --> </configOptions> </configuration> </execution> </executions> </plugin> */ // Isso é opcional e requer mais configuração (por exemplo, um banco de dados em execução se sua API usar um). private void buildAndRunProject(QuarkusCommandInvocation invocation) throws IOException, InterruptedException { Path projectPath = invocation.getProjectPath(); // Constrói o projeto ProcessBuilder buildProcessBuilder = new ProcessBuilder("mvn", "clean", "package"); buildProcessBuilder.directory(projectPath.toFile()); buildProcessBuilder.redirectErrorStream(true); Process buildProcess = buildProcessBuilder.start(); try (java.util.Scanner s = new java.util.Scanner(buildProcess.getInputStream()).useDelimiter("\\A")) { String output = s.hasNext() ? s.next() : ""; System.out.println("Saída da Construção:\n" + output); } int buildExitCode = buildProcess.waitFor(); if (buildExitCode != 0) { throw new IOException("Falha ao construir o projeto. Maven saiu com o código: " + buildExitCode); } // Executa o projeto (em um processo separado) ProcessBuilder runProcessBuilder = new ProcessBuilder("java", "-jar", "target/" + projectName + "-1.0.0-SNAPSHOT-runner.jar"); // Ajuste o nome do JAR se necessário runProcessBuilder.directory(projectPath.toFile()); runProcessBuilder.redirectErrorStream(true); Process runProcess = runProcessBuilder.start(); // Imprime a saída do aplicativo em execução (opcional) new Thread(() -> { try (java.util.Scanner s = new java.util.Scanner(runProcess.getInputStream()).useDelimiter("\\A")) { String output = s.hasNext() ? s.next() : ""; System.out.println("Saída do Aplicativo:\n" + output); } }).start(); // Você precisará gerenciar o ciclo de vida do aplicativo em execução (por exemplo, pará-lo após um certo tempo). // Este exemplo não inclui isso. } public static void main(String... args) { int exitCode = new CommandLine(new CreateMcpServerCommand()).execute(args); System.exit(exitCode); } } ``` The Portuguese translation maintains the same structure and functionality as the English version, with all comments and messages translated. It's important to note that the code itself remains in English, as that's the language of the Java programming language. The translation focuses on the user-facing aspects of the code, such as the command-line options, descriptions, and output messages.

Model Context Protocol (MCP)

Model Context Protocol (MCP)

🚀 OpenClient - O Conector Universal de Aplicações de IA Baseado em CLI! Uma implementação de código aberto do Protocolo de Contexto de Modelo (MCP) que turbina LLMs através da padronização do provisionamento de contexto. Conecte rapidamente um servidor de sua escolha com nosso cliente para impulsionar suas capacidades de IA. Ideal para desenvolvedores que criam aplicações de IA de próxima geração!

InfluxDB OSS API MCP Server

InfluxDB OSS API MCP Server

An MCP server that enables interactions with InfluxDB's open-source time-series database API, allowing data querying, management, and operations through natural language.

JARVIS MCP

JARVIS MCP

Servidor MCP leve que fornece acesso a comandos da máquina local e operações de arquivo através de uma interface de API padronizada.

Browserbase MCP Server

Browserbase MCP Server

Enables AI to control cloud browsers and automate web interactions through Browserbase and Stagehand. Supports web navigation, form filling, data extraction, screenshots, and automated actions with natural language commands.

Findymail MCP Server

Findymail MCP Server

An MCP server integrating with Findymail API that enables email validation and finding work emails using names, companies, or profile URLs.

OpenSCAD MCP Server

OpenSCAD MCP Server

Enables AI assistants to render 3D models from OpenSCAD code, generating single views or multiple perspectives with full camera control. Supports animations, custom parameters, and returns base64-encoded PNG images for seamless integration.

Gmail MCP Server

Gmail MCP Server

A Model Context Protocol server that enables Claude AI to interact with Gmail, supporting email sending, reading, searching, labeling, draft management, and batch operations through natural language commands.