Inklusport MCP Server (Python)
Inklusport MCP 服务器 (Python)
MCP(模型上下文协议) 服务器,与课堂示例使用相同的基础(mcp>=2.0.0、MCPServer、@server.tool、HTTP 传输)。
领域工具不操作数据库:它们通过 HTTP GET 请求访问 ink-ms-users(端口 3002)和 ink-ms-sports(端口 3003)。每个角色代理(用户、教练、组织者、管理员)只能看到其对应的工具。
工具(读取与管理 → 微服务)
工具 | 微服务 | 端点 | 测试用例 |
| sports |
| CP1-HU16.2 |
| sports |
| CP2-HU16.2 |
| sports |
| CP1-HU16.1, CP2-HU16.1 |
| sports |
| CP1-HU16.3, CP2-HU16.3 |
| sports |
| CP1-HU16.4, CP2-HU16.4 |
| sports |
| CP1-HU16.4 |
| sports |
| CP1-HU17, CP2-HU17 |
| sports |
| CP1-HU18 |
| sports |
| CP2-HU18, CP1-HU18.1, CP2-HU18.1 |
| sports |
| CP1-HU18.2 |
| sports |
| CP2-HU18.2 |
| sports |
| CP1-HU18.3, CP2-HU18.3 |
| sports |
| CP1-HU18.4, CP2-HU18.4 |
| sports |
| CP1-HU18.5, CP2-HU18.5 |
| sports |
| CP1-HU19, CP2-HU19 |
| users |
| — |
| sports |
| — |
| users |
| — |
| sports |
| — |
| sports |
| — |
| sports |
| — |
Related MCP server: Enterprise MCP Gateway and Tool Registry
按角色划分的代理
AGENT_ROLE 在 .env 中(或启动时)过滤工具:
角色 | 工具 |
| 事件、可用事件、日历、报名、运动、个人资料、报名记录、适应性调整 |
| 事件、日历、个人资料、训练计划、适应性调整、残疾(CRUD/激活) |
| 事件(CRUD/取消)、日历、残疾、报名记录、适应性调整 |
| 所有事件管理、残疾、用户、训练计划和适应性调整工具 |
| 以上所有工具 |
Antigravity 的指令文件:agents/usuario.md、entrenador.md、organizador.md、admin.md。
结构
ink-mcp-inklusport/
├── requirements.txt
├── .env / .env.example
├── README.md
├── agents/ # prompts y config MCP para Antigravity
└── src/
├── server.py # servidor MCP y registro de tools
├── ms_client.py # GET HTTP a Users/Sports
└── client_test.py # cliente de prueba (como en clase)配置(.env)
TRANSPORT=streamable-http
HOST=127.0.0.1
PORT=8000
AGENT_ROLE=all
USERS_SERVICE_URL=http://localhost:3002
SPORTS_SERVICE_URL=http://localhost:3003TRANSPORT:sse、streamable-http 或 stdio。
快速开始(Windows)
1. 环境与安装
cd ink-mcp-inklusport
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt2. MCP 服务器
Users 和 Sports 并非启动必需。如果没有它们,工具将返回 success=false(微服务不可达)。
python src/server.py你应该看到 http://127.0.0.1:8000。健康检查:http://127.0.0.1:8000/。
3. 测试客户端(另一个终端)
.\.venv\Scripts\Activate.ps1
python src/client_test.py4. 每个角色一个进程(可选)
# terminal 1
$env:AGENT_ROLE="usuario"; $env:PORT="8000"; python src/server.py
# terminal 2
$env:AGENT_ROLE="entrenador"; $env:PORT="8001"; python src/server.py
# terminal 3
$env:AGENT_ROLE="organizador"; $env:PORT="8002"; python src/server.py
# terminal 4
$env:AGENT_ROLE="admin"; $env:PORT="8003"; python src/server.py使用四个角色配置 Antigravity:agents/antigravity.roles.mcp.json。
使用单个服务器(AGENT_ROLE=all):agents/antigravity.mcp.json。
Antigravity
安装 Antigravity IDE(不是“纯”2.0 代理)。
使用
TRANSPORT=streamable-http启动服务器。添加 MCP:
http://127.0.0.1:8000/mcp。将
agents/<角色>.md中的提示粘贴为代理指令。测试:“Inklusport 有哪些活动?”。如果响应包含
"via": "mcp"字段,则代理正在使用服务器,而非编造数据。
微服务
从 monorepo 根目录:
docker compose up -d users-service sports-service端口:Users 3002,Sports 3003。读取查询为 permitAll。写入工具(创建/编辑/取消/报名)调用 Sports API 的相同端点,并可能根据安全配置文件要求 JWT。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Eventify MCP server — manage events, attendees, sessions, speakers, sponsors, and analytics.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Strava MCP tools for AI: athletes, activities, segments, clubs, routes. Powered by HAPI MCP server.
AgentReady Tools is a searchable catalog of more than 250 APIs, MCP servers and developer tools that AI agents can use, each with agent-readiness checks (docs, auth, OpenAPI, MCP support). Search by task, get tool details and related tools, and read or share field notes from other agents in the Agent Community. Remote MCP endpoint: https://agentready-tools.com/mcp
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables management of Expokossodo 2025 events through 7 MCP tools for checking events, attendee registration, capacity monitoring, attendance confirmation, and real-time statistics. Features JWT authentication with role-based permissions for event coordinators and staff.-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to discover and execute tools via a secure MCP server with JWT authentication, RBAC, rate limiting, and audit logging.1MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for eventos event management platform, enabling AI assistants to manage events and tickets via API integration. Supports authentication, ticket CRUD operations, and listing with pagination.1MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that wraps wger fitness/nutrition management platform, providing 15 tools for exercise search, ingredient nutrition lookup, weight tracking, and more, accessible to any MCP-compatible AI agent.-