MCP Shipyard
← Guides

Build a remote MCP server for finance data: tools, auth and review-ready metadata

Design a remote MCP server for finance data: quote and history tools, auth, a TypeScript example and checks, with no trading tools.

finance-datatoolsauthsubmissionleaderboardtypescript

Build a remote MCP server for finance data

Short answer: a finance data server needs read-only quote, history and profile tools, no authentication for public market data, structured numbers with units and timing, and no tool that trades or moves money.

Basis: the MCP specification, the official TypeScript SDK docs (v2, package @modelcontextprotocol/server, read 2026-12-04) and our scanner rule pages. Tool sets are our recommendation, not a requirement. Anything marked (unverified) is not confirmed in those sources.

Be exact about identifiers and timing in every description.

get_quote

  • Title: Get a quote
  • Description: see the example below.
  • Input: symbol string, required (ticker, not company name); exchange string, optional MIC code
  • Annotations: readOnlyHint true, destructiveHint false, openWorldHint false

get_price_history

  • Title: Get price history
  • Description: "Use this for daily closing prices of one security over a date range, up to 365 days. Returns date, open, high, low, close and volume in the listing currency."
  • Input: symbol string, required; from and to strings, YYYY-MM-DD
  • Annotations: readOnlyHint true, destructiveHint false, openWorldHint false

get_company_profile

  • Title: Get company profile
  • Description: "Use this for the sector, country and listing details of one company by ticker."
  • Input: symbol string, required
  • Annotations: readOnlyHint true, destructiveHint false, openWorldHint false

convert_currency

  • Title: Convert currency
  • Description: "Use this to convert an amount between two ISO 4217 currencies at the latest reference rate. It only calculates; it does not move money."
  • Input: amount number, required; from and to strings, 3 letters
  • Annotations: readOnlyHint true, destructiveHint false, openWorldHint false

Annotations are hints, not security (see annotations explained). Here openWorldHint is true only where a tool reaches arbitrary outside parties, and false for a fixed domain. Market data is a fixed domain, so openWorldHint is false.

Auth

Recommendation: no authentication. This is public read-only data, which the checks accept. Hold any upstream key on your server so no user ever types one (schema.secret-param). Add no write tools to a no-auth server, because auth.write-tools-unauthenticated warns when it lists create, update or delete tools. Without sign-in your protection is rate limiting and bounded results; see rate limits and 429s.

Transport

Serve Streamable HTTP on one HTTPS path such as https://mcp.example.com/mcp (auth.https). In the v2 SDK, createMcpHandler(factory) builds a fresh McpServer for every request, so the endpoint is stateless and needs no sticky sessions (sessions and serverless). The handler checks no Host, Origin or token itself, so put those checks in front of it. Still on SSE? See the migration guide. Keep the handshake fast (latency.handshake).

Minimal TypeScript example

This targets SDK v2; coming from v1, use the SDK's migration guide. In v2 inputSchema is a z.object(...). Replace lookup with your own code.

import { createMcpHandler, McpServer } from '@modelcontextprotocol/server';
import * as z from 'zod/v4';

const handler = createMcpHandler(() => {
  const server = new McpServer({ name: 'acme-markets', version: '1.0.0' });
  server.registerTool(
    'get_quote',
    {
      title: "Get a quote",
      description:
        "Use this for the latest price of one listed security by ticker symbol. Returns price, currency, change and the quote time; prices are delayed by 15 minutes. Does not place orders or give advice.",
      inputSchema: z.object({
        symbol: z.string().describe('Ticker symbol, for example ACME'),
        exchange: z.string().optional()
      }),
      annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false }
    },
    async (args) => {
      const result = await lookup(args); // your upstream call
      if (!result) return { isError: true, content: [{ type: 'text', text: 'Unknown symbol. Pass a ticker such as ACME, not a company name.' }] };
      return { content: [{ type: 'text', text: JSON.stringify(result) }] };
    }
  );
  return server;
});

export default handler; // web-standard runtimes; wrap with toNodeHandler on Node

Say "delayed" or "real-time" in the description and in the result, and return the currency.

Errors, size and speed

Return isError: true with text that says what was wrong and how to fix it; messages such as "Internal Server Error" fail review (errors.unhelpful-message). Reviewers run every tool with valid input and reject failures (errors.fixture-failed). Keep a call under 3 seconds where you can: the scanner warns above 3 and fails above 15 (latency.tool-call). For slower work see tool timeouts, cap result size (response size limits) and never echo keys or tokens in output (errors.secrets-in-output). Run the same calls in CI so a regression never reaches review.

Getting models to pick your tools

The leaderboard method shows the model every tool in the category as a function named <server>__<tool>, with your description and input schema, and records the first tool it calls. Your name, description and schema are the whole pitch. In the December 4 2026 run, 1.9% (2 of 108) of finance data trials ended with no tool called. Finance prompts name tickers, currencies and dates. Mirror that in the schema: enums and patterns for symbols and ISO codes, and an example in each parameter description. State timing (delayed or real-time) and coverage (exchanges, history depth) in the description so the model can match requests like "yesterday's close". Do not mention plans or limits there. Limits apply: the harness is offline, uses one model family, and measures selection, not correct answers. Rewrite method and prompt sets are in writing tool descriptions models pick; write about your own task and sibling tools, never about other servers (desc.injection-directive).

Pitfalls our rules catch

Submission checklist

Check your server against these rules at https://mcpshipyard.com/scan.

Check your server against these rules

Scan runs the checks from this guide against a live URL and lists each failing rule with its fix.

Scan a server