Token导航 LogoToken导航

MCP Server · AI代理

Java Remote

一个基于Java的远程模型上下文协议(MCP)服务器实现,使用HTTP/SSE传输,支持多客户端并发访问和工具调用。

未说明官方级别未说明来源级核验工具 3
远程服务协议实现JavaClaudeAI代理Claude Desktop

快速开始

公开资料没有提供安装命令,按仓库或官方文档接入。
作者 / 组织
steveo-ocheng
提供方
steveo-ocheng

工具数量

3

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

0

仓库热度

收录来源

1 个

MCP World

选型结论

Java Remote 属于AI代理类 MCP Server,公开资料标注 3 个工具,通过传输方式未标注接入,适配 Claude Desktop、Claude,没有现成的安装命令;接入前要先准备 OAuth 授权。

分类

AI代理

传输方式

未说明

认证方式

OAuth 授权

部署方式

公开资料未说明

安装与配置

公开目录没有给出安装命令,需要按仓库 README安装;下面按同类条目的通用流程说明。

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    先确认运行方式

    公开资料没有标注传输方式,先看仓库 README,确认是本地进程还是远程地址。

  2. 2

    获取服务

    公开目录没有给出安装命令,按仓库 README里的步骤安装或获取服务。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 3 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

公开资料仍需确认:安装命令

详细介绍

MCP Remote Server (Java)

A remote implementation of a Model Context Protocol (MCP) server in Java using HTTP/SSE transport. This is a proof-of-concept showing how to adapt a local stdio-based MCP server to work over the network.

Key Differences from Local MCP Server

Local (stdio) Version

  • Communication via stdin/stdout pipes
  • Claude Desktop spawns the Java process directly
  • Single client per server instance
  • No network layer or authentication
  • Process lifecycle managed by client

Remote (HTTP/SSE) Version

  • Communication via HTTP POST and Server-Sent Events (SSE)
  • Server runs independently as a web service
  • Multiple concurrent clients supported
  • Network-based with potential for authentication/authorization
  • Server has independent lifecycle

Architecture

Transport Layer

HTTP/SSE Model:

  • Client → Server: HTTP POST requests to /message endpoint
  • Server → Client: Server-Sent Events via /sse endpoint
  • Protocol: Same JSON-RPC 2.0 MCP messages, different transport

Components

MCPHttpServer.java - HTTP server using Javalin framework

  • Manages SSE connections from clients
  • Routes HTTP POST messages to request processor
  • Handles multiple concurrent client sessions
  • Provides health check and info endpoints

MCPRequestProcessor.java - Transport-agnostic MCP logic

  • Processes JSON-RPC 2.0 requests
  • Routes to tool implementations
  • Same logic as stdio version, but decoupled from I/O

Tool implementations - Unchanged from local version

  • CalculateTool, ReverseTextTool, WordCountTool
  • Same interface and behavior

Building and Running

Build

./gradlew build

This creates build/libs/mcp-server-remote-1.0.0.jar

Run the Server

# Default port 8080
./gradlew run

# Or with custom port
java -jar build/libs/mcp-server-remote-1.0.0.jar 8081

Test the Server

Check health:

curl http://localhost:8080/health

Get server info:

curl http://localhost:8080/

Test a tool call:

curl -X POST http://localhost:8080/message \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "calculate",
      "arguments": {
        "operation": "add",
        "a": 5,
        "b": 3
      }
    }
  }'

Initialize session:

curl -X POST http://localhost:8080/message \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize",
    "params": {
      "protocolVersion": "2024-11-05",
      "capabilities": {},
      "clientInfo": {
        "name": "test-client",
        "version": "1.0.0"
      }
    }
  }'

List tools:

curl -X POST http://localhost:8080/message \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/list"
  }'

Claude Desktop Integration

To use this remote server with Claude Desktop, you would need an MCP client that supports HTTP/SSE transport. The official MCP SDKs support this pattern.

Example configuration (conceptual - requires MCP client with SSE support):

{
  "mcpServers": {
    "mcp-server-remote-java": {
      "url": "http://localhost:8080/sse",
      "transport": "sse"
    }
  }
}

Note: The current Claude Desktop primarily supports stdio transport. This remote server is designed for:

  • Custom MCP clients
  • Web applications
  • Microservice architectures
  • Multi-tenant scenarios

API Endpoints

GET /

Server information and available endpoints

GET /health

Health check endpoint

{
  "status": "ok",
  "server": "mcp-server-remote-java",
  "version": "1.0.0",
  "activeConnections": 0
}

GET /sse

Establish Server-Sent Events connection for receiving server messages. Returns:

  • connected event with client ID
  • Periodic heartbeats to keep connection alive

