@functionfly/mcp-server
Enables AI agents to interact with the FunctionFly platform for registry search, function execution, publishing, analytics, vault secrets, and stateful workflows.
README
@functionflycom/mcp-server
MCP server for FunctionFly — enables AI agents (Claude Desktop, Cursor, etc.) to interact with the FunctionFly platform directly.
Features
- Registry search — Find functions by name, author, runtime, or keyword
- Function execution — Execute any public or private function with JSON input
- Function publishing — Publish new functions or versions with source code and manifest
- Agent marketplace — Search and execute AI agents
- Usage analytics — View call counts and compute usage for your tenant
- Cost analytics — View cost breakdown by function
- Vault secrets — Zero-knowledge secret storage with client-side AES-256-GCM encryption
- StateFabric — Stateful workflow execution — list fabrics, pipelines, and trigger pipeline runs
Installation
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"functionfly": {
"command": "npx",
"args": ["-y", "@functionflycom/mcp-server"],
"env": {
"FUNCTIONFLY_API_KEY": "ffp_your_api_key_here"
}
}
}
}
Cursor
Add to your Cursor MCP settings (Settings → MCP → Add new server):
{
"mcpServers": {
"functionfly": {
"command": "npx",
"args": ["-y", "@functionflycom/mcp-server"],
"env": {
"FUNCTIONFLY_API_KEY": "ffp_your_api_key_here"
}
}
}
}
Configuration
| Environment Variable | Required | Default | Description |
|---|---|---|---|
FUNCTIONFLY_API_KEY |
Yes | — | Your FunctionFly API key (starts with ffp_) |
FUNCTIONFLY_API_URL |
No | https://api.functionfly.com |
API base URL |
FUNCTIONFLY_EXECUTION_TIMEOUT_MS |
No | 30000 |
Execution timeout (ms, max 300000) |
LOG_LEVEL |
No | info |
Log level: debug, info, warn, error |
VAULT_PASSPHRASE |
For vault tools | — | Passphrase for AES-256-GCM vault encryption/decryption |
Available Tools
Registry Tools
registry_search_functions
Search the public function registry.
{
"query": "image processing",
"runtime": "python",
"page": 1,
"limit": 20
}
registry_get_function
Get metadata for a specific function.
{
"author": "acme",
"name": "resize-image"
}
registry_execute_function
Execute a function and get its result.
{
"author": "acme",
"name": "resize-image",
"input": { "url": "https://example.com/image.jpg", "width": 800 },
"version": "1.2.3"
}
registry_publish_function
Publish a new function or version to the registry. Requires authentication.
{
"author": "acme",
"name": "resize-image",
"version": "1.2.3",
"manifest": {
"runtime": "python3.12",
"description": "Resize an image to specified dimensions",
"timeout_ms": 10000,
"memory_mb": 256,
"public": true,
"deterministic": false,
"input_schema": {
"type": "object",
"properties": {
"url": { "type": "string", "description": "Image URL" },
"width": { "type": "integer", "description": "Target width" }
},
"required": ["url"]
}
},
"source": {
"code": "import requests\nfrom PIL import Image\n...\nreturn {'url': output_url}",
"runtime": "python3.12"
},
"changelog": {
"category": "feature",
"title": "Add width-only resize support",
"description": "Image can now be resized by width alone while preserving aspect ratio",
"changes": [
{
"component": "input schema",
"field": "height",
"description": "Made height optional"
}
]
}
}
Agent Tools
agents_search
Search the agent marketplace.
{
"query": "data analysis",
"page": 1,
"limit": 20
}
agents_execute
Execute an agent by ID.
{
"agentId": "agent_abc123",
"input": { "data": "some input data" }
}
Analytics Tools
analytics_get_usage
Get usage metrics for your tenant.
{
"startDate": "2024-06-01",
"endDate": "2024-06-30",
"granularity": "day"
}
analytics_get_costs
Get cost breakdown for your tenant.
{
"startDate": "2024-06-01",
"endDate": "2024-06-30",
"groupBy": "function"
}
Vault Tools (Zero-Knowledge)
Zero-knowledge architecture: Secrets are encrypted client-side before leaving your machine. The FunctionFly server stores only ciphertext. Set
VAULT_PASSPHRASEto control encryption.
vault_list_secrets
List secrets in your vault (metadata only, no values).
{
"namespace": "production",
"limit": 20,
"offset": 0
}
vault_get_secret
Get and decrypt a secret. Uses VAULT_PASSPHRASE env var for decryption.
{
"id": "550e8400-e29b-41d4-a716-446655440000"
}
vault_set_secret
Create a new secret. The value is encrypted client-side before upload. Uses VAULT_PASSPHRASE env var.
{
"name": "github-api-key",
"value": "ghp_xxxx",
"secret_type": "api_key",
"description": "GitHub personal access token",
"namespace": "production"
}
vault_delete_secret
Permanently delete a secret by ID.
{
"id": "550e8400-e29b-41d4-a716-446655440000"
}
StateFabric Tools (Stateful Workflows)
statefabric_list_fabrics
List all stateful workflows (StateFabrics) for your tenant.
{
"limit": 20,
"offset": 0
}
statefabric_get_fabric
Get details of a specific StateFabric.
{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
statefabric_list_pipelines
List all pipelines within a StateFabric.
{
"fabricId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"limit": 20,
"offset": 0
}
statefabric_execute_pipeline
Execute a pipeline within a StateFabric and return its result.
{
"fabricId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"pipelineId": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"input": { "key": "value" }
}
Error Codes
| MCP Code | Meaning |
|---|---|
-32001 |
Invalid API key |
-32002 |
Function not found or execution error |
-32003 |
Rate limited (after retry exhaustion) |
-32004 |
Network or timeout error |
-32005 |
Payment required (insufficient balance) |
-32006 |
Quota exceeded |
Security
MVP limitation: The MCP server uses a single API key for all operations. Any AI agent with access to the MCP server can perform any action your API key allows (publish functions, execute paid functions, spend credits, etc.). Use a scoped API key with minimal permissions for MCP integrations. A future release will introduce MCP-scoped API keys with restricted permissions.
All API keys are redacted from logs. Sensitive fields (secret, token, ciphertext, etc.) are also redacted.
Development
# Install dependencies
npm install
# Type check
npm run typecheck
# Lint
npm run lint
# Test
npm test
# Build
npm run build
# Run locally
FUNCTIONFLY_API_KEY=ffp_test ./dist/index.js
Publishing
Create a git tag to trigger an npm release:
git tag v1.0.0
git push origin v1.0.0
The release workflow will build, publish to npm, and create a GitHub release automatically.
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。