{ "$schema": "https://raw.githubusercontent.com/machanism-org/machai/refs/heads/main/bindex-core/src/main/resources/schema/bindex-schema-v2.json", "id": "org.machanism.machai:gw-mcp-server:1.4.1", "name": "org.machanism.machai:gw-mcp-server", "version": "1.4.1", "description": "Ghostwriter MCP Server is an executable Java 17 Model Context Protocol (MCP) server. It combines Ghostwriter project-aware code-assistance workflows with Bindex Core library-metadata retrieval, registration, and recommendation capabilities, and exposes them through the Machai MCP Server runtime. MCP clients, IDE integrations, and developer-automation processes can launch it as a local STDIO process or connect to its HTTP server mode. The server entry point is org.machanism.machai.mcp.server.McpServer. It can be configured with a server name, project directory, version, network port, and streamable HTTP session mode; Ghostwriter model-assisted workflows use the configured CodeMie provider and model settings described by this project.", "authors": [ { "name": "Viktor Tovstyi", "email": "viktor.tovstyi@gmail.com", "website": "https://machanism.org" } ], "license": "Apache License, Version 2.0", "classification": { "type": "executable MCP server", "domains": [ "Model Context Protocol", "AI-assisted software development", "Developer automation", "Project-aware code assistance", "Library metadata retrieval and registration", "Semantic library discovery and recommendation" ], "languages": [ { "name": "Java", "version": "17" } ], "layers": [ "Adapters", "Infrastructure" ], "usageContext": [ "Local STDIO MCP client integration", "Remote HTTP MCP client integration", "AI-assisted development workflows", "Maven-based Java projects", "Bindex metadata discovery and registration" ], "targetEnvironment": [ "Java" ], "integrations": [ "Model Context Protocol clients", "CodeMie", "Maven Central" ] }, "constructors": [ { "package": "org.machanism.machai.mcp.server", "signature": "public org.machanism.machai.mcp.server.McpServer()", "description": "Creates the MCP server entry-point object. Operational startup is performed by the static main method, normally through the assembled executable JAR.", "examples": [ { "snippet": "org.machanism.machai.mcp.server.McpServer server = new org.machanism.machai.mcp.server.McpServer();", "description": "Creates the documented entry-point class in Java. For a real MCP deployment, launch the static entry point using the executable JAR so the runtime manages its configured transport." } ] } ], "features": [ { "package": "org.machanism.machai.mcp.server", "name": "main", "signature": "public static void main(java.lang.String[] args) throws java.lang.Exception", "description": "Starts the unified Ghostwriter and Bindex MCP tool server. With no port option it uses STDIO; specifying -p or --port starts remote HTTP server mode. The -s or --session option enables streamable mode for the HTTP server.", "examples": [ { "snippet": "java -jar gw-mcp-server-1.4.1.jar --port 45000 --session", "description": "Runs a streamable HTTP MCP server on port 45000. An HTTP-capable MCP client can then connect and discover the Ghostwriter and Bindex tools exposed by the runtime." }, { "snippet": "java -jar gw-mcp-server-1.4.1.jar --projectDir . --name ghostwriter-local", "description": "Runs the server in its default STDIO mode, names it ghostwriter-local, and supplies the current project directory for project-aware workflows." } ] }, { "package": "org.machanism.machai.mcp.server", "name": "getConfigurator", "signature": "public static org.machanism.macha.core.commons.configurator.PropertiesConfigurator getConfigurator(java.lang.String configFile) throws java.io.IOException", "description": "Creates the properties configurator used by the server and loads the requested configuration file. When configFile is null, the default MCP configuration file is used and its absence is tolerated; an explicitly requested file that cannot be read produces an IOException.", "examples": [ { "snippet": "org.machanism.macha.core.commons.configurator.PropertiesConfigurator configurator = org.machanism.machai.mcp.server.McpServer.getConfigurator(\"gw.properties\");", "description": "Loads an explicitly named server properties file before using the server runtime. The properties file location and contents must be valid for the selected underlying runtime and AI provider." } ] } ], "customizations": [ { "name": "MCP command-line transport options", "package": "org.machanism.machai.mcp.server", "description": "The server accepts -p or --port for HTTP mode, -s or --session for streamable HTTP mode, -d or --projectDir for the project path, -n or --name for the server name, -v or --version for the advertised version, and -h or --help for usage information. Without a port it uses STDIO.", "type": "command-line options", "examples": [ { "snippet": "java -jar gw-mcp-server-1.4.1.jar -d . -n ghostwriter -p 45000 -s", "description": "Configures the project directory and server name, then starts streamable HTTP mode on port 45000." } ] }, { "name": "Ghostwriter AI provider configuration", "description": "The Maven build sets genai.serverId to CodeMie and gw.model to CodeMie:gpt-5.5-2026-04-24. Provider credentials and connection details are supplied through the selected Ghostwriter and Machai runtime configuration rather than by this module's POM.", "type": "configuration properties", "examples": [ { "snippet": "genai.serverId=CodeMie\ngw.model=CodeMie:gpt-5.5-2026-04-24", "description": "Example provider and provider-qualified model values for the applicable Ghostwriter or Machai runtime properties configuration." } ] } ], "examples": [ { "name": "Build, configure, and launch a local STDIO MCP server", "steps": [ "Install a Java 17 runtime and Maven.", "From the project root, build the executable artifact with mvn clean install.", "Configure CodeMie credentials and any required provider connection settings in the Ghostwriter or Machai runtime configuration. Use genai.serverId=CodeMie and gw.model=CodeMie:gpt-5.5-2026-04-24 when the defaults need to be stated explicitly.", "Locate the assembled gw-mcp-server-1.4.1.jar artifact produced by the build and configure the MCP client to launch java -jar followed by that JAR path and -d .", "Start the MCP client. Because no -p or --port is supplied, the client communicates with the server over standard input and output.", "Use the client's tool catalog to invoke an available Ghostwriter project workflow or Bindex metadata workflow." ], "description": "This is the standard local-process scenario for an IDE or AI assistant that launches and manages an MCP server over STDIO." }, { "name": "Run a remote streamable HTTP MCP server", "steps": [ "Build the project with mvn clean install and prepare the assembled executable JAR.", "Configure the selected AI provider through the underlying Ghostwriter or Machai runtime configuration if model-assisted workflows will be used.", "Start the server with java -jar gw-mcp-server-1.4.1.jar --projectDir . --port 45000 --session.", "Configure an HTTP-capable MCP client to connect to the server at the host and port where it is running.", "Connect the client and invoke the advertised Ghostwriter or Bindex tools for the target project." ], "description": "This scenario exposes the same MCP capabilities over HTTP and enables the server's streamable session mode." }, { "name": "Declare the server artifact as a Maven dependency", "configuration": "org.machanism.machaigw-mcp-server1.4.1", "steps": [ "Add the shown dependency to a Maven project's pom.xml.", "Ensure the snapshot version is resolved from the appropriate snapshot repository or is available in the local Maven repository.", "Invoke org.machanism.machai.mcp.server.McpServer.main from the hosting application only when embedding the runtime is intended; otherwise use the standalone assembled JAR for process isolation." ], "description": "This dependency configuration is useful for applications that intentionally embed the server entry point rather than launching the standalone process." } ], "dependencies": [ "org.machanism.machai:ghostwriter:1.4.1", "org.machanism.machai:bindex-core:1.4.1", "org.machanism.machai:machai-mcp-server:1.4.1", "org.slf4j:slf4j-api:2.0.17" ], "location": { "repositoryType": "Maven", "repositoryUrl": "https://central.sonatype.com/artifact/org.machanism.machai/gw-mcp-server", "coordinates": { "group": "org.machanism.machai", "artifactId": "gw-mcp-server", "version": "1.4.1", "extension": "jar" } } }