Sales MCP Server
A Model Context Protocol (MCP) server that provides sales data tools, resources, and prompts to AI assistants.
What is This?
This MCP server gives AI assistant, Cline, the ability to:
Fetch real sales data for different quarters
Access available quarter information
Generate sales analysis prompts
Project Structure
Setup Instructions
1. Create Virtual Environment
2. Install Dependencies
3. Create Project Configuration
Create a pyproject.toml file:
4. Add MCP as Dev Dependency
Testing Your Server
Option 1: Test Functions Directly
Option 2: Run the Server
Using with AI Clients
Cline (VS Code Extension) - RECOMMENDED
Install Cline extension in VS Code
Add to Cline's MCP config at:
C:\Users\<YourName>\AppData\Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Reload VS Code
Ask Cline: "What are the available quarters?"
Resource: list_quarters()
Returns available quarters: ["Q1", "Q2", "Q3"]
Prompt: sales_summary_prompt(quarter: str)
Generates a sales analyst prompt for the specified quarter.
Key Technical Details
FastMCP: Uses the FastMCP framework for easy MCP server creation
Resources: URI format
resource://sales/quarters(must be valid URL)Transport: STDIO (standard input/output) for client communication
Python Version: >=3.11
Troubleshooting
Server won't start:
Make sure you're in the virtual environment
Check that all dependencies are installed:
pip list | grep mcp
Next Steps
Want to extend this server? Add more tools:
Sales forecasting
Customer analytics
Product performance
Revenue calculations
Data visualization helpers
Each tool is just a Python function that AI can call!
Repository
GitHub: https://github.com/usafhulk/MCP