Indiamart Mcp Server

io.github.Techmatic-sys由 GitHub 账号 Techmatic-sys 发布v1.1.0更新于 Oct 24, 2026

Claude AI for IndiaMART leads - fetch, search, sync and track pipeline.

已验证STDIO仅桌面数据与分析商业与电商

概览

AI 生成的概览

一个本地 MCP 服务器,将 Claude 连接到 IndiaMART 的线索管理 API,让助手获取、搜索、分析并更新买家线索。

可以做什么
按日期范围或最近若干小时从 IndiaMART 获取并同步线索,也可按 ID 查看单条线索,并存入本地 SQLite 数据库以便离线访问和按产品、留言关键词搜索。展示线索统计,包括总量以及按城市、产品和日期的分布,并可将线索导出为 CSV。为买家起草专业回复。更新销售流程阶段(新线索、已联系、已确认、赢单或丢单),并为线索添加私人备注以便跟进。
适用场景
适合管理买家线索的 IndiaMART 卖家,希望在 Claude Desktop、Claude Code 或兼容的智能体平台中用自然语言查询、汇总和更新销售流程,而不必登录卖家后台。
运行要求
以本地 Python 进程运行(需 Python 3.10+ 并安装项目依赖)。需要具备线索管理权限的 IndiaMART 卖家账户,以及通过 INDIAMART_API_KEY 和 INDIAMART_GLID 环境变量提供的 CRM API 密钥和 GLID。需要能访问 IndiaMART API 的网络。
安装前请注意
CRM API 密钥可访问你的线索,必须保密;它会在客户端配置文件中以明文环境变量形式传入。有两个工具会写入数据:修改线索的销售阶段和添加备注,因此会改动你在 IndiaMART 上的真实线索记录。线索数据保存在本地 SQLite 数据库中,可选的 SSE 模式还会把服务器暴露在网络主机上。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Indiamart Mcp Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

🇮🇳 IndiaMART MCP Server

[Python 3.10+] [License MIT] [MCP Compatible] [CI] [Coverage]

A fully functional Model Context Protocol (MCP) server that connects Claude AI to IndiaMART's Lead Management API. Fetch, search, analyze, and manage your IndiaMART buyer leads using natural language.

⚡ Quick Install (60 seconds)

bash
git clone https://github.com/Techmatic-sys/indiamart-mcp-server.gitcd indiamart-mcp-serverpip install -r requirements.txt

Then add to your Claude Desktop config and you're done. Full setup below.


✨ Features

  • 10 MCP Tools — 8 read tools + 2 write tools for complete CRM
  • Pull Leads — Fetch leads from IndiaMART for any date range
  • Pipeline Management — Track leads through sales stages (new → won)
  • Notes — Attach private notes to leads for context
  • Real-time Webhook — Receive leads instantly via IndiaMART's Push API
  • Local Database — All leads stored in SQLite for fast offline access
  • Analytics — Get stats by city, product, and date
  • Search — Find leads by keyword in product or message
  • Export CSV — Export leads for spreadsheets and reporting
  • Draft Replies — Generate professional buyer replies instantly
  • Input Validation — Pydantic schemas prevent malformed queries
  • Retry Logic — Exponential backoff on API failures
  • Claude Desktop Ready — Plug-and-play config included

📋 Prerequisites

  • Python 3.10+ (Download)
  • IndiaMART Seller Account with Lead Manager access
  • IndiaMART CRM API Key (see below)
  • Claude Desktop (optional, for AI-powered lead management)

🚀 Installation

1. Clone or Download

bash
git clone https://github.com/Techmatic-sys/indiamart-mcp-server.gitcd indiamart-mcp-server

2. Create Virtual Environment (recommended)

bash
python -m venv venv
# Windowsvenv\Scripts\activate
# macOS/Linuxsource venv/bin/activate

3. Install Dependencies

bash
# MCP server only (lightweight, 4 packages)pip install -r requirements.txt
# Full SaaS web app (includes FastAPI, uvicorn, etc.)pip install -r requirements-saas.txt