POST /message

Send JSON-RPC 2.0 MCP messages. Accepts standard MCP methods:

  • initialize - Handshake
  • tools/list - List available tools
  • tools/call - Execute a tool
  • prompts/list - List prompts (empty)
  • resources/list - List resources (empty)

Adding New Tools

Same process as local server:

  1. Create a class implementing Tool interface
  2. Implement getName(), getDefinition(), and execute()
  3. Register in MCPRequestProcessor.registerTools()
  4. Rebuild and restart server

Deployment Considerations

When deploying this server in production:

Security

  • Add authentication (API keys, OAuth, JWT)
  • Enable HTTPS/TLS
  • Implement rate limiting
  • Validate all inputs
  • Add CORS restrictions for specific origins

Scalability

  • Add session management for stateful tools
  • Consider load balancing for horizontal scaling
  • Implement connection pooling
  • Add request timeouts

Monitoring

  • Add metrics collection (Prometheus, etc.)
  • Enhanced logging with correlation IDs
  • Health check endpoints
  • Performance monitoring

Configuration

  • Externalize configuration (port, timeouts, etc.)
  • Environment-specific settings
  • Feature flags for tools

Differences Summary

AspectLocal (stdio)Remote (HTTP/SSE)
Transportstdin/stdoutHTTP POST + SSE
LifecycleManaged by clientIndependent service
ClientsSingleMultiple concurrent
DiscoveryConfig file pathNetwork URL
SecurityProcess isolationNetwork security needed
DeploymentUser's machineServer infrastructure
LoggingCan use stdout after handshakeHTTP logs + application logs
StatePer-processShared or per-session
ScalingOne per clientHorizontal scaling possible

Technologies Used

  • Java 17 - Language runtime
  • Javalin 5.6 - Lightweight web framework
  • Jackson - JSON processing
  • SLF4J + Logback - Logging
  • Gradle - Build tool

Project Structure

my-mcp-server-java-server/
├── src/main/java/com/example/mcp/remote/
│   ├── MCPHttpServer.java        # HTTP/SSE server
│   ├── MCPRequestProcessor.java   # MCP protocol handler
│   ├── Tool.java                  # Tool interface
│   ├── ToolRegistry.java          # Tool registry
│   ├── TextContent.java           # Tool response wrapper
│   ├── CalculateTool.java         # Example tool
│   ├── ReverseTextTool.java       # Example tool
│   └── WordCountTool.java         # Example tool
├── src/main/resources/
│   └── logback.xml                # Logging configuration
├── build.gradle                   # Build configuration
├── settings.gradle                # Project settings
└── README.md                      # This file

License

This is a demonstration/educational project showing MCP protocol implementation patterns.

工具与能力

工具数量

3

资源数量

0

提示词数量

0

能力标签

远程服务Java本地部署协议实现HTTP/SSEJSON-RPC工具调用

支持客户端

Claude DesktopClaude

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

多步任务编排

把拆解、检索、执行串成一条链,模型按步骤调用工具。

长期上下文

把会话、笔记和知识放到外部存储,换个会话还能接着做。

接自有流程

把内部系统和模型连起来,让助手调用已有的工作流。

选择建议

值得选的地方

  • 只提供 3 个工具,职责集中,接入后不容易误操作。
  • 已经适配 Claude Desktop、Claude,换客户端不用重新研究配置。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • 公开资料没有可直接复制的安装命令,第一次接入要自己找入口。
  • 需要自备OAuth 授权,没有凭据没法直接试。
  • 公开摘要偏短,具体能力和限制要回到仓库确认。

更适合

  • 需要在AI代理场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop 的用户,接入路径最短。
  • 愿意照着官方文档一步步配环境的人。

不太适合

  • 暂时拿不到OAuth 授权的人。
  • 希望一条命令就装好、不想看文档的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
Java Remote

MCP World · 本页

3未说明未标注1 个2026-05-17
Everything Claude Code

MCP World

0stdio有1 个2026-05-17
Filesystem 560c4363

MCP World

13未说明未标注2 个2026-05-17
Time 7365cb6d

MCP.so

2SSE有2 个2026-05-17
Server Everything (everything)

MCP World

11stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

Java Remote 怎么安装?

公开目录没有给出可以直接复制的安装命令,需要按仓库 README里的步骤安装;装好后写进客户端的 MCP 配置再重启。

Java Remote 怎么在 Claude Desktop、Cursor 里配置?

它是传输方式未标注,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

Java Remote 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Java Remote 需要 API Key 吗?

公开资料标注的认证方式是OAuth 授权,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

Java Remote 支持哪些客户端?

公开资料标注支持 Claude Desktop、Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP