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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.