A Model Context Protocol (MCP) server that handles embedded wallet and auth token orchestration, as well as a CLI client.
- Exposes your JSON-RPC methods as MCP tools
- Includes both server and client components
- Handles token-based authentication
- Provides a simple CLI interface for testing
- Python 3.9+
- Dependencies listed in
requirements.txt
-
Clone the repository and navigate to the project directory:
git clone https://github.com/gegaowp/mcp-auth.git cd mcp-auth
-
Run the setup script to create a virtual environment and install dependencies:
./setup.sh
-
Activate the virtual environment:
source venv/bin/activate
First, start your local JSON-RPC server. The MCP server is configured to connect to http://localhost:8080
by default.
python3 /path/to/your/json_rpc_server.py
Start the MCP server to expose your JSON-RPC methods as MCP tools:
./venv/bin/python ./mcp_server.py
For testing and development, use the included CLI client:
./venv/bin/python ./mcp_client.py
The client provides an interactive command-line interface with the following commands:
help
- Show available commandslist
- List available toolsecho <message>
- Test the echo functionalitytime
- Get the current server timepurchase_token
- Purchase a JWT authentication tokenexit
- Exit the client
The server exposes the following tools:
purchase_token
- Purchase a JWT token for authenticationecho
- Echo back a message (requires authentication)get_time
- Get the current server time (requires authentication)
Connect Claude Desktop to your MCP server to allow Claude to interact with your local JSON-RPC services.