SuperAPI AI Directory

jev-decision-mcp

TypeSafe Jev typed decisions through one batched tool: classification, rubric scores and yes/no probabilities.

Open website

About this tool

Purpose

jev-decision-mcp is a local stdio MCP server that exposes a single tool, jev_decide, through the official TypeSafe API for making typed decisions. It is aimed at scenarios that require batch processing of independent judgment questions, such as classification, scoring, yes/no probability judgments, and so on. The project is developed by amidabuddha and is an independent community project with no affiliation with TypeSafe, released under the MIT license.

Main capabilities

  • Submit independent questions based on the same context in a single call, with answers retaining their respective question IDs.
  • Support multiple decision types: classification choices (choice), yes/no judgments (noul), rubric scores, and so on.
  • Return the model, answers, and token usage, both as MCP structured content and as JSON text.
  • The caller retains control over thresholds, escalation, and action execution.
  • The project includes the example file examples/decision.json, demonstrating how to combine team selection, refund yes/no judgment, and urgency scoring.

How to use

Environment requirements

  • Node.js 22 or later, with npm available in PATH.
  • An MCP client that supports local stdio servers.
  • An API key from the TypeSafe Console; the official TypeSafe key must be used, and OpenRouter and third-party gateway keys are not supported.

Install via npm

The npm package contains the built server. On first use, npx will download and run it, with no need to clone or build. Add the corresponding configuration in the MCP client configuration, and replace YOUR_TYPESAFE_API_KEY with your key. For clients that use the mcpServers JSON, the configuration is as follows (for the specific JSON structure, please refer to the official documentation). You can also set TYPESAFE_API_KEY in the environment where the client is started and omit the env configuration (provided that the client forwards that variable). After saving the configuration, restart or reload the client's MCP server, and the tool will appear as jev_decide.

If the host cannot resolve npx, please use the launcher specific to that host platform or absolutelyCorrect path. A GUI application's PATH may differ from the terminal's.

The server communicates over stdio; starting it in a terminal will make it wait for an MCP client to connect, and it will not open a web page. An npm install does not read the .env file in the caller's working directory.

To install the executable globally, you can use the npm install -g command (for the specific command, refer to the official documentation), then in the MCP client use "command": "jev-decision-mcp" with no arguments and provide the same API key.

Install via Glama

Open Jev Decision MCP on Glama to view its README, tool architecture, and source code. For local installation, use the npm configuration above, or follow the GitHub Repository link in the listing to download or clone the source code and build it yourself. Glama lists it as a local stdio server; the listing URL is not an MCP connection endpoint.

Connect to Codex

For the npm package, merge the corresponding configuration into Codex's config.toml. Set TYPESAFE_API_KEY in the environment where Codex is started; env_vars will forward the existing value to the server. Keep the host tool timeout longer than JEV_TIMEOUT_MS / 1000. See the official Codex MCP configuration documentation for details.

Build from source

  1. Clone the repository, install dependencies, and compile the server.
  2. You can also download the repository on GitHub using Code → Download ZIP, extract it, and run npm ci and npm run build in the directory.
  3. In that directory, copy .env.example to .env and set TYPESAFE_API_KEY, or provide the key through the MCP client's environment. A source build will read that .env regardless of the working directory; existing environment variables take precedence. Restart the server after changes. The .env is excluded from Git.
  4. Configure the MCP client to run the built entry point. Replace the placeholder with the absolute path of the checkout directory. Windows paths can use forward slashes, for example C:/projects/jev-decision-mcp/dist/index.js. IfIf node is not in the client's PATH, use the absolute path to the Node executable.
  5. For Codex, use the same command and arguments as in the TOML example above. Only keep env_vars when the key is provided via the Codex environment rather than .env.
  6. To verify the build, run npm run check (type checking and tests that mock API responses; TypeSafe is not called). Use npm run dev for local development, and use npm run build to rebuild after source code changes, then restart the MCP client.

Environment Variables

Set the following variables in the MCP client's server environment, or in .env for source builds. Keep client tool timeouts longer than JEV_TIMEOUT_MS / 1000 seconds. jev-latest follows TypeSafe model updates; for repeatable evaluations, set a specific supported model version.

The server can also start without a key so that clients can discover tools, but decision calls will return MISSING_API_KEY. Statuses and issues are sent to the official TypeSafe API, which may incur API charges. TYPESAFE_BASE_URL does not override the API endpoint. The server does not persist inputs or decisions, and does not expose upstream error response bodies.

Invocation Example

Call jev_decide with the JSON in examples/decision.json. It combines team selection, a refund yes/no judgment, and an urgency score. A smaller example is below (refer to the official documentation for the specific JSON structure).

The response contains model, answers, and usage, both as MCP structured content and as JSON text. Jev may round probabilities to two decimal places, so their sum may deviate slightly from 1. The server allows for the corresponding rounding error (at most 0.005 per option) and preserves the returned values without normalizing them. Choice supports 1–255 named options. Instructions and descriptions can be strings, JSON objects, or arrays; choice descriptions can also be null. Noul accepts optional criteria.true and criteria.false descriptions.

Important Notes

  • Please explicitly provide the relevant facts, source text, and policy: Jev cannot see the caller's conversation or local files. Write complete judgments in instructions; IDs are used only as response keys. Include a no-match option when appropriate. Questions in the same batch cannot see each other's answers.
  • noul close to 0.5 indicates uncertainty about yes/no, not moderate strength.
  • Confidence does not authorize any action and does not guarantee correctness; evaluate thresholds on representative data.

Troubleshooting

If the tool does not appear after updating, restart the server and open a new client session. The configured server is named jev; its tool is jev_decide.

Service/configuration failures are MCP tool errors (isError: true), never fabricated decisions. Error codes include MISSING_API_KEY, INVALID_INPUT, INVALID_RESPONSE, API_ERROR, CONNECTION_ERROR, TIMEOUT, and CANCELLED. Invalid arguments may also be rejected directly by the MCP SDK.

Applicable Scenarios and Limitations

Suitable for developers who need batch typed decisions via the TypeSafe API, especially in scenarios using an MCP client. Limitations include: an official TypeSafe API key is required, decision calls may incur charges, the server does not persist data, and no web interface is provided.