@fynlink/mcp
v0.1.0
Published
Official MCP server for Fynlink powered by @fynlink/sdk.
Readme
Fynlink MCP (@fynlink/mcp)
Official MCP server for Fynlink, powered by the official @fynlink/sdk.
Why this exists
fyn-mcp gives AI clients a standard MCP tool surface for Fynlink operations without reimplementing encryption, retries, or API request shaping.
It is useful when:
- your AI platform supports MCP natively
- your app stack does not have a first-party Fyn SDK yet
- you want one secure integration point for AI-assisted link/domain/team workflows
Features
- Uses official
@fynlink/sdkinternally - Strict input schemas with
zod - Permission-aware tool gating (
fyn.info.get().permissions) - In-memory rate limiting for tool calls
- Redacted structured logging (token/secret/password-safe)
- MCP resources + prompts in addition to tools
- Supports:
stdiomode (local clients)- stateless Streamable HTTP mode (remote clients)
Tool Surface
Info
fyn.info.get
Links
fyn.links.listfyn.links.getfyn.links.createfyn.links.updatefyn.links.delete
Analytics
fyn.analytics.clicksfyn.analytics.timeseriesfyn.analytics.browsersfyn.analytics.devicesfyn.analytics.countriesfyn.analytics.referrers
Domains
fyn.domains.listfyn.domains.getfyn.domains.createfyn.domains.updatefyn.domains.verifyfyn.domains.remove
Members
fyn.members.listfyn.members.getfyn.members.invitefyn.members.updatefyn.members.remove
Teams
fyn.teams.getfyn.teams.update
Resources
fyn://team/currentfyn://links/recentfyn://domains/list
Prompts
create-campaign-linkanalyze-link-performancedomain-verification-checklist
Install
npm install @fynlink/mcpRequired Environment
FYN_API_TOKEN=token_xxxOptional:
FYN_SECRET_KEY=
FYN_TIMEOUT_MS=10000
FYN_RETRY_MAX_ATTEMPTS=2
FYN_RETRY_INITIAL_DELAY_MS=1000
FYN_CACHE_ENABLED=true
FYN_CACHE_TTL_MS=300000
FYN_CACHE_STORAGE=memory
FYN_CACHE_PATH=
FYN_CACHE_WARN_ON_DISK=false
FYN_DEBUG=falseSDK create defaults (optional):
FYN_DEFAULT_CREATE_DOMAIN=
FYN_DEFAULT_CREATE_SAFE_MODE=
FYN_DEFAULT_CREATE_ANALYTICS=
FYN_DEFAULT_CREATE_PRIVATE_LINK=
FYN_DEFAULT_CREATE_EXPIRY_SECONDS=MCP server runtime:
FYN_MCP_SERVER_NAME=fyn-mcp
FYN_MCP_SERVER_VERSION=
FYN_MCP_LOG_LEVEL=info
FYN_MCP_PERMISSION_CACHE_TTL_MS=60000
FYN_MCP_RATE_LIMIT_WINDOW_MS=60000
FYN_MCP_RATE_LIMIT_MAX_CALLS=180HTTP mode options:
FYN_MCP_HTTP_HOST=127.0.0.1
FYN_MCP_HTTP_PORT=8788
FYN_MCP_HTTP_PATH=/mcp
FYN_MCP_HTTP_ENABLE_JSON_RESPONSE=true
FYN_MCP_HTTP_CORS_ORIGIN=*
FYN_MCP_BEARER_TOKEN=HTTP Bearer Token (optional, recommended)
Yes. MCP HTTP mode supports bearer-token protection via FYN_MCP_BEARER_TOKEN.
Start server with a token:
FYN_MCP_BEARER_TOKEN=local_dev_token npx -y @fynlink/mcp http --host 127.0.0.1 --port 8788 --path /mcpCall MCP endpoint with header:
curl http://127.0.0.1:8788/mcp \
-H "Authorization: Bearer local_dev_token" \
-H "Content-Type: application/json"Run
Local stdio (recommended for desktop MCP clients)
npx -y @fynlink/mcp stdioRemote HTTP
npx -y @fynlink/mcp http --host 0.0.0.0 --port 8788 --path /mcpHealth endpoint:
GET /healthDocker
docker build -t fynlink/mcp:local .
docker run --rm -p 8788:8788 --env-file .env fynlink/mcp:localor:
docker compose up --buildAI Client Examples
Claude Desktop (stdio)
{
"mcpServers": {
"fynlink": {
"command": "npx",
"args": ["-y", "@fynlink/mcp", "stdio"],
"env": {
"FYN_API_TOKEN": "token_xxx",
"FYN_SECRET_KEY": "secret_xxx"
}
}
}
}Cursor / Cline (http)
{
"mcpServers": {
"fynlink": {
"transport": "http",
"url": "http://127.0.0.1:8788/mcp",
"headers": {
"Authorization": "Bearer <FYN_MCP_BEARER_TOKEN>"
}
}
}
}OpenAI MCP connector (http)
Local-first example:
{
"name": "Fynlink MCP",
"url": "http://127.0.0.1:8788/mcp",
"headers": {
"Authorization": "Bearer <FYN_MCP_BEARER_TOKEN>"
}
}Security Notes
- Keep
FYN_API_TOKENandFYN_SECRET_KEYserver-side only. - For HTTP mode, set
FYN_MCP_BEARER_TOKENand terminate TLS at edge/proxy. - Run behind rate limiting + WAF in production.
- Logs are redacted for sensitive fields.
Development
npm install
npm run dev
npm run lint
npm run typecheck
npm test
npm run build
npm run pack:check
npm run release:checkRelease
- CI validates
typecheck,test,build, andpack:checkon pushes/PRs tomain. - Publish runs only on git tags matching
v*. - Publish requires npm auth via
NPM_TOKEN(orNODE_AUTH_TOKEN) repository secret. - Tag must match
package.jsonversion exactly (example:v0.1.0for0.1.0).
License
MIT © Fynlink, LLC. See LICENSE.
