MEGA MCP Server
Provides tools for interacting with MEGA Hub, enabling search and details of models, datasets, spaces, repositories, papers, and docs; file operations; space management; job management; and OAuth protected resource discovery.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MEGA MCP Serversearch for models called 'bert'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MEGA MCP Server
Independent Model Context Protocol server for MEGA Hub. It exposes one stable surface across Cloudflare Worker, local Streamable HTTP, and stdio transports:
docssearches current official MEGA guidance.searchresolves live OpenAPI operations.executecalls one documented Hub operation within the caller's OAuth scopes.
Domain workflows live in Codex Skills. Large transfers, repository sync, Git,
streaming logs, interactive shells, and reproducible automation belong in the
mega CLI. MCP and CLI are parallel clients of the same Hub API; neither wraps
or depends on the other.
Hosted MCP
The official OAuth endpoint is:
https://mega.tensorplay.cn/mcpIt supports Streamable HTTP, OAuth 2.1 discovery, Dynamic Client Registration, PKCE, and direct bearer tokens for clients that manage their own credentials.
Related MCP server: Onto MCP Server
Related public projects
MEGA Codex plugin: the public Codex marketplace and OpenAI submission materials.
MEGA Agent Skills: eight standalone Skills installable with the npm-hosted
skillsCLI.
The MCP server, plugin, and Skills use independent repositories and release versions. The plugin pins a tested snapshot of the standalone Skills.
Authorization model
MEGA Hub remains the policy and data owner. Every execute request forwards the
caller's token to Hub, which enforces scopes, resource ownership, organization
policy, budgets, and billing.
The protected-resource document advertises these optional scopes:
repo:readrepo:writerepo:deletecommunity:writejobs:runinference:runaccount:keyswebhooks:manage
The initial OAuth challenge requests only repo:read. MEGA settings and the
actual authorization page share server-backed Read, Write, Full, and Custom
preferences. Inference remains available but is never enabled by default.
Tool availability is not authorization: all three tools are always visible, and the granted token scopes determine which API operations can succeed.
Legacy tools, bouquet, mix, and spaces URL parameters are rejected.
There are no compatibility aliases for the removed domain-specific tools.
Execute safety boundary
execute accepts a structured method, /api/ path, query object, and optional
JSON body. It:
fixes the destination to the configured MEGA Hub origin;
rejects unsafe paths, embedded query strings, and encoded separators;
permits only operations present in the live OpenAPI document;
limits request and response bodies to 1 MB;
returns status, request ID, location, content type, and parsed response data.
Use the CLI for larger payloads or streaming output.
Deployment modes
Mode | Entry point | Intended use |
Cloudflare Worker |
| Hosted Streamable HTTP service |
Local stdio |
| Local agents and development |
Local HTTP |
| Self-hosting and integration tests |
Container |
| Portable stateless HTTP deployment |
No Durable Object is required. Streamable HTTP uses stateless JSON responses and creates one MCP server per request.
Local stdio
Requires Node.js 22 or newer.
DEFAULT_MEGA_TOKEN=mega_xxx \
npx -y @tensorplay/mega-mcp-server{
"mcpServers": {
"mega": {
"command": "npx",
"args": ["-y", "@tensorplay/mega-mcp-server"],
"env": {
"DEFAULT_MEGA_TOKEN": "${MEGA_TOKEN}"
}
}
}
}Local HTTP
npm exec --yes --package=@tensorplay/mega-mcp-server -- mega-mcp-server-httpThe endpoint is http://127.0.0.1:3000/mcp; health checks use /healthz, and
protected-resource metadata is available at
/.well-known/oauth-protected-resource/mcp.
codex mcp add mega-local \
--url http://127.0.0.1:3000/mcp \
--bearer-token-env-var MEGA_TOKENDEFAULT_MEGA_TOKEN is a local-development fallback and must not be configured
on a shared server.
Docker
docker build -t mega-mcp-server .
docker run --rm -p 3000:3000 mega-mcp-serverThe runtime image is unprivileged and includes a /healthz health check.
OAuth discovery
An unauthenticated MCP request returns
401withresource_metadataand a read-only default scope request.Protected-resource metadata identifies MEGA Hub and every supported scope.
Hub publishes OAuth/OIDC discovery metadata.
The authorization screen initializes from the saved permission preference and lets the user narrow the current grant before approval.
Direct bearer tokens remain supported for local clients and automation.
Configuration
Variable | Default | Applies to | Purpose |
|
| All | Optional MEGA Hub API override |
|
| All | Per-request Hub timeout |
| Request origin | Worker | Canonical protected-resource URL |
| unset | Local only | stdio token or local HTTP fallback |
|
| Local HTTP | Listen address |
|
| Local HTTP | Listen port |
Only HTTPS Hub overrides are accepted outside localhost development.
Worker deployment
wrangler.jsonc is a provider-neutral public template. For a real deployment,
copy it to an untracked environment-specific configuration and supply routes
and optional Hub overrides or service bindings there.
npm ci
npm run check
npx wrangler deploy --config /path/to/private-wrangler.jsoncThe optional HUB service binding avoids a public network hop. The optional
METRICS binding records method, tool, status, duration, and count only; it
never records tokens, arguments, file contents, or results.
Development
npm ci
npm run typecheck
npm test
npm run deploy:dry-runSecurity reports follow SECURITY.md. Contribution and release expectations are in CONTRIBUTING.md.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceMCP hub server that aggregates tools from multiple domain packages into a single globally-available interface.Last updated1MIT
- Flicense-qualityBmaintenanceEnables interaction with the Onto platform through MCP, providing tools for managing realms, templates, entities, diagrams, and relations.Last updated

Coreshub MCP Serverofficial
Alicense-qualityDmaintenanceEnables interaction with the CoreHub cloud platform to manage containers, EPFS filesystems, distributed training, and inference services through MCP tools.Last updated10MIT- Flicense-qualityDmaintenanceEnables file system operations, web scraping, and AI-powered search through MCP tools for use by LLM agents.Last updated1
Related MCP Connectors
Manage SRG+ hubs, channels, content, assets, users, and workspaces from any MCP-aware AI agent.
Create, browse, remix, collaborate on, and run durable AI workflow nodes from MCP hosts.
MCP Hub: AI service discovery, per-user OAuth, and multi-service workflow orchestration
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ohtensorplay/mega-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server