4. Configure Environment

bash
# Copy the example env filecp .env.example .env    # Linux/macOScopy .env.example .env  # Windows
# Edit .env with your credentials

🔑 How to Get Your IndiaMART API Key

  1. Log in to IndiaMART Seller Dashboard
  2. Go to Lead Manager → Settings (⚙️ icon)
  3. Navigate to CRM Integration or API Settings
  4. Generate or copy your CRM API Key (glusr_crm_key)
  5. Note your GLID (Global Login ID) from your account profile
  6. Paste both values into your .env file

Note: The API key gives access to your leads. Keep it secret!


▶️ Running the MCP Server

bash
# Standard run (Claude Desktop starts this automatically)python mcp_server.py
# Check versionpython mcp_server.py --version
# Health check (verify DB connectivity)python mcp_server.py --health

🖥️ Connecting to Claude Desktop

1. Locate Claude Desktop Config

OSPath
Windows%APPDATA%\Claude\claude_desktop_config.json
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Linux~/.config/Claude/claude_desktop_config.json

2. Add the MCP Server

json
{  "mcpServers": {    "indiamart": {      "command": "python",      "args": ["mcp_server.py"],      "cwd": "/ABSOLUTE/PATH/TO/indiamart-mcp-server",      "env": {        "INDIAMART_API_KEY": "your_crm_api_key_here",        "INDIAMART_GLID": "your_glid_here"      }    }  }}

Replace cwd with your actual path:

  • Windows: "C:\\Users\\YourName\\indiamart-mcp-server"
  • macOS: "/Users/yourname/indiamart-mcp-server"
  • Linux: "/home/yourname/indiamart-mcp-server"

3. Restart Claude Desktop

Close and reopen Claude Desktop. You should see the IndiaMART tools available in the tools menu.


🤖 Connecting to Claude Code

Option 1: CLI (Recommended)

bash
claude mcp add indiamart -- python /ABSOLUTE/PATH/TO/indiamart-mcp-server/mcp_server.py

Then set your environment variables:

bash
# In your shell profile or before launching Claude Codeexport INDIAMART_API_KEY="your_crm_api_key_here"export INDIAMART_GLID="your_glid_here"

Option 2: Manual Config

Add to your .claude/settings.json (project-level) or ~/.claude/settings.json (global):

json
{  "mcpServers": {    "indiamart": {      "command": "python",      "args": ["/ABSOLUTE/PATH/TO/indiamart-mcp-server/mcp_server.py"],      "env": {        "INDIAMART_API_KEY": "your_crm_api_key_here",        "INDIAMART_GLID": "your_glid_here"      }    }  }}

Replace the path with your actual absolute path to mcp_server.py.

Verify Connection

Once connected, ask Claude Code:

  • "Sync my latest IndiaMART leads"
  • "Show me leads from the last 24 hours"
  • "What are my lead statistics?"

🦞 Connecting to OpenClaw

OpenClaw is a self-hosted AI agent platform. Your IndiaMART leads become a native skill in OpenClaw, accessible from any interface OpenClaw supports.

1. Find your OpenClaw config file

OSPath
Linux/macOS~/.openclaw/openclaw.json
WindowsC:\Users\YourName\.openclaw\openclaw.json

2. Add the IndiaMART skill

Open the config and add under skills.mcpServers:

json5
{  skills: {    mcpServers: {      indiamart: {        command: "python",        args: ["mcp_server.py"],        cwd: "/absolute/path/to/indiamart-mcp-server",        env: {          INDIAMART_API_KEY: "your_crm_api_key_here",          INDIAMART_GLID: "your_glid_here"        }      }    }  }}

See openclaw-config-example.json5 at the repo root for a ready-to-copy template.

3. Restart the OpenClaw gateway

bash
openclaw gateway restart

4. Verify it loaded

bash
openclaw status --all# You should see "indiamart" listed with 10 tools

Remote OpenClaw (VPS / EC2)

Run the MCP server in SSE mode on your server:

bash
python mcp_server.py --transport sse --host 0.0.0.0 --port 8000

