{"id":29688758,"url":"https://github.com/modelscope/modelscope-mcp-server","last_synced_at":"2025-07-23T05:38:34.350Z","repository":{"id":303769104,"uuid":"1005386670","full_name":"modelscope/modelscope-mcp-server","owner":"modelscope","description":"ModelScope MCP Server (in development)","archived":false,"fork":false,"pushed_at":"2025-07-17T09:32:43.000Z","size":296,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-17T12:36:09.596Z","etag":null,"topics":["agent","aigc","fastmcp","llm","mcp","mcp-server","modelscope"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modelscope.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-20T06:37:55.000Z","updated_at":"2025-07-17T09:32:46.000Z","dependencies_parsed_at":"2025-07-17T16:42:19.569Z","dependency_job_id":"5c921aca-d0e5-42d6-aae4-599925f4f111","html_url":"https://github.com/modelscope/modelscope-mcp-server","commit_stats":null,"previous_names":["pengqun/modelscope-mcp-server","modelscope/modelscope-mcp-server"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/modelscope/modelscope-mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Fmodelscope-mcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Fmodelscope-mcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Fmodelscope-mcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Fmodelscope-mcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modelscope","download_url":"https://codeload.github.com/modelscope/modelscope-mcp-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Fmodelscope-mcp-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266625380,"owners_count":23958306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","aigc","fastmcp","llm","mcp","mcp-server","modelscope"],"created_at":"2025-07-23T05:38:30.385Z","updated_at":"2025-07-23T05:38:34.334Z","avatar_url":"https://github.com/modelscope.png","language":"Python","readme":"# ModelScope MCP Server\n\n[![PyPI - Version](https://img.shields.io/pypi/v/modelscope-mcp-server.svg)](https://pypi.org/project/modelscope-mcp-server)\n[![Docker](https://img.shields.io/badge/docker-supported-blue?logo=docker)](https://github.com/modelscope/modelscope-mcp-server/blob/main/Dockerfile)\n[![Docker Hub](https://img.shields.io/docker/v/spadrian/modelscope-mcp-server?logo=docker)](https://hub.docker.com/r/spadrian/modelscope-mcp-server)\n[![License](https://img.shields.io/github/license/modelscope/modelscope-mcp-server.svg)](https://github.com/modelscope/modelscope-mcp-server/blob/main/LICENSE)\n\nA Model Context Protocol (MCP) server that integrates with [ModelScope](https://modelscope.cn)'s ecosystem, providing seamless access to AI models, datasets, apps, papers, and generation capabilities through popular MCP clients.\n\n## ✨ Features\n\n- 🔐 **User Authentication** - Retrieve information about the currently authenticated ModelScope user\n- 🎨 **AI Image Generation** - Generate images from text prompts or transform existing images using AIGC models (supports both text-to-image and image-to-image generation)\n- 🔍 **Resource Discovery** - Search and discover ModelScope resources including machine learning models, research papers, and MCP servers with advanced filtering options\n- 📋 **Resource Details** _(Coming Soon)_ - Get comprehensive details for specific resources including model specifications, paper abstracts, and MCP server configurations\n- 📖 **Documentation Search** _(Coming Soon)_ - Semantic search for ModelScope documentation and articles\n- 🚀 **Gradio API Integration** _(Coming Soon)_ - Invoke Gradio APIs exposed by any pre-configured ModelScope studio (AI app)\n\n## 🚀 Quick Start\n\n### 1. Get Your API Token\n\n1. Visit [ModelScope](https://modelscope.cn/home) and sign in to your account\n2. Navigate to **[Home] → [Access Tokens]** to retrieve your default API token or create a new one\n\n\u003e 📖 For detailed instructions, refer to the [ModelScope Token Documentation](https://modelscope.cn/docs/accounts/token)\n\n### 2. Integration with MCP Clients\n\nAdd the following JSON configuration to your MCP client's configuration file:\n\n```json\n{\n  \"mcpServers\": {\n    \"modelscope-mcp-server\": {\n      \"command\": \"uvx\",\n      \"args\": [\"modelscope-mcp-server\"],\n      \"env\": {\n        \"MODELSCOPE_API_TOKEN\": \"your-api-token\"\n      }\n    }\n  }\n}\n```\n\nOr, you can use the pre-built Docker image:\n\n```json\n{\n  \"mcpServers\": {\n    \"modelscope-mcp-server\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\", \"--rm\", \"-i\",\n        \"-e\", \"MODELSCOPE_API_TOKEN\",\n        \"spadrian/modelscope-mcp-server:latest\"\n      ],\n      \"env\": {\n        \"MODELSCOPE_API_TOKEN\": \"your-api-token\"\n      }\n    }\n  }\n}\n```\n\nRefer to the [MCP JSON Configuration Standard](https://gofastmcp.com/integrations/mcp-json-configuration#mcp-json-configuration-standard) for more details.\n\nThis format is widely adopted across the MCP ecosystem:\n\n- **Cherry Studio**: See [Cherry Studio MCP Configuration](https://docs.cherry-ai.com/advanced-basic/mcp/config)\n- **Claude Desktop**: Uses `~/.claude/claude_desktop_config.json`\n- **Cursor**: Uses `~/.cursor/mcp.json`\n- **VS Code**: Uses workspace `.vscode/mcp.json`\n- **Other clients**: Many MCP-compatible applications follow this standard\n\n## 🛠️ Development\n\n### Environment Setup\n\n1. **Clone and Setup**:\n\n   ```bash\n   git clone https://github.com/modelscope/modelscope-mcp-server.git\n   cd modelscope-mcp-server\n   uv sync\n   ```\n\n2. **Activate Environment**:\n\n   ```bash\n   source .venv/bin/activate  # Linux/macOS\n   # or via your IDE\n   ```\n\n3. **Set Your API Token Environment Variable**:\n\n   ```bash\n   export MODELSCOPE_API_TOKEN=\"your-api-token\"\n   ```\n\n   Or, you can set the API token in the `.env` file (under the project root) for convenience:\n\n   ```env\n   MODELSCOPE_API_TOKEN=\"your-api-token\"\n   ```\n\n### Running the Demo Script\n\nRun a quick demo to explore the server's capabilities:\n\n```bash\nuv run python demo.py\n```\n\nUse the `--full` flag to demonstrate all available features:\n\n```bash\nuv run python demo.py --full\n```\n\n### Running the Server Locally\n\n```bash\n# Standard stdio transport (default)\nuv run modelscope-mcp-server\n\n# Streamable HTTP transport for web integration\nuv run modelscope-mcp-server --transport http\n\n# HTTP/SSE transport with custom port (default: 8000)\nuv run modelscope-mcp-server --transport [http/sse] --port 8080\n```\n\nFor HTTP/SSE mode, connect using a local URL in your MCP client configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"modelscope-mcp-server\": {\n      \"url\": \"http://127.0.0.1:8000/mcp/\"\n    }\n  }\n}\n```\n\nYou can also debug the server using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) tool:\n\n```bash\nnpx @modelcontextprotocol/inspector uv run modelscope-mcp-server\n```\n\nThe above command uses stdio transport by default; you can switch to HTTP or SSE in the Web UI as needed.\n\n### Testing\n\nRun the complete test suite:\n\n```bash\n# Basic test run\nuv run pytest\n\n# Run tests for a specific file\nuv run pytest tests/test_search_papers.py\n\n# With coverage report\nuv run pytest --cov=src --cov=examples --cov-report=html\n```\n\n### Code Quality\n\nThis project uses `pre-commit` hooks for automated code formatting, linting, and type checking:\n\n```bash\n# Install hooks\nuv run pre-commit install\n\n# Run all checks manually\nuv run pre-commit run --all-files\n```\n\n**All PRs must pass these checks and include appropriate tests.**\n\n## 📦 Release Management\n\n\u003e TODO: trigger release from GitHub Actions\n\n### Release to PyPI\n\n```bash\npython scripts/pypi_release.py\n```\n\n### Release to Docker Hub\n\n```bash\ndocker login\n\n# Release to Docker Hub (will auto-detect buildx or use traditional build)\npython scripts/docker_release.py\n\n# Release to Docker Hub (use traditional multi-arch build with manifest)\npython scripts/docker_release.py --traditional-multiarch\n```\n\n## 🤝 Contributing\n\nWe welcome contributions! Please ensure that:\n\n1. All PRs include relevant tests and pass the full test suite\n2. Code follows our style guidelines (enforced by pre-commit hooks)\n3. Documentation is updated for new features\n4. Commit messages follow conventional commit format\n\n## 📚 References\n\n- **[Model Context Protocol](https://modelcontextprotocol.io/)** - Official MCP documentation\n- **[FastMCP v2](https://github.com/jlowin/fastmcp)** - High-performance MCP framework\n- **[MCP Example Servers](https://github.com/modelcontextprotocol/servers)** - Community server examples\n\n## 📜 License\n\nThis project is licensed under the [Apache License (Version 2.0)](LICENSE).\n","funding_links":[],"categories":["🤖 AI/ML"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodelscope%2Fmodelscope-mcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodelscope%2Fmodelscope-mcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodelscope%2Fmodelscope-mcp-server/lists"}