weclapp-api-knowledge-mcp

weclapp-api-knowledge-mcp

A standalone MCP server for exploring the weclapp REST API v2, providing offline knowledge about entities, endpoints, and relationships, plus optional live GET probes against a tenant.

Category
访问服务器

README

weclapp API Knowledge MCP

A standalone Model Context Protocol server for researching the weclapp REST API v2. Use it from Cursor, Claude Desktop, or any MCP-compatible client to explore entities, endpoints, relationships, and filter syntax — and optionally validate read patterns against your own tenant.

Not affiliated with weclapp. This is an independent open-source project maintained by the community.

What it does

It combines:

  • Offline API knowledge from data/openapi_v2.json: entities, endpoints, fields, cross-schema relationships, filter syntax, and efficient read plans.
  • Bounded live probes against one weclapp tenant: read-only GET requests that validate plans, inspect real response structure, and diagnose API errors.

This is not a CRUD wrapper. Its main job is to answer: how should I communicate with the weclapp API, where does data live, and how do I fetch cross-schema data efficiently?

Knowledge tools work without credentials. Live probe tools require a read-only weclapp API token.

Tool groups

Knowledge tools:

  • search_knowledge
  • explain_entity
  • explain_endpoint
  • get_relationships
  • plan_cross_entity_read
  • explain_filter_syntax
  • compare_approaches

Live probe tools (GET-only and bounded):

  • execute_read_plan
  • probe_entity_sample
  • probe_list_query

Analysis and validation tools:

  • analyze_response_structure
  • compare_to_schema
  • validate_read_plan
  • validate_filter
  • diagnose_api_error
  • check_field_presence

See docs/TOOLS.md for parameter details and usage notes.

Requirements

  • Python 3.11+
  • uv (recommended) or pip
  • Optional: Docker, for SSE transport via mcp-remote
  • Optional: weclapp API credentials for live probes

Quick start

1. Clone and install

git clone https://github.com/serenmind/weclapp-api-knowledgebase-mcp.git
cd weclapp-api-knowledgebase-mcp
uv sync

2. Configure credentials (optional)

Live probe tools need a read-only weclapp token:

cp .env.example .env
# Edit .env and set WECLAPP_BASE_URL and WECLAPP_API_KEY

3. Run tests (optional)

uv run pytest

4. Connect your MCP client

Recommended — stdio with Cursor

Add to your Cursor MCP settings (.cursor/mcp.json or Cursor Settings → MCP):

{
  "mcpServers": {
    "weclapp-api-knowledge": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/weclapp-api-knowledgebase-mcp",
        "run",
        "weclapp-api-knowledge-mcp"
      ],
      "env": {
        "MCP_TRANSPORT": "stdio"
      }
    }
  }
}

Add WECLAPP_BASE_URL and WECLAPP_API_KEY to env if you want live probes.

Alternative — Docker + SSE

cp .env.example .env
docker compose up --build

Then connect via mcp-remote:

{
  "mcpServers": {
    "weclapp-api-knowledge": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "http://localhost:8080/sse",
        "--transport",
        "sse-first"
      ]
    }
  }
}

More client examples: docs/CLIENT_SETUP.md.

Environment variables

Variable Required Default Description
WECLAPP_BASE_URL For live probes — Tenant API base, e.g. https://your-tenant.weclapp.com/webapp/api/v2
WECLAPP_API_KEY For live probes — Read-only API token
WECLAPP_AUTH_HEADER No AuthenticationToken Auth header name
WECLAPP_OPENAPI_PATH No data/openapi_v2.json Path to OpenAPI spec
MCP_TRANSPORT No stdio stdio or sse
MCP_HOST No 0.0.0.0 SSE bind host
MCP_PORT No 8080 SSE bind port
WECLAPP_MAX_PAGE_SIZE No 10 Max rows for list probes
WECLAPP_REQUEST_TIMEOUT_SECONDS No 30 HTTP timeout for live probes

Safety model

  • No write tools are exposed.
  • Live probes only issue GET requests.
  • List probes cap pageSize with WECLAPP_MAX_PAGE_SIZE (default: 10).
  • Credentials are read from environment only.
  • The bundled OpenAPI file can be refreshed when weclapp updates v2.

Refreshing the OpenAPI spec

Replace data/openapi_v2.json with an updated weclapp v2 OpenAPI export, then restart the server. The MCP server reads and caches the spec directly at runtime.

Development

uv sync
uv run pytest
uv run ruff check src tests
MCP_TRANSPORT=stdio uv run weclapp-api-knowledge-mcp

License

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选