@frontmcp/skills 1.0.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/catalog/frontmcp-authorities/SKILL.md +272 -0
- package/catalog/frontmcp-authorities/references/authority-profiles.md +262 -0
- package/catalog/frontmcp-authorities/references/claims-mapping.md +266 -0
- package/catalog/frontmcp-authorities/references/custom-evaluators.md +420 -0
- package/catalog/frontmcp-authorities/references/rbac-abac-rebac.md +391 -0
- package/catalog/frontmcp-channels/SKILL.md +122 -0
- package/catalog/frontmcp-channels/examples/channel-sources/agent-notify.md +70 -0
- package/catalog/frontmcp-channels/examples/channel-sources/app-errors.md +71 -0
- package/catalog/frontmcp-channels/examples/channel-sources/file-watcher.md +102 -0
- package/catalog/frontmcp-channels/examples/channel-sources/job-completion.md +79 -0
- package/catalog/frontmcp-channels/examples/channel-sources/replay-buffer.md +106 -0
- package/catalog/frontmcp-channels/examples/channel-sources/service-connector.md +136 -0
- package/catalog/frontmcp-channels/examples/channel-sources/webhook-github.md +85 -0
- package/catalog/frontmcp-channels/examples/channel-two-way/whatsapp-bridge.md +133 -0
- package/catalog/frontmcp-channels/references/channel-sources.md +214 -0
- package/catalog/frontmcp-channels/references/channel-two-way.md +195 -0
- package/catalog/frontmcp-config/SKILL.md +20 -18
- package/catalog/frontmcp-config/examples/configure-auth/multi-app-auth.md +1 -2
- package/catalog/frontmcp-config/examples/configure-auth/public-mode-setup.md +1 -2
- package/catalog/frontmcp-config/examples/configure-auth/remote-oauth-with-vault.md +1 -2
- package/catalog/frontmcp-config/examples/configure-auth-modes/local-self-signed-tokens.md +1 -2
- package/catalog/frontmcp-config/examples/configure-auth-modes/remote-enterprise-oauth.md +1 -2
- package/catalog/frontmcp-config/examples/configure-auth-modes/transparent-jwt-validation.md +1 -2
- package/catalog/frontmcp-config/examples/configure-deployment-targets/distributed-ha-config.md +121 -0
- package/catalog/frontmcp-config/examples/configure-deployment-targets/json-schema-ide-support.md +64 -0
- package/catalog/frontmcp-config/examples/configure-deployment-targets/multi-target-with-security.md +113 -0
- package/catalog/frontmcp-config/examples/configure-elicitation/basic-confirmation-gate.md +1 -2
- package/catalog/frontmcp-config/examples/configure-elicitation/distributed-elicitation-redis.md +1 -2
- package/catalog/frontmcp-config/examples/configure-http/entry-path-reverse-proxy.md +1 -2
- package/catalog/frontmcp-config/examples/configure-http/unix-socket-local.md +1 -2
- package/catalog/frontmcp-config/examples/configure-security-headers/csp-report-only.md +69 -0
- package/catalog/frontmcp-config/examples/configure-security-headers/full-production-headers.md +91 -0
- package/catalog/frontmcp-config/examples/configure-throttle/distributed-redis-throttle.md +1 -2
- package/catalog/frontmcp-config/examples/configure-throttle/per-tool-rate-limit.md +1 -2
- package/catalog/frontmcp-config/examples/configure-throttle/server-level-rate-limit.md +1 -2
- package/catalog/frontmcp-config/examples/configure-transport/custom-protocol-flags.md +1 -2
- package/catalog/frontmcp-config/examples/configure-transport/distributed-sessions-redis.md +1 -2
- package/catalog/frontmcp-config/examples/configure-transport/stateless-serverless.md +1 -2
- package/catalog/frontmcp-config/examples/configure-transport-protocol-presets/legacy-preset-nodejs.md +1 -2
- package/catalog/frontmcp-config/examples/configure-transport-protocol-presets/stateless-api-serverless.md +1 -2
- package/catalog/frontmcp-config/references/configure-deployment-targets.md +214 -0
- package/catalog/frontmcp-config/references/configure-elicitation.md +1 -2
- package/catalog/frontmcp-config/references/configure-security-headers.md +198 -0
- package/catalog/frontmcp-deployment/SKILL.md +1 -0
- package/catalog/frontmcp-deployment/examples/build-for-cli/cli-binary-build.md +1 -2
- package/catalog/frontmcp-deployment/examples/build-for-cli/unix-socket-daemon.md +1 -2
- package/catalog/frontmcp-deployment/examples/build-for-mcpb/mcpb-bundle-build.md +117 -0
- package/catalog/frontmcp-deployment/examples/build-for-sdk/connect-openai.md +1 -3
- package/catalog/frontmcp-deployment/examples/build-for-sdk/create-flat-config.md +1 -2
- package/catalog/frontmcp-deployment/examples/build-for-sdk/multi-platform-connect.md +3 -3
- package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/basic-worker-deploy.md +1 -2
- package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-custom-domain.md +1 -2
- package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-with-kv-storage.md +1 -2
- package/catalog/frontmcp-deployment/examples/deploy-to-lambda/lambda-handler-with-cors.md +1 -2
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-kv.md +1 -2
- package/catalog/frontmcp-deployment/examples/mcp-client-integration/http-remote.md +106 -0
- package/catalog/frontmcp-deployment/examples/mcp-client-integration/stdio-binary-with-env.md +107 -0
- package/catalog/frontmcp-deployment/examples/mcp-client-integration/stdio-npx.md +89 -0
- package/catalog/frontmcp-deployment/references/build-for-mcpb.md +209 -0
- package/catalog/frontmcp-deployment/references/build-for-sdk.md +1 -2
- package/catalog/frontmcp-deployment/references/mcp-client-integration.md +225 -0
- package/catalog/frontmcp-development/examples/create-agent/basic-agent-with-tools.md +3 -6
- package/catalog/frontmcp-development/examples/create-agent/custom-multi-pass-agent.md +1 -2
- package/catalog/frontmcp-development/examples/create-agent/nested-agents-with-swarm.md +2 -4
- package/catalog/frontmcp-development/examples/create-agent-llm-config/anthropic-config.md +1 -2
- package/catalog/frontmcp-development/examples/create-agent-llm-config/openai-config.md +1 -2
- package/catalog/frontmcp-development/examples/create-job/basic-report-job.md +1 -2
- package/catalog/frontmcp-development/examples/create-job/job-with-permissions.md +2 -3
- package/catalog/frontmcp-development/examples/create-job/job-with-retry.md +1 -2
- package/catalog/frontmcp-development/examples/create-plugin-hooks/tool-level-hooks-and-stage-replacement.md +2 -5
- package/catalog/frontmcp-development/examples/create-provider/basic-database-provider.md +4 -3
- package/catalog/frontmcp-development/examples/create-skill-with-tools/directory-skill-with-tools.md +2 -3
- package/catalog/frontmcp-development/examples/create-tool/basic-class-tool.md +1 -2
- package/catalog/frontmcp-development/examples/create-tool/tool-with-di-and-errors.md +2 -2
- package/catalog/frontmcp-development/examples/create-tool/tool-with-rate-limiting-and-progress.md +1 -2
- package/catalog/frontmcp-development/examples/create-tool-annotations/destructive-delete-tool.md +2 -4
- package/catalog/frontmcp-development/examples/create-tool-annotations/readonly-query-tool.md +1 -2
- package/catalog/frontmcp-development/examples/create-tool-output-schema-types/primitive-and-media-outputs.md +3 -6
- package/catalog/frontmcp-development/examples/create-tool-output-schema-types/zod-raw-shape-output.md +1 -2
- package/catalog/frontmcp-development/examples/create-tool-output-schema-types/zod-schema-advanced-output.md +2 -4
- package/catalog/frontmcp-development/examples/decorators-guide/agent-skill-job-workflow.md +3 -5
- package/catalog/frontmcp-development/examples/decorators-guide/basic-server-with-app-and-tools.md +5 -5
- package/catalog/frontmcp-development/examples/decorators-guide/multi-app-with-plugins-and-providers.md +4 -6
- package/catalog/frontmcp-development/examples/official-plugins/cache-and-feature-flags.md +3 -5
- package/catalog/frontmcp-development/examples/official-plugins/production-multi-plugin-setup.md +4 -5
- package/catalog/frontmcp-development/examples/official-plugins/remember-plugin-session-memory.md +3 -5
- package/catalog/frontmcp-development/references/create-agent.md +4 -7
- package/catalog/frontmcp-development/references/create-job.md +3 -6
- package/catalog/frontmcp-development/references/create-plugin-hooks.md +12 -16
- package/catalog/frontmcp-development/references/create-skill-with-tools.md +2 -3
- package/catalog/frontmcp-development/references/create-tool.md +93 -23
- package/catalog/frontmcp-development/references/create-workflow.md +2 -3
- package/catalog/frontmcp-development/references/decorators-guide.md +32 -36
- package/catalog/frontmcp-extensibility/examples/vectoriadb/product-catalog-search.md +4 -4
- package/catalog/frontmcp-extensibility/examples/vectoriadb/semantic-search-with-persistence.md +4 -4
- package/catalog/frontmcp-extensibility/examples/vectoriadb/tfidf-keyword-search.md +4 -3
- package/catalog/frontmcp-guides/SKILL.md +3 -3
- package/catalog/frontmcp-guides/examples/example-knowledge-base/agent-and-plugin.md +4 -5
- package/catalog/frontmcp-guides/examples/example-knowledge-base/vector-search-and-resources.md +4 -3
- package/catalog/frontmcp-guides/examples/example-task-manager/auth-and-crud-tools.md +4 -4
- package/catalog/frontmcp-guides/examples/example-weather-api/weather-tool-with-schemas.md +1 -2
- package/catalog/frontmcp-guides/references/example-knowledge-base.md +22 -17
- package/catalog/frontmcp-guides/references/example-task-manager.md +16 -11
- package/catalog/frontmcp-guides/references/example-weather-api.md +6 -3
- package/catalog/frontmcp-observability/examples/telemetry-api/tool-custom-spans.md +2 -3
- package/catalog/frontmcp-observability/examples/tracing-setup/basic-tracing.md +4 -3
- package/catalog/frontmcp-observability/references/telemetry-api.md +2 -3
- package/catalog/frontmcp-production-readiness/examples/common-checklist/observability-setup.md +1 -2
- package/catalog/frontmcp-production-readiness/examples/common-checklist/security-hardening.md +3 -4
- package/catalog/frontmcp-production-readiness/examples/distributed-ha/ha-kubernetes-3-replicas.md +229 -0
- package/catalog/frontmcp-production-readiness/examples/production-browser/cross-platform-crypto.md +2 -3
- package/catalog/frontmcp-production-readiness/examples/production-cli-binary/stdio-transport-error-handling.md +1 -2
- package/catalog/frontmcp-production-readiness/examples/production-cloudflare/durable-objects-state.md +2 -4
- package/catalog/frontmcp-production-readiness/examples/production-cloudflare/workers-runtime-constraints.md +2 -3
- package/catalog/frontmcp-production-readiness/examples/production-lambda/cold-start-connection-reuse.md +3 -2
- package/catalog/frontmcp-production-readiness/examples/production-vercel/cold-start-optimization.md +2 -2
- package/catalog/frontmcp-production-readiness/examples/production-vercel/stateless-serverless-design.md +3 -3
- package/catalog/frontmcp-production-readiness/references/distributed-ha.md +194 -0
- package/catalog/frontmcp-setup/SKILL.md +11 -11
- package/catalog/frontmcp-setup/examples/project-structure-standalone/feature-folder-organization.md +5 -3
- package/catalog/frontmcp-setup/examples/project-structure-standalone/minimal-standalone-layout.md +4 -2
- package/catalog/frontmcp-setup/examples/setup-project/basic-node-server.md +4 -2
- package/catalog/frontmcp-setup/examples/setup-project/vercel-serverless-server.md +4 -2
- package/catalog/frontmcp-setup/examples/setup-redis/hybrid-vercel-kv-with-pubsub.md +8 -7
- package/catalog/frontmcp-setup/references/setup-project.md +10 -9
- package/catalog/frontmcp-setup/references/setup-redis.md +19 -16
- package/catalog/frontmcp-testing/examples/test-direct-client/basic-create-test.md +1 -3
- package/catalog/frontmcp-testing/examples/test-direct-client/openai-claude-format-test.md +1 -3
- package/catalog/frontmcp-testing/examples/test-tool-unit/schema-validation-test.md +2 -2
- package/catalog/frontmcp-testing/references/test-direct-client.md +1 -3
- package/catalog/frontmcp-testing/references/test-tool-unit.md +2 -2
- package/catalog/skills-manifest.json +325 -3
- package/package.json +1 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: http-remote
|
|
3
|
+
reference: mcp-client-integration
|
|
4
|
+
level: basic
|
|
5
|
+
description: Connect an MCP client to a FrontMCP server running as an HTTP server, locally or remotely.
|
|
6
|
+
tags: [deployment, http, mcp-client, remote, cloud, production]
|
|
7
|
+
features:
|
|
8
|
+
- Connecting to a local FrontMCP dev server on a custom port
|
|
9
|
+
- Connecting to a remote production FrontMCP server with authentication
|
|
10
|
+
- Configuring HTTP transport in Claude Code and Claude Desktop
|
|
11
|
+
- Using a background daemon on a TCP port for persistent local access
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Connect to a FrontMCP HTTP Server
|
|
15
|
+
|
|
16
|
+
Connect an MCP client to a FrontMCP server running as an HTTP server, locally or remotely.
|
|
17
|
+
|
|
18
|
+
## Code
|
|
19
|
+
|
|
20
|
+
### Local development
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Start the server on port 3005
|
|
24
|
+
my-server serve -p 3005
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```json Claude Code (.mcp.json)
|
|
28
|
+
{
|
|
29
|
+
"mcpServers": {
|
|
30
|
+
"my-server": {
|
|
31
|
+
"type": "http",
|
|
32
|
+
"url": "http://localhost:3005/mcp"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Production (remote server with auth)
|
|
39
|
+
|
|
40
|
+
```json Claude Code (.mcp.json)
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"my-server": {
|
|
44
|
+
"type": "http",
|
|
45
|
+
"url": "https://my-server.example.com/mcp",
|
|
46
|
+
"headers": {
|
|
47
|
+
"Authorization": "Bearer your-token-here"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Background daemon on port
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Start as a background daemon on port 4000
|
|
58
|
+
my-server daemon start -p 4000
|
|
59
|
+
|
|
60
|
+
# Verify it's running
|
|
61
|
+
my-server daemon status
|
|
62
|
+
# → Running (PID: 12345, started: 2025-01-01T00:00:00.000Z, port: 4000)
|
|
63
|
+
|
|
64
|
+
# View logs
|
|
65
|
+
my-server daemon logs
|
|
66
|
+
|
|
67
|
+
# Stop when done
|
|
68
|
+
my-server daemon stop
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
```json Claude Code (.mcp.json)
|
|
72
|
+
{
|
|
73
|
+
"mcpServers": {
|
|
74
|
+
"my-server": {
|
|
75
|
+
"type": "http",
|
|
76
|
+
"url": "http://localhost:4000/mcp"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Serverless (Vercel, AWS Lambda)
|
|
83
|
+
|
|
84
|
+
```json Claude Code (.mcp.json)
|
|
85
|
+
{
|
|
86
|
+
"mcpServers": {
|
|
87
|
+
"my-server": {
|
|
88
|
+
"type": "http",
|
|
89
|
+
"url": "https://my-server.vercel.app/mcp"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## What This Demonstrates
|
|
96
|
+
|
|
97
|
+
- Connecting to a local FrontMCP dev server on a custom port
|
|
98
|
+
- Connecting to a remote production FrontMCP server with authentication
|
|
99
|
+
- Configuring HTTP transport in Claude Code and Claude Desktop
|
|
100
|
+
- Using a background daemon on a TCP port for persistent local access
|
|
101
|
+
|
|
102
|
+
## Related
|
|
103
|
+
|
|
104
|
+
- See `mcp-client-integration` for the full MCP client configuration reference
|
|
105
|
+
- See `deploy-to-node` for production HTTP server deployment
|
|
106
|
+
- See `deploy-to-vercel` for serverless deployment
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stdio-binary-with-env
|
|
3
|
+
reference: mcp-client-integration
|
|
4
|
+
level: intermediate
|
|
5
|
+
description: Configure a local FrontMCP CLI binary with environment variables and custom arguments in MCP client configs.
|
|
6
|
+
tags: [deployment, stdio, cli, binary, env, mcp-client, configuration]
|
|
7
|
+
features:
|
|
8
|
+
- Pointing MCP clients at a locally installed FrontMCP binary
|
|
9
|
+
- Passing database URLs, API keys, and feature flags via environment variables
|
|
10
|
+
- Using absolute paths for reliable binary resolution
|
|
11
|
+
- Configuring different environments (dev, staging) via env vars
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Local Binary with Environment Variables
|
|
15
|
+
|
|
16
|
+
Configure a local FrontMCP CLI binary with environment variables and custom arguments in MCP client configs.
|
|
17
|
+
|
|
18
|
+
## Code
|
|
19
|
+
|
|
20
|
+
### Install and build the binary
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Build the CLI binary
|
|
24
|
+
frontmcp build --target cli
|
|
25
|
+
|
|
26
|
+
# Install it (creates symlink in ~/.local/bin/)
|
|
27
|
+
my-server install
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Development configuration
|
|
31
|
+
|
|
32
|
+
```json Claude Code (.mcp.json)
|
|
33
|
+
{
|
|
34
|
+
"mcpServers": {
|
|
35
|
+
"my-server-dev": {
|
|
36
|
+
"command": "/Users/you/.local/bin/my-server",
|
|
37
|
+
"args": ["--stdio"],
|
|
38
|
+
"env": {
|
|
39
|
+
"DATABASE_URL": "postgresql://localhost:5432/mydb_dev",
|
|
40
|
+
"REDIS_URL": "redis://localhost:6379",
|
|
41
|
+
"API_KEY": "sk-dev-xxxxx",
|
|
42
|
+
"LOG_LEVEL": "debug",
|
|
43
|
+
"NODE_ENV": "development"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Staging configuration
|
|
51
|
+
|
|
52
|
+
```json Claude Code (.mcp.json)
|
|
53
|
+
{
|
|
54
|
+
"mcpServers": {
|
|
55
|
+
"my-server-staging": {
|
|
56
|
+
"command": "/Users/you/.local/bin/my-server",
|
|
57
|
+
"args": ["--stdio"],
|
|
58
|
+
"env": {
|
|
59
|
+
"DATABASE_URL": "postgresql://staging-db.example.com:5432/mydb",
|
|
60
|
+
"REDIS_URL": "redis://staging-redis.example.com:6379",
|
|
61
|
+
"API_KEY": "sk-staging-xxxxx",
|
|
62
|
+
"LOG_LEVEL": "warn",
|
|
63
|
+
"NODE_ENV": "staging"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Multiple servers in one config
|
|
71
|
+
|
|
72
|
+
```json Claude Code (.mcp.json)
|
|
73
|
+
{
|
|
74
|
+
"mcpServers": {
|
|
75
|
+
"backend-tools": {
|
|
76
|
+
"command": "/Users/you/.local/bin/backend-server",
|
|
77
|
+
"args": ["--stdio"],
|
|
78
|
+
"env": {
|
|
79
|
+
"DATABASE_URL": "postgresql://localhost:5432/backend"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"docs-tools": {
|
|
83
|
+
"command": "npx",
|
|
84
|
+
"args": ["-y", "docs-mcp-server", "--stdio"],
|
|
85
|
+
"env": {
|
|
86
|
+
"DOCS_PATH": "/Users/you/docs"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"analytics": {
|
|
90
|
+
"type": "http",
|
|
91
|
+
"url": "https://analytics.example.com/mcp"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## What This Demonstrates
|
|
98
|
+
|
|
99
|
+
- Pointing MCP clients at a locally installed FrontMCP binary
|
|
100
|
+
- Passing database URLs, API keys, and feature flags via environment variables
|
|
101
|
+
- Using absolute paths for reliable binary resolution
|
|
102
|
+
- Configuring different environments (dev, staging) via env vars
|
|
103
|
+
|
|
104
|
+
## Related
|
|
105
|
+
|
|
106
|
+
- See `mcp-client-integration` for the full MCP client configuration reference
|
|
107
|
+
- See `build-for-cli` for CLI build and installation options
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stdio-npx
|
|
3
|
+
reference: mcp-client-integration
|
|
4
|
+
level: basic
|
|
5
|
+
description: Publish a FrontMCP server to npm and configure MCP clients to use it with npx --stdio.
|
|
6
|
+
tags: [deployment, stdio, npx, npm, mcp-client, claude-code, claude-desktop]
|
|
7
|
+
features:
|
|
8
|
+
- Building a FrontMCP server as a distributable CLI bundle
|
|
9
|
+
- Configuring package.json bin field for npx execution
|
|
10
|
+
- Setting up Claude Code, Claude Desktop, and Cursor to use the server via stdio
|
|
11
|
+
- Passing environment variables from MCP client config to the server
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Publish and Use via npx --stdio
|
|
15
|
+
|
|
16
|
+
Publish a FrontMCP server to npm and configure MCP clients to use it with npx --stdio.
|
|
17
|
+
|
|
18
|
+
## Code
|
|
19
|
+
|
|
20
|
+
### 1. Build the CLI bundle
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
frontmcp build --target cli --js
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### 2. Configure package.json
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"name": "my-weather-mcp",
|
|
31
|
+
"version": "1.0.0",
|
|
32
|
+
"description": "Weather data MCP server",
|
|
33
|
+
"bin": {
|
|
34
|
+
"my-weather-mcp": "./dist/my-weather-mcp-cli.bundle.js"
|
|
35
|
+
},
|
|
36
|
+
"files": ["dist/"],
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@frontmcp/sdk": "^1.0.0"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 3. Publish to npm
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm publish
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 4. Configure MCP clients
|
|
50
|
+
|
|
51
|
+
```json Claude Code (.mcp.json)
|
|
52
|
+
{
|
|
53
|
+
"mcpServers": {
|
|
54
|
+
"weather": {
|
|
55
|
+
"command": "npx",
|
|
56
|
+
"args": ["-y", "my-weather-mcp", "--stdio"],
|
|
57
|
+
"env": {
|
|
58
|
+
"WEATHER_API_KEY": "your-api-key"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```json Claude Desktop (claude_desktop_config.json)
|
|
66
|
+
{
|
|
67
|
+
"mcpServers": {
|
|
68
|
+
"weather": {
|
|
69
|
+
"command": "npx",
|
|
70
|
+
"args": ["-y", "my-weather-mcp", "--stdio"],
|
|
71
|
+
"env": {
|
|
72
|
+
"WEATHER_API_KEY": "your-api-key"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## What This Demonstrates
|
|
80
|
+
|
|
81
|
+
- Building a FrontMCP server as a distributable CLI bundle
|
|
82
|
+
- Configuring package.json bin field for npx execution
|
|
83
|
+
- Setting up Claude Code, Claude Desktop, and Cursor to use the server via stdio
|
|
84
|
+
- Passing environment variables from MCP client config to the server
|
|
85
|
+
|
|
86
|
+
## Related
|
|
87
|
+
|
|
88
|
+
- See `mcp-client-integration` for the full MCP client configuration reference
|
|
89
|
+
- See `build-for-cli` for CLI build options and SEA binary creation
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: build-for-mcpb
|
|
3
|
+
description: Package a FrontMCP server as a .mcpb archive that Claude Desktop and other MCPB-aware clients install with one click
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Building an MCP Bundle (MCPB)
|
|
7
|
+
|
|
8
|
+
Package your FrontMCP server as a `.mcpb` archive conforming to the
|
|
9
|
+
[MCPB v0.3 spec](https://github.com/modelcontextprotocol/mcpb). Consumers
|
|
10
|
+
double-click the file — the host client extracts it and runs the server over
|
|
11
|
+
stdio. Metadata, tools, prompts, user-configurable inputs, and per-platform
|
|
12
|
+
runtime overrides are all declared statically in `manifest.json`.
|
|
13
|
+
|
|
14
|
+
## When to Use This Skill
|
|
15
|
+
|
|
16
|
+
### Must Use
|
|
17
|
+
|
|
18
|
+
- Distributing an MCP server to end users who install via Claude Desktop,
|
|
19
|
+
Cursor, or another MCPB-aware client — no CLI, no `npx`, no registry.
|
|
20
|
+
- Attaching a single signed artifact with a stable hash to a GitHub release.
|
|
21
|
+
- Exposing install-time configuration (tokens, paths, toggles) through the
|
|
22
|
+
client's native install dialog via `user_config`.
|
|
23
|
+
|
|
24
|
+
### Recommended
|
|
25
|
+
|
|
26
|
+
- Shipping optional platform-specific binaries so users without Node installed
|
|
27
|
+
can still run the server.
|
|
28
|
+
- Producing reproducible builds — MCPB archives are deterministic by default
|
|
29
|
+
(same inputs → byte-identical output → matching SHA-256).
|
|
30
|
+
|
|
31
|
+
### Skip When
|
|
32
|
+
|
|
33
|
+
- You need an interactive CLI with subcommands per tool — use `build-for-cli`.
|
|
34
|
+
- You're hosting the server yourself over HTTP — use `deploy-to-node` or a
|
|
35
|
+
serverless target (`deploy-to-vercel`, `deploy-to-lambda`, `deploy-to-cloudflare`).
|
|
36
|
+
- You're embedding tools in an existing Node.js application — use `build-for-sdk`.
|
|
37
|
+
|
|
38
|
+
> **Decision:** Choose `build-for-mcpb` when users install your server through
|
|
39
|
+
> an MCPB-aware client; choose `build-for-cli` for terminal-first distribution.
|
|
40
|
+
|
|
41
|
+
## Build Commands
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Basic bundle — dist/mcpb/{name}-{version}.mcpb
|
|
45
|
+
frontmcp build --target mcpb
|
|
46
|
+
|
|
47
|
+
# Include a SEA binary for the host platform
|
|
48
|
+
frontmcp build --target mcpb --sea
|
|
49
|
+
|
|
50
|
+
# Merge pre-built cross-platform binaries from CI
|
|
51
|
+
frontmcp build --target mcpb --merge-from ./ci-bins
|
|
52
|
+
|
|
53
|
+
# Skip zipping and inspect the staging directory
|
|
54
|
+
frontmcp build --target mcpb --stage-only
|
|
55
|
+
|
|
56
|
+
# Validate a produced archive
|
|
57
|
+
frontmcp mcpb validate dist/mcpb/my-server-1.0.0.mcpb
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Requirements
|
|
61
|
+
|
|
62
|
+
- **Node.js ≥ 22** at build time.
|
|
63
|
+
- The entry file must export or instantiate a `@FrontMcp`-decorated class
|
|
64
|
+
(the build-time schema extractor boots it in introspection mode).
|
|
65
|
+
- `@frontmcp/sdk` must be installed and reachable at the path used by the
|
|
66
|
+
build (never exclude it from bundling).
|
|
67
|
+
- For `--sea` builds, Node.js ≥ 24 is required (FrontMCP targets the current SEA API).
|
|
68
|
+
|
|
69
|
+
## What the Archive Contains
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
dist/mcpb/
|
|
73
|
+
my-server-1.0.0.mcpb # the distributable artifact
|
|
74
|
+
__stage/ # removed after successful zip
|
|
75
|
+
manifest.json # MCPB v0.3 manifest (generated)
|
|
76
|
+
server/
|
|
77
|
+
index.js # esbuild single-file CJS bundle
|
|
78
|
+
package.json # minimal { type: "commonjs" } marker
|
|
79
|
+
_skills/ # when capabilities.skills
|
|
80
|
+
bin/ # when --sea or --merge-from
|
|
81
|
+
darwin-arm64/my-server
|
|
82
|
+
win32-x64/my-server.exe
|
|
83
|
+
icon.png # when resolved
|
|
84
|
+
README.md # when present in project root
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Manifest Sources
|
|
88
|
+
|
|
89
|
+
| MCPB field | Source (priority order) |
|
|
90
|
+
| ----------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
91
|
+
| `name`, `version` | frontmcp.config → package.json |
|
|
92
|
+
| `description` | deployment.longDescription first line → package.json.description |
|
|
93
|
+
| `author` | deployment.author → parsed `package.json.author` string (`"Name <email> (url)"`) |
|
|
94
|
+
| `license`, `homepage`, `repository`, `keywords` | deployment override → package.json fallback |
|
|
95
|
+
| `icon` | deployment.icon → package.json.icon → `icon.png` / `assets/icon.png` in cwd |
|
|
96
|
+
| `tools` | Schema extraction (system tools like `execute-job` filtered out) |
|
|
97
|
+
| `prompts` | Schema extraction; emitted with `prompts_generated: true` |
|
|
98
|
+
| `user_config` | Translated from `setup.steps` + deployment.userConfig overrides |
|
|
99
|
+
| `compatibility.runtimes.node` | deployment.compatibility.runtimes.node → frontmcp.config.nodeVersion → `">=22.0.0"` |
|
|
100
|
+
| `compatibility.platforms` | deployment.compatibility.platforms → `["darwin","linux","win32"]` |
|
|
101
|
+
|
|
102
|
+
## Setup Steps → user_config + env
|
|
103
|
+
|
|
104
|
+
If your exec config declares a `setup.steps` questionnaire, each step becomes
|
|
105
|
+
an MCPB `user_config` entry and a matching `mcp_config.env` variable wired via
|
|
106
|
+
`${user_config.KEY}` substitution.
|
|
107
|
+
|
|
108
|
+
Type resolution:
|
|
109
|
+
|
|
110
|
+
| FrontMCP schema | MCPB `type` |
|
|
111
|
+
| ---------------------------------------------------- | --------------------- |
|
|
112
|
+
| `z.string()` | `string` |
|
|
113
|
+
| `z.number()` / `z.number().int()` | `number` |
|
|
114
|
+
| `z.boolean()` | `boolean` |
|
|
115
|
+
| `z.array(z.string())` | `string` + `multiple` |
|
|
116
|
+
| `deployment.userConfig.X.type: 'directory'` override | `directory` |
|
|
117
|
+
| `deployment.userConfig.X.type: 'file'` override | `file` |
|
|
118
|
+
|
|
119
|
+
Secrets: defaults are stripped when `sensitive: true` so tokens never appear
|
|
120
|
+
in the manifest.
|
|
121
|
+
|
|
122
|
+
Unsupported: `showWhen` / `next` branching — MCPB forms are flat; the
|
|
123
|
+
generator logs a warning and renders every step unconditionally.
|
|
124
|
+
|
|
125
|
+
## Cross-Platform Binaries
|
|
126
|
+
|
|
127
|
+
Node SEA builds for the host OS/arch only. To ship a `.mcpb` that runs
|
|
128
|
+
binary-only on every platform, run the build in a CI matrix and assemble with
|
|
129
|
+
`--merge-from`:
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
ci-bins/
|
|
133
|
+
darwin-arm64/my-server
|
|
134
|
+
darwin-x64/my-server
|
|
135
|
+
linux-x64/my-server
|
|
136
|
+
win32-x64/my-server.exe
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Platforms without a binary automatically fall through to the Node command +
|
|
140
|
+
bundled JS, so a partial matrix is fine.
|
|
141
|
+
|
|
142
|
+
## Common Patterns
|
|
143
|
+
|
|
144
|
+
| Pattern | Correct | Incorrect | Why |
|
|
145
|
+
| ----------------------- | ------------------------------------------ | ---------------------------- | --------------------------------------------------------------- |
|
|
146
|
+
| Entry path | `${__dirname}/server/index.js` | Absolute host path | Host app extracts to a fresh tmp dir each install |
|
|
147
|
+
| User config reference | `${user_config.apiToken}` | `$API_TOKEN` | MCPB substitution happens at install time, not shell expansion |
|
|
148
|
+
| Sensitive defaults | Omit `default` | Emit the real token | Manifests ship in plaintext; anything in `default` is committed |
|
|
149
|
+
| External services | Declare in `privacy_policies` | Omit | Stores/clients surface these during install review |
|
|
150
|
+
| Multi-platform binaries | CI matrix + `--merge-from` | Build on one OS and ship | SEA binaries are OS/arch-specific |
|
|
151
|
+
| Prompt `text` | Leave empty, set `prompts_generated: true` | Try to serialize `execute()` | JS logic doesn't fit MCPB's static `${arguments.KEY}` template |
|
|
152
|
+
|
|
153
|
+
## Verification Checklist
|
|
154
|
+
|
|
155
|
+
**Build**
|
|
156
|
+
|
|
157
|
+
- [ ] `frontmcp build --target mcpb` exits 0
|
|
158
|
+
- [ ] `dist/mcpb/{name}-{version}.mcpb` exists and is a valid ZIP
|
|
159
|
+
- [ ] Archive size is reasonable (< 50 MB typical; warn-threshold fires at 50 MB)
|
|
160
|
+
- [ ] Two back-to-back builds produce identical SHA-256 (deterministic mode on)
|
|
161
|
+
|
|
162
|
+
**Manifest**
|
|
163
|
+
|
|
164
|
+
- [ ] `manifest_version: "0.3"`
|
|
165
|
+
- [ ] `server.entry_point` matches the file present in the archive
|
|
166
|
+
- [ ] Every `${user_config.KEY}` reference has a matching `user_config[KEY]`
|
|
167
|
+
- [ ] No `${…}` substitutions outside the allow-list
|
|
168
|
+
|
|
169
|
+
**Install**
|
|
170
|
+
|
|
171
|
+
- [ ] Opening the `.mcpb` in Claude Desktop shows the expected name, description, author, tools
|
|
172
|
+
- [ ] `user_config` form renders with correct titles / descriptions / default values
|
|
173
|
+
- [ ] Server starts over stdio and answers `initialize` / `tools/list`
|
|
174
|
+
|
|
175
|
+
## Troubleshooting
|
|
176
|
+
|
|
177
|
+
| Problem | Cause | Solution |
|
|
178
|
+
| ------------------------------------------------------ | -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
179
|
+
| `@frontmcp/sdk is required for schema extraction` | SDK missing or externalized from bundle | Ensure `@frontmcp/sdk` is installed |
|
|
180
|
+
| Archive > 100 MB | node_modules bundled or node runtime bloated | Tune `build.esbuild.external`, drop `--sea`, or disable `includeNodeModules` |
|
|
181
|
+
| `Unknown substitution variable` on validate | Typo in `mcp_config.args` / `env` | Only `__dirname`, `HOME`, `DESKTOP`, `DOCUMENTS`, `DOWNLOADS`, `pathSeparator`, and declared `user_config` keys are allowed |
|
|
182
|
+
| `entry_point is not present in archive` | Custom `--entry` flag or bundler moved the file | Re-run without the override, or update the config's `entry` |
|
|
183
|
+
| Two builds produce different SHA-256 | `--no-deterministic` set, or inputs embed a changing timestamp | Restore deterministic mode; scan your sources for live date/time values |
|
|
184
|
+
| `platform_overrides.{platform}.command` missing binary | `--merge-from` folders don't match MCPB platform keys | See the expected layout below |
|
|
185
|
+
|
|
186
|
+
Expected `--merge-from` layout (platform dirs must match MCPB platform keys):
|
|
187
|
+
|
|
188
|
+
```text
|
|
189
|
+
{dir}/
|
|
190
|
+
darwin-arm64/{name}
|
|
191
|
+
darwin-x64/{name}
|
|
192
|
+
linux-arm64/{name}
|
|
193
|
+
linux-x64/{name}
|
|
194
|
+
win32-x64/{name}.exe
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Examples
|
|
198
|
+
|
|
199
|
+
| Example | Level | Description |
|
|
200
|
+
| ---------------------------------------------------------------------- | ----- | ---------------------------------------------------------------------------------------------- |
|
|
201
|
+
| [`mcpb-bundle-build`](../examples/build-for-mcpb/mcpb-bundle-build.md) | Basic | Produce a .mcpb archive for Claude Desktop with metadata, tools, and install-time user_config. |
|
|
202
|
+
|
|
203
|
+
> See all examples in [`examples/build-for-mcpb/`](../examples/build-for-mcpb/)
|
|
204
|
+
|
|
205
|
+
## Reference
|
|
206
|
+
|
|
207
|
+
- **MCPB spec:** <https://github.com/modelcontextprotocol/mcpb>
|
|
208
|
+
- **Docs:** <https://docs.agentfront.dev/frontmcp/deployment/mcpb>
|
|
209
|
+
- **Related skills:** `build-for-cli`, `build-for-sdk`, `mcp-client-integration`
|
|
@@ -61,8 +61,7 @@ class MySDK {}
|
|
|
61
61
|
The `create()` factory spins up a server from a flat config object — no decorators or classes needed:
|
|
62
62
|
|
|
63
63
|
```typescript
|
|
64
|
-
import { create } from '@frontmcp/sdk';
|
|
65
|
-
import { z } from 'zod';
|
|
64
|
+
import { create, z } from '@frontmcp/sdk';
|
|
66
65
|
|
|
67
66
|
const server = await create({
|
|
68
67
|
info: { name: 'my-service', version: '1.0.0' },
|