MetaCall MCP Server
Exposes MetaCall FaaS capabilities as MCP tools for deploying, invoking, and managing serverless functions.
README
MetaCall MCP Server
A Model Context Protocol (MCP) server implemented in TypeScript on top of the metacall/protocol API. It exposes the complete MetaCall FaaS surface as MCP tools.
Architecture
┌────────────────────────────┐
│ MCP Client │
│ (CLI / IDE / Local LLM) │
└─────────────┬──────────────┘
│ (JSON-RPC over stdio)
▼
┌────────────────────────────┐
│ MCP Server (TS) │
│ - Tool Router │
│ - Zod Validation │
│ - Tool Handlers │
│ - Error Boundary │
└─────────────┬──────────────┘
│ (Function Calls)
▼
┌────────────────────────────┐
│ Protocol Client │
│ (metacall/protocol API) │
└─────────────┬──────────────┘
│ (Axios REST)
▼
┌────────────────────────────┐
│ MetaCall FaaS │
│ (Deploy + Runtime Layer) │
└────────────────────────────┘
Exposed Tools
System
| Tool | Description |
|---|---|
refresh |
Refresh the MetaCall JWT authentication token |
ready |
Check if the server is ready |
validate |
Validate the current auth token |
deployEnabled |
Check if deployments are enabled |
Subscriptions
| Tool | Description |
|---|---|
listSubscriptions |
List all active subscriptions |
listSubscriptionsDeploys |
List deployments for subscriptions |
Deployment
| Tool | Description |
|---|---|
inspect |
Inspect all deployments |
inspectByName |
Inspect a deployment by name |
upload |
Upload a zip package/blob into the FaaS |
add |
Add a new deployment |
deploy |
Trigger a deployment |
deployDelete |
Delete a deployment |
logs |
Retrieve deployment logs |
Repository
| Tool | Description |
|---|---|
branchList |
List branches in the repository |
fileList |
List files in the repository |
Invocation
| Tool | Description |
|---|---|
invoke |
Invoke a deployed function |
call |
Call a function directly |
await |
Await an async function result |
Design Principles
- 1:1 abstraction over the protocol API
- Async-safe Promise-based handlers
- Structured error boundary for consistent error handling
- Retry support via
waitFor - Zod-based input validation for all tool inputs
- Clean separation of concerns across layers
Installation & Setup
Prerequisites
- Node.js: v18 or higher.
- MetaCall Token: You need an active authentication token. You can get this by logging into dashboard.metacall.io.
1. Build the Server
First, clone this repository to your local machine, install the dependencies, and compile the TypeScript code:
git clone https://github.com/Somsubhra-Nandi/metacall-mcp-server.git
cd metacall-mcp-server
npm install
npm run build
Note: Get the absolute path of your
metacall-mcp-server/dist/index.jsfile as we will need it for the client configuration.
2. Client Configuration
The Model Context Protocol (MCP) allows us to use this server across various AI clients. Below are the setup instructions for Claude Desktop and Google Antigravity.
Option A: Claude Desktop
-
Open your Claude Desktop configuration file based on your operating system:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
Add the MetaCall server to your
mcpServersobject. Replace theargspath with the actual absolute path todist/index.js, and insert your MetaCall token:
{
"mcpServers": {
"metacall-faas": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/metacall-mcp-server/dist/index.js"
],
"env": {
"METACALL_TOKEN": "your_jwt_token_here",
"METACALL_BASE_URL": "https://dashboard.metacall.io"
}
}
}
}
Windows Users: Remember to use double backslashes. e.g.,
C:\\Users\\Name\\metacall-mcp-server\\dist\\index.js
- Restart Claude Desktop.
Option B: Google Antigravity
-
Open your Antigravity configuration file based on your operating system:
- macOS / Linux:
~/.gemini/antigravity/mcp_config.json - Windows:
%USERPROFILE%\.gemini\antigravity\mcp_config.json
- macOS / Linux:
-
Add the exact same JSON configuration block used for Claude Desktop (above) into your
mcp_config.jsonfile:
{
"mcpServers": {
"metacall-faas": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/metacall-mcp-server/dist/index.js"
],
"env": {
"METACALL_TOKEN": "your_jwt_token_here",
"METACALL_BASE_URL": "https://dashboard.metacall.io"
}
}
}
}
- In the Antigravity UI, navigate to the Agent Manager panel, click Manage MCP Servers, and hit Refresh. The server will be connected.
Upload Tool – How to Provide the Zip Package
The upload tool sends a zip package to MetaCall Cloud before deploying it. The MetaCall API expects the package as a binary buffer. The zip file must be encoded as a base64 string and then reconstructed into a buffer inside the MCP server.
Base64 works across all MCP clients because it is simply a text representation of the binary zip file.
Two ways of providing the zip package are supported:
1. zipBase64 (Recommended and works for all)
This is the portable method and works with all MCP clients such as Claude, antigravity and others.
Steps
-
Create a zip file containing your source code. The source files should be at the root of the zip archive.
Example structure:
package.zip └── abc.js -
Convert the zip file to a base64 string.
Linux:
base64 package.zipmacOS:
base64 package.zipWindows (PowerShell):
[Convert]::ToBase64String([IO.File]::ReadAllBytes("absolute path of the zip file")) -
Pass the base64 string to the upload tool.
Example tool input:
{ "name": "myPackage", "zipBase64": "ABCDEF...", "runners": ["node"] }
The MCP server will convert the base64 string back into a binary buffer and send it to the MetaCall API.
2. zipPath (Local Development Only)
When the MCP server has direct access to the local filesystem (for example when testing locally or using tools like Antigravity), the zip file can be provided as a file path.
Example:
{
"name": "myPackage",
"zipPath": "./package.zip"
}
The MCP server reads the file from disk using the provided path and uploads it to MetaCall.
Note:
zipPathmay not work with remote LLM clients like Claude because those clients cannot access files on the MCP server's filesystem.
Recommendation
For compatibility across all MCP clients, using zipBase64 is recommended.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。