mcpField
B
Bitcoin MCP Server

Bitcoin MCP Server

Local
github.com/kappaj2Finance0Updated 62w ago

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

  1. 01Provide Bitcoin price information
  2. 02Run server communication over STDIO
  3. 03Build the server as a JAR
  4. 04Include a subprocess-based test client

Use cases

  1. 01Request Bitcoin price information for USD
  2. 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.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Bitcoin 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:

  1. The MCP client uses a subprocess mechanism to start the server
  2. It launches the server by executing the JAR file as a separate Java process
  3. 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:

  1. System Property:

    java -Dmcp.server.jar.path=/path/to/bitcoinmcp-0.0.1-SNAPSHOT.jar -cp target/test-classes za.sk.bitconmcp.ClientSTDIO
    
  2. Environment Variable:

    export MCP_SERVER_JAR_PATH=/path/to/bitcoinmcp-0.0.1-SNAPSHOT.jar
    java -cp target/test-classes za.sk.bitconmcp.ClientSTDIO
    
  3. 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.jar relative 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:

  1. Connect to the MCP server
  2. List available tools
  3. Call the getBitcoinProceByCurrency tool with USD as the currency
  4. Display the result
  5. Close the connection

Troubleshooting

If you see an error like "MCP server JAR file not found", make sure:

  1. You've built the project with mvn clean package
  2. You're running the client from the correct directory
  3. 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

Markdown supported

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.