Skip to main content
Glama
lokesh1382

MCP Products Server

by lokesh1382

šŸ›’ MCP Products Server

A hands-on Python project demonstrating Model Context Protocol (MCP) by building a product management server that integrates with Claude Desktop and GitHub Copilot.

šŸ—‚ļø Project Structure

create_new_mcp/
│
ā”œā”€ā”€ mcp_server.py        # MCP Server with tools, resource, and prompt template
ā”œā”€ā”€ add_product.py       # DB logic to INSERT a product
ā”œā”€ā”€ fetch_products.py    # DB logic to SELECT all products
ā”œā”€ā”€ db_connect.py        # Database connection helper
ā”œā”€ā”€ .env                 # API keys and DB credentials (not committed)
ā”œā”€ā”€ .gitignore
└── README.md

Related MCP server: ClickUp MCP Server

āš™ļø MCP Server — mcp_server.py

šŸ”Œ Configuration

Claude Desktop

Update claude_desktop_config.json:

{
  "mcpServers": {
    "products": {
      "command": "uv.exe",
      "args": [
        "--directory", "C:\\path\\to\\create_new_mcp",
        "run", "mcp_server.py"
      ]
    }
  }
}

GitHub Copilot

Update mcp.json with the same server details.

šŸš€ Getting Started

Prerequisites

  • Python 3.10+

  • uv package manager

  • MySQL database

  • Claude Desktop or GitHub Copilot

šŸ“š Key Learnings

  • āœ… MCP Tools are invoked directly by the LLM

  • āœ… MCP Resources are fetched manually via host UI and injected into context

  • āœ… Prompt Templates enable consistent prompt generation via / command

  • āš ļø MCP Sampling (server → LLM callback) is not yet supported by Claude Desktop or GitHub Copilot in practice

  • šŸ’” Workaround for sampling: call Anthropic API directly from the MCP server

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Persistent context for Claude. Your AI always knows your projects and next actions across sessions.

  • Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

  • Manage projects, tasks, time tracking, and team collaboration through natural language.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lokesh1382/mcp-products-demo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server