A Go-based Model Context Protocol (MCP) server with plugin architecture supporting financial data and housing market data, designed for GitHub Copilot integration.
- Plugin Architecture: Extensible design for adding new data sources
- Financial Data Plugin: Stock prices, market data, company information
- Housing Data Plugin: Property listings, market statistics, price estimates
- Chi Router: Fast HTTP router with middleware support
- WebSocket Support: Real-time MCP protocol communication
- REST API: HTTP endpoints for easy integration
- GitHub Copilot Ready: Optimized for Copilot tool integration
- Docker Support: Containerized deployment
- Get stock data by symbol
- Search companies by name
- Market summary and indices
- Historical price data
- Mock data with realistic examples
- Search properties by location and criteria
- Get detailed property information
- Market statistics for areas
- Price history and estimates
- Property value estimation (Zestimate-like)
- Go 1.21 or higher
- Git
git clone https://github.com/johan-j/play-mcp.git
cd play-mcp
make buildmake docker-build
make docker-run-
Quick Setup:
./setup-copilot.sh
-
Manual Setup:
- Start server:
./bin/mcp-server - WebSocket endpoint:
ws://localhost:8080/mcp - Configure your Copilot client to connect to the endpoint
- See:
GITHUB_COPILOT_SETUP.mdfor detailed instructions
- Start server:
# HTTP/WebSocket mode (localhost:8080)
make run
# With debug logging
make run-debug
# On different port
./bin/mcp-server -port 9090
# With custom host
./bin/mcp-server -host 0.0.0.0 -port 8080ws://localhost:8080/mcp- MCP WebSocket endpoint for GitHub Copilot
GET /health- Health checkGET /tools- List available toolsGET /resources- List available resources
get_stock_data- Get current stock informationsearch_companies- Search for companies by nameget_market_summary- Get market indices and top moversget_historical_data- Get historical price data
search_properties- Search properties by criteriaget_property_details- Get detailed property informationget_market_stats- Get market statistics for areaget_price_history- Get property price historyestimate_property_value- Get property value estimate
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_stock_data",
"arguments": {
"symbol": "AAPL"
}
}
}{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "search_properties",
"arguments": {
"city": "San Francisco",
"state": "CA",
"minPrice": 500000,
"maxPrice": 2000000,
"bedrooms": 3
}
}
}play-mcp/
├── cmd/mcp-server/ # Main application entry point
├── internal/
│ ├── plugins/ # Plugin system
│ │ ├── financial/ # Financial data plugin
│ │ └── housing/ # Housing data plugin
│ └── server/ # MCP server implementation
├── pkg/mcp/ # MCP protocol types
├── config/ # Configuration files
├── Dockerfile # Docker configuration
└── Makefile # Build automation
- Create a new directory under
internal/plugins/ - Implement the
mcp.Plugininterface:Name() stringDescription() stringGetTools() []mcp.ToolHandleToolCall(ctx, request) (*mcp.ToolCallResponse, error)GetResources() []mcp.Resource
- Register the plugin in
cmd/mcp-server/main.go
# Install dependencies
make deps
# Run tests
make test
# Run with coverage
make test-coverage
# Format code
make fmt
# Clean build artifacts
make cleanEdit config/config.yaml to configure:
- Server settings (host, port)
- Plugin configuration
- API keys for real data sources
- Logging settings
The plugins currently use mock data. To integrate with real APIs:
- Alpha Vantage API
- Yahoo Finance API
- IEX Cloud API
- Polygon.io API
- Zillow API
- Redfin API
- Realtor.com API
- RentSpree API
Add API keys to config/config.yaml and update plugin implementations.
- Initialize - Client establishes connection
- List Tools - Get available tools
- Call Tools - Execute specific tools
- Get Resources - Access plugin resources
-32601- Method not found-32602- Invalid parameters-32603- Internal error-32002- Client not initialized
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Run
make testandmake lint - Submit a pull request
MIT License - see LICENSE file for details