
ne írj semmi mást csak a teljes fájlokat es kommentek nem le...
Prompt
ne írj semmi mást csak a teljes fájlokat es kommentek nem lehetnek benne! soha semmi egyszerusitett mock placeholder dummy szimulalt fake szart nem engedelyezek es teljes fájl roviditetlen production ready kód nem lehet trancutted nem lehet olyan hogy …és hasonlóan 50 xy nem lehet dummy to do sorry hiányosság minden fájl teljes kódját egyesével fájkba írod semmi mást nem írsz ezen kívűl Build a complete, production-ready remote Model Context Protocol (MCP) server from scratch that serves exclusively the Markdown files contained in the single Git repository located at https://github.com/cupcakke/alabama.git. The server must make the full textual content of every .md file in that repository available for reading and searching by any remote MCP client that supplies only a Server URL. The finished system must contain every source file, dependency manifest, and build artifact required to compile and run the server. No authentication, no tests, no license file, no documentation files, no README, and no other non-essential artifacts are permitted. No placeholders, stubs, mocks, or incomplete implementations are allowed; every line of code required for correct operation must be present and functional. Construct the system in the following order. 1 Project foundation and fixed repository binding Create the project root with a dependency manifest that lists exact versions of all packages required for HTTP serving, Git cloning, Markdown handling, and MCP protocol support. Hard-code the target repository URL as https://github.com/cupcakke/alabama.git and the reference as main. Accept only two runtime parameters via environment variables: ◦ PORT (default 8080) ◦ TOOL_NAME (default search_alabama_md) ◦ TOOL_PREFIX (optional string prepended to the tool name) Validate the parameters at startup and exit with a clear error on any invalid value. The repository URL and the restriction to .md files remain fixed and non-configurable. 2 Content acquisition restricted to Markdown files Implement a module that performs a shallow clone of https://github.com/cupcakke/alabama.git into a temporary or configurable data directory. After cloning, walk the tree and retain only files whose names end with the .md extension. Discard every non-Markdown file. For each retained .md file store its relative path from the repository root and its complete UTF-8 text content. Provide two internal functions: ◦ listMarkdownFiles() that returns the ordered list of relative paths ◦ readOrSearch(query: string, path?: string) that either returns the full untruncated content of a named Markdown file or returns ranked snippets from all Markdown files matching the query, each accompanied by its originating path. 3 MCP tool surface Implement a standards-compliant MCP server that advertises exactly one tool. The tool name is formed by concatenating TOOL_PREFIX (when supplied) with TOOL_NAME. The tool’s JSON Schema declares a single required argument: query (string). When the query value exactly matches a relative path of an existing .md file, the tool returns the complete Markdown source of that file. When the query is free text, the tool returns ranked snippets drawn from the bodies of all Markdown files together with their paths. Support the full MCP message lifecycle: initialize, tools/list, tools/call, and clean process termination. 4 Remote HTTP transport Expose the MCP server on a single Streamable-HTTP endpoint at path /mcp. Accept JSON-RPC requests via HTTP POST. The endpoint is completely open; no authentication of any kind is implemented or required. Enable CORS headers that allow unrestricted cross-origin access. Bind the listener to the configured PORT and keep the process running until a termination signal is received. Return proper JSON-RPC error objects for malformed requests or internal failures. 5 Minimal operational packaging Supply a single command-line entry point that loads the environment variables, clones the repository, indexes only the Markdown files, starts the HTTP listener on the chosen port, and prints the listening address together with the final tool name. Include a Dockerfile that produces a minimal production image containing only the compiled artifacts and the dependency lock file, runs as a non-root user, and exposes the chosen port. Emit the dependency lock file with resolved versions. 6 Complete source distribution Deliver every source file and type definition required for a working production binary. When the resulting package is built and started, it must listen on the configured port, expose the single Markdown-search tool under the chosen name, and allow any remote MCP client that supplies only the Server URL to list the tool and retrieve the full content of any .md file belonging to https://github.com/cupcakke/alabama.git or to search across those files. No component may be left incomplete or replaced by a placeholder.