About Bitcoin MCP Server
Bitcoin MCP Server provides Bitcoin price information through an MCP server. Its included Java test client starts the server JAR as a subprocess and demonstrates calling the USD price tool over STDIO.
Key features
- 01Provide Bitcoin price information
- 02Run server communication over STDIO
- 03Build the server as a JAR
- 04Include a subprocess-based test client
Use cases
- 01Request Bitcoin price information for USD
- 02Test MCP tool calls through the included client
MCP support
The server exposes a Bitcoin price tool to MCP clients over STDIO. The included test client launches the server JAR as a subprocess, lists tools, calls the price tool, and closes the connection.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEBitcoin MCP Server
This project provides a Model Context Protocol (MCP) server for Bitcoin price information.
Building the Project
To build the project, run:
mvn clean package
This will create a JAR file at target/bitcoinmcp-0.0.1-SNAPSHOT.jar.
Running the MCP Server
The server is configured to use standard input/output (STDIO) for communication, as specified in the application.yaml file.
Using the ClientSTDIO Test Client
The project includes a test client (ClientSTDIO) that demonstrates how to connect to the MCP server.
Why ClientSTDIO Needs to See the Server JAR
The ClientSTDIO class uses the Model Context Protocol (MCP) client library to communicate with the MCP server. It needs to reference the server JAR file because:
- The MCP client uses a subprocess mechanism to start the server
- It launches the server by executing the JAR file as a separate Java process
- The client and server communicate via standard input/output (STDIO)
This architecture allows the client to interact with the server without requiring the server to be started separately or to expose network ports. However, it means the client needs to know the location of the server JAR file to start it.
Configuring the JAR File Path
The client needs to know the location of the server JAR file. There are three ways to specify this:
-
System Property:
java -Dmcp.server.jar.path=/path/to/bitcoinmcp-0.0.1-SNAPSHOT.jar -cp target/test-classes za.sk.bitconmcp.ClientSTDIO -
Environment Variable:
export MCP_SERVER_JAR_PATH=/path/to/bitcoinmcp-0.0.1-SNAPSHOT.jar java -cp target/test-classes za.sk.bitconmcp.ClientSTDIO -
Default Path: If neither the system property nor the environment variable is set, the client will look for the JAR file at
target/bitcoinmcp-0.0.1-SNAPSHOT.jarrelative to the current working directory.
Running the Client
To run the client, use Maven's exec plugin to ensure all dependencies are included in the classpath:
# Make sure you're in the project root directory
cd /opt/mcp/server/bitcoinmcp
# Run the client using Maven
mvn exec:java -Dexec.classpathScope=test -Dexec.mainClass="za.sk.bitconmcp.ClientSTDIO"
You can also specify the JAR path as a system property:
mvn exec:java -Dexec.classpathScope=test -Dexec.mainClass="za.sk.bitconmcp.ClientSTDIO" -Dmcp.server.jar.path=/path/to/bitcoinmcp-0.0.1-SNAPSHOT.jar
The client will:
- Connect to the MCP server
- List available tools
- Call the
getBitcoinProceByCurrencytool with USD as the currency - Display the result
- Close the connection
Troubleshooting
If you see an error like "MCP server JAR file not found", make sure:
- You've built the project with
mvn clean package - You're running the client from the correct directory
- The JAR file path is correctly specified
You can also specify the absolute path to the JAR file using one of the configuration methods described above.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.