
mcp
Updated 1mo agoby lmquanacs
mcp
A hand-rolled MCP (Model Context Protocol) server plus two client demos that talk to it
over Streamable HTTP, protocol version 2026-07-28:
mcp-server/— the server. Java 17, Gradle. See mcp-server/README.md for the full design and options.mcp-client/— a Java 17 client (McpClient+ aDemorunner).mcp-client-kt/— the same client ported to Kotlin 1.5 (McpClient+ aDemorunner). Targets Java 11 bytecode since Kotlin 1.5 predates JVM 17 target support; uses its own Gradle 7.6.4 wrapper for compatibility with the 1.5.x Kotlin Gradle plugin.
Each module is a standalone Gradle project (its own gradlew) — there is no root build.
Running the demo
1. Start the server
cd mcp-server
./gradlew run
This starts the server on http://127.0.0.1:3000/mcp against the mcp-server checkout
itself as the sandboxed workspace root. Leave it running in this terminal; use
--args="--root /path/to/workspace" to point it at a different directory, or see
mcp-server/README.md for every flag.
2a. Run the Java client demo
In a second terminal:
cd mcp-client
./gradlew run
To point at a different server: ./gradlew run --args="--url http://127.0.0.1:3000/mcp".
2b. Run the Kotlin client demo
In a second terminal:
cd mcp-client-kt
./gradlew run
Same --args="--url ..." override as the Java client.
Both demos drive every feature kind once — discovery, tools, resources, resource
templates, prompts, and completion — plus a sandbox-escape refusal and an unknown-method
error, printing each JSON-RPC result and the _meta/resultType envelope that comes
back with it.
3. Stop the server
Ctrl-C in the server's terminal, or from another shell: lsof -ti :3000 | xargs kill.
Related servers

n8n
Updated todayby n8n-io
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

mcp-server-fetch
OfficialUpdated 14d agoA Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs

@modelcontextprotocol/server-everything
OfficialUpdated 14d agoMCP server that exercises all the features of the MCP protocol