typeship

typeship

Enables MCP clients to invoke every typeship API operation as a tool, with spec-derived input schemas, argument validation, read-only mode, and selective tool exposure.

Category
访问服务器

README

typeship-ax

TypeScript SDK, CLI, and MCP server for typeship. API reference

Generated from the OpenAPI spec by typeship. Change the spec or generation settings, then regenerate; generated files are not hand-edited.

  • Zero runtime dependencies — built on the platform fetch (Node 18+, browsers, edge runtimes)
  • Typed error unions — every call returns ApiResult<T, E> where E lists each documented error for that exact operation
  • Auto-paginationfor await any list call to stream every item across every page
  • Retries built in — idempotent requests retry with exponential backoff and Retry-After support
  • Optional runtime validationvalidate: true schema-checks request and response bodies against the spec, still zero dependencies
  • Tree-shakeable SDK — per-resource modules, sideEffects: false
  • Spec-native CLI — every operation is a command with typed flags, stable JSON, help, and exit codes
  • Agent-ready MCP — schema-derived tools, argument validation, read-only mode, and bounded results

Install

npm install typeship-ax

TypeScript SDK

import { TypeshipClient } from "typeship-ax";

const client = new TypeshipClient({ bearerToken: process.env.TYPESHIP_TOKEN! });

for await (const item of client.projects.list()) {
  console.log(item);
}

Authentication

  • Bearer tokenbearerToken (a string, or a callback for tokens that expire), sent as Authorization: Bearer <token>.

defaultHeaders adds headers to every request (API version headers, tenant ids); onRequest can rewrite any request before it is sent.

Error handling

Awaiting a call returns a discriminated result instead of throwing on request errors. The error side is a union of the documented error classes for that operation:

import { BadRequestError } from "typeship-ax";

const result = await client.projects.list();

if (!result.ok) {
  if (result.error instanceof BadRequestError) {
    // result.error.body is fully typed for this status
  }
  throw result.error; // every branch is an Error subclass
}

result.data; // typed success payload

Prefer exceptions? unwrap(result) returns the data or throws the typed error.

Pagination

Await a list call to inspect its ApiResult, or iterate it for concise lazy pagination. Async iteration throws the same typed API error if any page fails:

for await (const item of client.projects.list()) {
  // every item from every page, fetched lazily
}

// or page manually:
const page = await client.projects.list();
if (page.ok) {
  page.data.items;
  await page.data.getNextPage();
}

CLI

The package ships typeship, a command for every API operation. It writes JSON to stdout and uses exit codes 0/1/2 for success, request failure, and invalid usage.

npm install -g typeship-ax
typeship login                      # stores a credential (or set TYPESHIP_TOKEN)
typeship projects list
typeship projects list --all | jq -r '.id'   # every page, one item per line
typeship <resource> <command> --help     # flags, types, an example

CLI conventions:

  • Path parameters are positional; query and body fields are flags named after their wire fields.
  • Arrays accept a comma list or repeated flags. Objects accept JSON; --data @file and --data - read a full body.
  • --fields id,name projects results. --all streams paginated results as NDJSON.
  • Destructive commands require confirmation or --force. Piped errors are stable JSON on stderr.

Auth: typeship login stores a credential under ~/.config/typeship/; the environment (TYPESHIP_TOKEN) and flags (--token) win over it. TYPESHIP_BASE_URL / --base-url pick the endpoint.

Useful commands:

  • typeship init configures credentials, MCP clients, and repository agent instructions.
  • typeship mcp install --all registers the MCP server with supported agent clients.
  • typeship docs search <term>, typeship doctor, and typeship help --json cover discovery and diagnostics.

MCP server

A zero-dependency stdio server exposing every operation as a tool. The fastest setup is typeship mcp install --all. For a manual MCP client configuration:

{
  "mcpServers": {
    "typeship": {
      "command": "npx",
      "args": [
        "-y",
        "--package",
        "typeship-ax",
        "typeship-mcp"
      ]
    }
  }
}

Tool input schemas are derived from the OpenAPI spec, so agents see real parameter types and required fields. Arguments are checked before anything reaches the API (unknown or mistyped ones come back as one isError result, nothing is dropped), every tool takes fields to keep only the result keys it needs, and errors carry a stable code and next_steps.

Add --read-only to args (or set TYPESHIP_MCP_READ_ONLY=1) for a server that cannot write, --tools accounts,reports (or TYPESHIP_MCP_TOOLS) to expose a subset, and TYPESHIP_MCP_MAX_RESULT_CHARS to change the result size cap (64,000). typeship mcp install --all --read-only writes read-only entries for every detected client.

SDK configuration

new TypeshipClient({
  baseUrl: "https://typeship.dev/api/v1", // default
  timeoutMs: 30_000, // per attempt
  maxRetries: 2,     // retryable failures only
  fetch: globalThis.fetch, // or your own: proxies, tests, instrumentation
});

Per-call overrides ride on the last argument: { timeoutMs, maxRetries, headers, signal }.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选