PayPal Java
About
Integrates with PayPal's Java API to provide payment processing analysis tools, including authorization rate analysis and a basic calculator, supporting both REST and JSON-RPC interfaces for versatile deployment.
Details
- Author
- kumartheashwani
- Repository
- kumartheashwani/paypal-java-mcp-server
- Downloads
- 220
- Categories
- Design, Developer Tools, AI, API, Infrastructure, Finance
- Tags
- #integration, #web
Jump to
- JSON-RPC over HTTP API for web clients
- JSON-RPC over stdio interface for Smithery integration
- Tools for analyzing authorization rates
- Basic calculator functionality for testing
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
PayPal JavaCommand (node, npx, python, etc.)javaArguments-
Argument 1
-Dspring.profiles.active=stdio -
Argument 2
-Dspring.main.web-application-type=NONE -
Argument 3
-DLOG_FILE=/logs/mcp-server.log -
Argument 4
-Dlogging.config=classpath:logback-stdio.xml -
Argument 5
-Djsonrpc.stdio.interactive=true -
Argument 6
-jar -
Argument 7
/app/app.jar
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Configure the application in application.properties:
If you need to run the server in a non-interactive environment (where stdin/stdout connectivity is not available), you can use the provided start-non-interactive.sh script:
bash./start-non-interactive.sh
This script:
1. Creates named pipes for stdin and stdout
2. Starts background processes to handle the pipes
3. Starts the server with the -Djsonrpc.stdio.interactive=false flag
4. Automatically sends an initialize request to the server
5. Provides the pipe paths for you to interact with the server
The server will pre-initialize all capabilities and tools, so it's ready to respond to requests even without initial input. You can then interact with the server by writing to the input pipe and reading from the output pipe:
bash
This server is designed to be deployed with Smithery, which requires the JSON-RPC over stdio interface.
To prepare the server for Smithery deployment:
./prepare-smithery.sh
This will create a smithery-deploy directory with all the necessary files for deployment, including:
- The server JAR file
- The Smithery configuration file
- Scripts for running in interactive and non-interactive modes
- A README with deployment instructions
The server includes a smithery-config.json file that configures the server for Smithery:
{
"name": "paypal-java-mcp-server",
"type": "stdio",
"interactive": true,
"command": "java",
"args": [
"-Dspring.profiles.active=stdio",
"-Dspring.main.web-application-type=NONE",
"-DLOG_FILE=/logs/mcp-server.log",
"-Dlogging.config=classpath:logback-stdio.xml",
"-Djsonrpc.stdio.interactive=true",
"-jar",
"/app/app.jar"
]
}
CRITICAL: When using the server with Smithery, ensure that:
1. The "interactive": true flag is set in the Smithery configuration
2. The -Djsonrpc.stdio.interactive=true argument is included in the startup command
3. You are using the JSON-RPC over stdio interface and not attempting to connect to the server via HTTP
4. If your environment does not support interactive processes, use the start-non-interactive.sh script instead
If your Smithery environment does not support interactive processes, you have two options:
1. Use the start-non-interactive.sh script: This script creates named pipes and handles the stdin/stdout connectivity for you.
2. Modify the Smithery configuration: Set "interactive": false in the Smithery configuration and ensure the server is started with the -Djsonrpc.stdio.interactive=false flag.
server.port=8080
Build the application:
mvn clean package
The project includes Docker support for both the REST API server and the JSON-RPC stdio server.
improveAuthorizationRate
Analyzes transaction data and provides recommendations to improve authorization rates. Parameters: merchantId (string, required), timeframe (string, optional, default: 'last_30_days'), transactionType (string, optional, default: 'all')
calculate
Performs basic math operations. Parameters: operation (string, required, options: 'add', 'subtract', 'multiply', 'divide'), a (number, required), b (number, required)
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"paypal java": {
"env": {},
"args": [
"-Dspring.profiles.active=stdio",
"-Dspring.main.web-application-type=NONE",
"-DLOG_FILE=/logs/mcp-server.log",
"-Dlogging.config=classpath:logback-stdio.xml",
"-Djsonrpc.stdio.interactive=true",
"-jar",
"/app/app.jar"
],
"shell": false,
"command": "java"
}
}
}
Linux
{
"env": [],
"args": [
"-Dspring.profiles.active=stdio",
"-Dspring.main.web-application-type=NONE",
"-DLOG_FILE=/logs/mcp-server.log",
"-Dlogging.config=classpath:logback-stdio.xml",
"-Djsonrpc.stdio.interactive=true",
"-jar",
"/app/app.jar"
],
"shell": false,
"command": "java"
}
Macos
{
"env": [],
"args": [
"-Dspring.profiles.active=stdio",
"-Dspring.main.web-application-type=NONE",
"-DLOG_FILE=/logs/mcp-server.log",
"-Dlogging.config=classpath:logback-stdio.xml",
"-Djsonrpc.stdio.interactive=true",
"-jar",
"/app/app.jar"
],
"shell": false,
"command": "java"
}
Windows
{
"env": [],
"args": [
"-Dspring.profiles.active=stdio",
"-Dspring.main.web-application-type=NONE",
"-DLOG_FILE=/logs/mcp-server.log",
"-Dlogging.config=classpath:logback-stdio.xml",
"-Djsonrpc.stdio.interactive=true",
"-jar",
"/app/app.jar"
],
"shell": false,
"command": "java"
}
PayPal Java MCP Server
This is a Java implementation of a PayPal MCP (Merchant Capability Platform) server that provides tools for analyzing and improving payment processing.
Features
- JSON-RPC over HTTP API for web clients
- JSON-RPC over stdio interface for Smithery integration
- Tools for analyzing authorization rates
- Basic calculator functionality for testing
Running the Server
Web Mode (Default)
To run the server in web mode, which exposes a REST API on port 8080:
java -jar target/paypal-java-mcp-server-0.0.1-SNAPSHOT.jar
In this mode, you can access the API at http://localhost:8080/api/mcp.
JSON-RPC over stdio Mode
To run the server in stdio mode, which uses JSON-RPC over standard input/output:
java -Dspring.profiles.active=stdio -Dspring.main.web-application-type=NONE -Djsonrpc.stdio.interactive=true -jar target/paypal-java-mcp-server-0.0.1-SNAPSHOT-stdio.jar
In this mode, the server reads JSON-RPC requests from stdin and writes responses to stdout. All logs are written to stderr and a log file.
IMPORTANT: The JSON-RPC stdio interface requires stdin/stdout connectivity. When deploying, ensure that the process has access to stdin/stdout, typically by running it in interactive mode.
You can test the stdio mode using the provided test script:
./test-stdio.sh
Running in Non-Interactive Environments
If you need to run the server in a non-interactive environment (where stdin/stdout connectivity is not available), you can use the provided start-non-interactive.sh script:
./start-non-interactive.sh
This script:
1. Creates named pipes for stdin and stdout
2. Starts background processes to handle the pipes
3. Starts the server with the -Djsonrpc.stdio.interactive=false flag
4. Automatically sends an initialize request to the server
5. Provides the pipe paths for you to interact with the server
The server will pre-initialize all capabilities and tools, so it's ready to respond to requests even without initial input. You can then interact with the server by writing to the input pipe and reading from the output pipe:
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




