@twofutures/minima-mcp
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-alpha.2 • Public • Published

Minima TypeScript MCP Server

It is generated with Stainless.

Installation

Direct invocation

You can run the MCP Server directly via npx:

export MINIMA_API_KEY="My API Key"
npx -y @twofutures/minima-mcp

Via MCP Client

There is a partial list of existing clients at modelcontextprotocol.io. If you already have a client, consult their documentation to install the MCP server.

For clients with a configuration JSON, it might look something like this:

{
  "mcpServers": {
    "twofutures_minima_sdk_ts_api": {
      "command": "npx",
      "args": ["-y", "@twofutures/minima-mcp", "--client=claude"],
      "env": {
        "MINIMA_API_KEY": "My API Key"
      }
    }
  }
}

Filtering tools

You can run the package on the command line to discover and filter the set of tools that are exposed by the MCP Server. This can be helpful for large APIs where including all endpoints at once is too much for your AI's context window.

You can filter by multiple aspects:

  • --tool includes a specific tool by name
  • --resource includes all tools under a specific resource, and can have wildcards, e.g. my.resource*
  • --operation includes just read (get/list) or just write operations

See more information with --help.

All of these command-line options can be repeated, combined together, and have corresponding exclusion versions (e.g. --no-tool).

Use --list to see the list of available tools, or see below.

Specifying the MCP Client

Different clients have varying abilities to handle arbitrary tools and schemas.

You can specify the client you are using with the --client argument, and the MCP server will automatically serve tools and schemas that are more compatible with that client.

  • --client=<type>: Set all capabilities based on a known MCP client

    • Valid values: openai-agents, claude, claude-code, cursor
    • Example: --client=cursor

Additionally, if you have a client not on the above list, or the client has gotten better over time, you can manually enable or disable certain capabilities:

  • --capability=<name>: Specify individual client capabilities
    • Available capabilities:
      • top-level-unions: Enable support for top-level unions in tool schemas
      • valid-json: Enable JSON string parsing for arguments
      • refs: Enable support for $ref pointers in schemas
      • unions: Enable support for union types (anyOf) in schemas
      • formats: Enable support for format validations in schemas (e.g. date-time, email)
      • tool-name-length=N: Set maximum tool name length to N characters
    • Example: --capability=top-level-unions --capability=tool-name-length=40
    • Example: --capability=top-level-unions,tool-name-length=40

Examples

  1. Filter for read operations on cards:
--resource=cards --operation=read
  1. Exclude specific tools while including others:
--resource=cards --no-tool=create_cards
  1. Configure for Cursor client with custom max tool name length:
--client=cursor --capability=tool-name-length=40
  1. Complex filtering with multiple criteria:
--resource=cards,accounts --operation=read --tag=kyc --no-tool=create_cards

Importing the tools and server individually

// Import the server, generated endpoints, or the init function
import { server, endpoints, init } from "@twofutures/minima-mcp/server";

// import a specific tool
import retrieveArticles from "@twofutures/minima-mcp/tools/articles/retrieve-articles";

// initialize the server and all endpoints
init({ server, endpoints });

// manually start server
const transport = new StdioServerTransport();
await server.connect(transport);

// or initialize your own server with specific tools
const myServer = new McpServer(...);

// define your own endpoint
const myCustomEndpoint = {
  tool: {
    name: 'my_custom_tool',
    description: 'My custom tool',
    inputSchema: zodToJsonSchema(z.object({ a_property: z.string() })),
  },
  handler: async (client: client, args: any) => {
    return { myResponse: 'Hello world!' };
  })
};

// initialize the server with your custom endpoints
init({ server: myServer, endpoints: [retrieveArticles, myCustomEndpoint] });

Available Tools

The following tools are available in this MCP server.

Resource articles:

  • retrieve_articles (read):
  • list_articles (read):

Resource entities:

  • create_entities (write):
  • update_entities (write):
  • list_entities (read):

Resource relationships:

  • create_relationships (write):
  • list_relationships (read):

Readme

Keywords

none

Package Sidebar

Install

npm i @twofutures/minima-mcp

Weekly Downloads

2

Version

0.0.1-alpha.2

License

Apache-2.0

Unpacked Size

421 kB

Total Files

149

Last publish

Collaborators

  • timhanlon