mcp

package module
v0.0.0-...-2c321bc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2025 License: MIT Imports: 8 Imported by: 0

README

Wealthy MCP(Model Context Protocol) Server

This repository contains official Wealthy mcp server to help users with trading platform features

Prerequisites

Getting Started

You can either install from source or download pre-built artifacts:

Option 1: Install from Source
  • Install using golang(go 1.23 or later):
    go install github.com/utilizedcomb/wealthy-mcp/cmd/wealthy-mcp@latest
    
Option 2: Download Pre-built Artifacts
  • Visit our releases page to download the latest pre-built binary for your platform
  • Extract the downloaded archive and place the executable in a directory that's in your system PATH
  • Run below commands to give permissions on mac:
chmod +x wealthy-mcp-macos-arm64-<version>
xattr -d com.apple.quarantine wealthy-mcp-macos-arm64-<version>

MCP Configuration

To configure MCP (Multi-Cursor Protocol) servers, create/update the appropriate configuration file based on your client:

For Cursor

Create/update .cursor/mcp.json in your home directory:

{
    "mcpServers": {
      "wealthy-mcp": {
        "command": "<path to downloaded/installed binary>"
      }
    }
}
For Claude

Create/update claude_desktop_config.json:

{
    "mcpServers": {
      "wealthy-mcp": {
        "command": "<path to downloaded/installed binary>"
      }
    }
}

To use a custom port, add the args parameter:

{
    "mcpServers": {
      "wealthy-mcp": {
        "command": "<path to downloaded/installed binary>",
        "args": ["addr=localhost:8006"]
      }
    }
}
  • Restart your MCP client (Claude/Cursor)
  • Wealthy login page will open - enter your credentials
  • After successful login, return to your MCP client
  • You're now ready to start smart trading! 🎉

Usage

Here are the available query types and their purposes:

Query Type Purpose
get_price Retrieves the current market price for a specified trading symbol
get_holdings Shows your current portfolio holdings and their details
get_positions Displays your open trading positions
get_order_book Lists all your orders (open, executed, and cancelled)
get_trade_ideas Provides trading suggestions and market insights
get_security_info Fetches detailed information about a specific security/stock
place_order Places a new buy/sell order with specified parameters

You can interact with these queries through natural language in Claude/Cursor. For example:

  • "What is the price of RELIANCE?"
  • "Show me my current holdings"
  • "I want to buy 100 shares of TATAMOTORS at market price"

Roadmap

  • Real-time Market Data Integration

    • Implement WebSocket connections for live price streaming
    • Add support for multiple symbols subscription
    • Enhance price data formatting and display
  • Price Alerts System

    • Enable setting price alerts through natural language
    • Support multiple alert conditions (above/below/crossing)
    • Implement alert notifications within chat
    • Add alert management (list/modify/delete alerts)
  • Advanced Features

    • Portfolio analytics with real-time updates
    • Custom watchlists with real-time updates
    • Advanced alert conditions (technical indicators)
    • Enhanced reporting and analytics
  • Platform Enhancements

    • Advanced order types
    • Automated trading strategies
    • Support for additional financial products

License

This project is licensed under the MIT License - see the LICENSE file for details.

Trading Disclaimer

The software is provided for informational purposes only and should not be construed as investment advice. Trading in financial instruments involves high risks including the risk of losing some, or all, of your investment amount. Before trading, you should carefully consider your investment objectives, level of experience, and risk appetite.

By using this software, you acknowledge that:

  1. You understand the risks associated with trading
  2. You will seek professional financial advice when needed
  3. The authors and contributors are not liable for any trading losses
  4. You will comply with all applicable financial regulations

Support

For support, please open an issue in the GitHub repository, contact the maintainers, or email Parth at parath.singh@wealthy.in.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertTool

func ConvertTool[T any, R any](name, description string, toolHandler ToolHandlerFunc[T, R]) (mcp.Tool, server.ToolHandlerFunc, error)

ConvertTool converts a toolHandler function to a Tool and ToolHandlerFunc.

The toolHandler function must have two arguments: a context.Context and a struct to be used as the parameters for the tool. The second argument must not be a pointer, should be marshalable to JSON, and the fields should have a `jsonschema` tag with the description of the parameter.

Types

type Tool

type Tool struct {
	Tool    mcp.Tool
	Handler server.ToolHandlerFunc
}

Tool is a struct that represents a tool definition and the function used to handle tool calls.

The simplest way to create a Tool is to use `MustTool`, or `ConvertTool` if you wish to create tools at runtime and need to handle errors without panicking.

func MustTool

func MustTool[T any, R any](name, description string, toolHandler ToolHandlerFunc[T, R]) Tool

MustTool creates a new Tool from the given name, description, and toolHandler. It panics if the tool cannot be created.

func (*Tool) Register

func (t *Tool) Register(mcp *server.MCPServer)

Register adds the Tool to the given MCPServer.

It is a convenience method that calls `server.MCPServer.Register` with the Tool's Tool and Handler fields, allowing you to add the tool in a single statement:

mcp.MustTool(name, description, toolHandler).Register(server)

type ToolHandlerFunc

type ToolHandlerFunc[T any, R any] func(ctx context.Context, request T) (R, error)

ToolHandlerFunc is the type of a handler function for a tool.

Directories

Path Synopsis
cmd
wealthy-mcp command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL