fyi-docs
Remote MCP server for FYI Docs that exposes read-only tools (search documents, clients, jobs, tasks, cabinets) to MCP clients like Claude or Cursor via Streamable HTTP, using API key authentication.
README
fyi-docs-mcp-ts
Remote MCP server for FYI Docs (document management system), built with Bun + TypeScript and deployed on Railway.
Exposes read-only FYI tools to MCP clients (Claude, Cursor, etc.) over Streamable HTTP for Somerset Accountancy Services.
Stack
| Component | Choice |
|---|---|
| Runtime | Bun |
| Language | TypeScript (strict) |
| MCP SDK | @modelcontextprotocol/sdk |
| Transport | Streamable HTTP (Web Standard, Bun-native) |
| Validation | Zod |
| Hosting | Railway (GitHub-connected) |
Tools
| Tool | Description |
|---|---|
search_documents |
Search/list documents |
search_clients |
Search/list clients (/entity) |
list_jobs |
List jobs |
list_tasks |
List tasks |
list_cabinets |
List filing cabinets |
fyi_raw_list |
Low-level list against any FYI resource |
check_fyi_connection |
Verify credentials / connectivity |
All tools are read-only in v1. Responses are summarised; secrets are redacted.
Endpoints
| Path | Purpose |
|---|---|
GET /health |
Railway health check (200) |
ALL /mcp |
MCP Streamable HTTP endpoint |
GET / |
Service metadata |
Environment variables
Required
FYI_ACCESS_ID=
FYI_ACCESS_SECRET=
FYI_REGION=uk
MCP_API_KEY= # shared secret for /mcp (min 16 chars)
Optional
FYI_APPLICATION_ID=
FYI_API_USER=
FYI_BASE_URL=
PORT=3000
NODE_ENV=production
FYI_REGION |
Base URL |
|---|---|
uk |
https://api-eu-west-2.fyi.app/external |
au / anz |
https://api-ap-southeast-2.fyi.app/external |
Override with FYI_BASE_URL if needed. Copy .env.example to .env for local development.
Local setup
bun install
cp .env.example .env # fill in FYI credentials
bun run dev # watch mode
# or
bun start
- Health:
http://localhost:3000/health - MCP:
http://localhost:3000/mcp
Railway
This repo is connected to Railway. Deploys follow GitHub pushes.
Config is in railway.toml:
- Install:
bun install --frozen-lockfile - Start:
bun run src/index.ts - Health check:
/health
Set secrets in Railway (do not commit them):
railway variables set FYI_ACCESS_ID=... FYI_ACCESS_SECRET=... FYI_REGION=uk MCP_API_KEY=...
Optional Dockerfile (oven/bun:1) is included if you prefer image-based builds.
Authentication (API key only)
No OAuth. /mcp requires the shared MCP_API_KEY via header:
Authorization: Bearer <MCP_API_KEY>- or
x-api-key: <MCP_API_KEY>
/health stays public for Railway health checks.
{
"mcpServers": {
"fyi-docs": {
"url": "https://fyi-mcp-production.up.railway.app/mcp",
"headers": {
"Authorization": "Bearer <MCP_API_KEY>"
}
}
}
}
Grok Build / CLI:
[mcp_servers.fyi-docs]
url = "https://fyi-mcp-production.up.railway.app/mcp"
headers = { "Authorization" = "Bearer <MCP_API_KEY>" }
Note: Hosts that only support OAuth custom connectors (e.g. Grok.com web) cannot connect to this server. Use clients that accept a static Authorization header.
Scripts
| Script | Command |
|---|---|
bun start |
Run server |
bun run dev |
Run with --watch |
bun run typecheck |
tsc --noEmit |
bun run build |
Bundle to dist/ |
Project layout
src/
index.ts # Bun HTTP entry (/health, /mcp)
server.ts # MCP server + tool registration
fyi/
client.ts # FYI External API client
config.ts # Env validation (Zod)
types.ts
tools/
documents.ts
clients.ts
jobs.ts
tasks.ts
cabinets.ts
connection.ts
utils/
response.ts # Summaries + safe errors
Security
- No secrets in source or logs
- Fail-fast on missing
FYI_ACCESS_ID/FYI_ACCESS_SECRET/MCP_API_KEY /mcpprotected by shared API key only (no OAuth)- Read-only tools for v1
- Sensitive keys redacted from tool output
Out of scope (v1)
OAuth, write/upsert operations, binary document download, custom domain, persistent storage.
License
Private / unlicensed unless stated otherwise.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。