Then point your OpenClaw config to http://your-server-ip:8000.


💬 Example Prompts

PromptWhat It Does
"Show me all leads from the last 24 hours"Syncs and displays recent leads
"How many leads did I get this week and from which cities?"Shows lead statistics
"Search for leads asking about steel pipes"Keyword search in product/message
"Draft a reply for lead ID IML123456789"Generates professional buyer reply
"Move lead IML123 to qualified stage"Updates pipeline stage
"Add a note to lead IML123: Very interested in bulk order"Attaches a note
"Export all leads from January 2026 as CSV"Exports leads in CSV format
"Sync my latest IndiaMART leads"Pulls latest leads into local DB

🛠️ Available MCP Tools (10 Total)

Read Tools (8)

ToolDescription
tool_get_leads_by_dateFetch leads from IndiaMART for a date range
tool_get_recent_leadsGet leads from the last N hours
tool_get_lead_statsAnalytics: totals, by city, product, and date
tool_search_leadsSearch leads by keyword
tool_get_lead_by_idFull details of a specific lead
tool_draft_replyDraft a professional reply for a buyer
tool_export_leads_csvExport leads as CSV
tool_sync_latest_leadsSync latest from IndiaMART to local DB

Write Tools (2 — NEW)

ToolDescription
tool_update_lead_stageMove leads through pipeline (new → contacted → qualified → won/lost)
tool_add_noteAttach private notes to leads for follow-up tracking

📁 Project Structure

indiamart-mcp-server/├── 📄 mcp_server.py           ← SINGLE entry point├── 📄 smithery.yaml            ← Smithery.ai marketplace manifest├── 📄 pyproject.toml           ← Python package config├── 📄 requirements.txt         ← MCP only (5 packages)├── 📄 requirements-saas.txt    ← Web app deps├── 📄 README.md                ← This file├── 📄 CHANGELOG.md             ← Version history├── 📄 LICENSE                  ← MIT License├── 📄 .env.example             ← Annotated credential guide├── 📄 .gitignore               ← Git ignore rules├── 📄 docker-compose.yml       ← Full stack Docker setup│├── 📁 mcp_tools/               ← Core MCP Package│   ├── __init__.py│   ├── 🔧 tools.py            ← 10 MCP tools with rich docstrings│   ├── 📋 schemas.py          ← Pydantic validation + response types│   ├── 🌐 http_client.py      ← Resilient API client with retry│   ├── 💾 database.py         ← SQLite operations│   ├── 🔑 auth.py             ← API key helpers│   └── 🐳 Dockerfile          ← MCP server Docker image│├── 📁 saas/                    ← SaaS Web App (FastAPI)│   └── ...│├── 📁 tests/                   ← Test suite│   ├── conftest.py             ← pytest fixtures│   └── test_tools.py           ← Validation + integration tests│├── 📁 .github/                 ← CI/CD│   └── workflows/ci.yml│└── 📁 docs/                    ← Documentation    ├── tools.md    └── examples.md

🔧 Troubleshooting

"INDIAMART_API_KEY is not set"

  • Make sure you've created a .env file (not just .env.example)
  • Check that the key is correct and not expired
  • Verify the .env file is in the project root directory

Claude Desktop doesn't show IndiaMART tools

  • Restart Claude Desktop completely (quit + reopen)
  • Check claude_desktop_config.json for syntax errors (valid JSON?)
  • Verify the cwd path is correct and mcp_server.py exists there
  • Check Claude Desktop logs for MCP connection errors

Date format errors

  • Supported formats: YYYY-MM-DD, DD-MM-YYYY, DD/MM/YYYY, DD-Mon-YYYY
  • Example: 2026-01-15, 15-01-2026, 15-Jan-2026

📄 License

MIT License. Use freely for your business.


🤝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit changes: git commit -m "Add my feature"
  4. Push: git push origin feature/my-feature
  5. Open a Pull Request

Built with ❤️ for Indian sellers on IndiaMART

来源:README.md,提交 d124c39

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.1.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分