使用说明
PluMCP
Model Context Protocol (MCP) SDK for Java and JavaScript runtimes. Build MCP clients and servers using Clojure/ClojureScript.
PluMCP is a low-dependency Clojure/ClojureScript library for making MCP clients and servers. Connect your business (data, process and software) with AI Agents using MCP and idiomatic Clojure.
Rationale
- Complete: Enjoy all non-deprecated MCP features and transports
- Reach: Clojure/ClojureScript reaches Java/JavaScript eco-systems
- Ergonomic: User-friendly API, automatic error-checking
- Light: Low dependency, Bring your own dependency
- Flexible: Composable design with configurable/overridable defaults
- Secure: OAuth 2.1 integrated with Streamable HTTP transport
Who is using PluMCP?
Funding and Support
Show your support, star the Github repo!
Fund this project
- Sponsor this project via Github Sponsors
- Hire me for consulting, development or training
Thank you, sponsors!
Many thanks to Clojurists Together for sponsoring this project for Q2 2026.
The scope of work for this sponsorship is documented here.
Development
There are Makefile targets for various development tasks:
Setup and teardown
make setup
make clean
make distclean # needs `make setup` later
Running tests
make clj-test # run tests in Clojure/JVM
make cljs-test # run tests in Node.js
Enable OAuth tests (disabled by default)
- Copy
test-config.template.edntotest-config.edn - Edit suitably
- Enable OAuth in
src/test/plumcp/core/test/transport_test.cljc(inauth-options-fn)
Enable OAuth when running local MCP server (Streamable HTTP)
Enable OAuth in src/main/plumcp/core/main/main_http_server.cljc (in main/-main)
Alternatives to OAuth Dynamic Client Registration (DCR) for testing
Use preregistered OAuth client
Uncomment :client-id and :client-secret in src/main/plumcp/core/main/client.cljc (in make-http-transport)
Use Client ID Metadata Document (CIMD)
- Edit
script/client-id-metadata-document/client.jsonsuitably - Run a web server serving the
client.jsonfile:cd script/client-id-metadata-document jwebserver # this utility is part of JDK since Java 18 - Run a tunneling service, e.g. cloudflared:
cloudflared tunnel --url http://localhost:8000 - Make sure
"client_id"points to the HTTPS URL forclient.json - Now test with your OAuth Authorization server
Module release
# Edit `module-project-clj.bb` for version
make install-all-modules
make clean-all-modules
License
Copyright © 2025-2026 Shantanu Kumar
This program and the accompanying materials are made available under the terms of the Eclipse Public License 1.0 which is available at https://www.eclipse.org/legal/epl/epl-v10.html.