Skip to main content

A Model Context Protocol (MCP) server for Project AI

Project description

Project AI MCP Server

一个用于 Project AI 平台集成的 Model Context Protocol (MCP) 服务器。

功能特性

  • 🚀 基于 FastMCP 构建的高性能 MCP 服务器
  • 📋 支持 Project AI 功能点状态管理
  • 🔐 安全的环境变量配置管理
  • 🛠 支持多种安装和运行方式

环境要求

  • Python 3.12+
  • 可访问 Project AI API 端点

安装

方法一:使用 uvx(推荐)

# 临时运行
uvx project-ai-mcp

# 或永久安装
uv tool install project-ai-mcp

方法二:使用 pip

pip install project-ai-mcp

方法三:开发安装

git clone <repository-url>
cd project-ai-mcp
uv sync
uv run python main.py

配置

可选的环境变量配置:

export PROJECT_AI_BASE_URL=https://your-custom-api-endpoint.com

或者创建 .env 文件:

PROJECT_AI_BASE_URL=https://your-custom-api-endpoint.com

注意: 如果不设置 PROJECT_AI_BASE_URL,将使用默认的 API 端点:https://project-ai.hailiangedu.com

使用方法

作为独立服务器运行

# 使用 uvx
uvx project-ai-mcp

# 或使用已安装的命令
project-ai-mcp

# 或使用 Python 模块
python -m project_ai_mcp

在 Claude Desktop 中使用

在 Claude Desktop 的配置文件中添加:

{
  "mcpServers": {
    "project-ai": {
      "command": "uvx",
      "args": ["project-ai-mcp"],
      "env": {
        "PROJECT_AI_BASE_URL": "https://your-custom-api-endpoint.com"
      }
    }
  }
}

可用工具

update_feature_status

修改 Project AI 平台上功能点的状态。

参数:

  • feature_id (string): 功能点 ID
  • status (int): 功能点状态,支持:
    • 1: 未开始
    • 2: 进行中
    • 3: 已完成

返回值:

  • "success": 操作成功
  • "failed: [错误信息]": 操作失败及错误详情

示例使用:

# 将功能点标记为进行中
update_feature_status(
    feature_id="feature_123",
    status=2
)

# 将功能点标记为已完成
update_feature_status(
    feature_id="feature_456",
    status=3
)

开发

环境设置

# 克隆仓库
git clone <repository-url>
cd project-ai-mcp

# 创建虚拟环境并安装依赖
uv venv
uv sync

# 运行开发服务器
uv run python main.py

代码质量检查

# 运行 linter
ruff check

# 格式化代码
ruff format

构建和发布

# 构建包
uv build

# 发布到 PyPI(需要配置 PyPI 凭据)
twine upload dist/*

许可证

MIT License - 详见 LICENSE 文件。

贡献

欢迎提交 Issue 和 Pull Request!

支持

如有问题,请在 GitHub Issues 中提出。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

project_ai_mcp-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

project_ai_mcp-0.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file project_ai_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: project_ai_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for project_ai_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0a7fe80785623a3a43d97e0a738661aaefa5427a1197897ff9ead6dfa3d85d3b
MD5 e991ab33cdf82360951d11f77b534e6a
BLAKE2b-256 e4b067f4fc1a44cada634130ba082c163154e07f9d20b7f8b2c227556b669f08

See more details on using hashes here.

File details

Details for the file project_ai_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: project_ai_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for project_ai_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 42908f4ffc1ced4a5b823a6380bf1e1ff6095aec0c1210d7c12470f846ab16cf
MD5 33ccd2f7223265721b824517aa28c42a
BLAKE2b-256 c35fedb8278dd088350dc0dd2fa9e6a6b41756ffb15fdeccef2a3d9ad345fda1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page