Skip to main content
Enoki tests MCP servers for security weaknesses. Register one you own or are authorized to test, ideally a staging or test deployment, in one of three ways:
  • In the Enoki app: at app.enokilabs.ai/inventory, choose Add integration, then MCP server. Enter its address and how it signs in, add its key or client secret if it needs one, and Enoki tests the server before it saves it. A server behind your identity provider is added here, as in A server behind your identity provider.
  • From your coding agent, over the Enoki MCP server, as below. A key the server needs is added in the Enoki app, never in the chat.
  • From CI, over the REST API, as in From CI over the REST API.

From your coding agent

Your coding agent, connected to the Enoki MCP server, registers a server with create_target: a name, the environment it runs in, and an mcp object in place of config. The object says where the server is and how it checks who is calling. It never holds a key:
What create_target can’t register:
  • A server that signs in with OAuth. One whose sign-in server issues client credentials is added in the Enoki app, as in A server behind your identity provider. Sign-in through a browser, where a person approves access, isn’t offered. A server that also accepts a personal token can be registered with sign_in token.
  • A server that runs as a local command (stdio). Enoki connects to MCP servers over the network, so the server needs a public streamable HTTP or SSE address first.
  • A server whose address carries its key, as a user name and password before the host or as a query parameter named like a key. Add it in the Enoki app instead: Add integration, then MCP server. Do the same for a server whose key is part of its path, which Enoki can’t tell apart from any other path, rather than handing that address to your agent.

A server without sign-in

create_target tests the server and saves it in the same call, as it does an agent, and returns status created with the server’s model_id. If the server turns out to ask for sign-in, the call doesn’t fail: it carries on as below, with token as the starting choice, which can be switched to a named header on the page. A server that asks for sign-in through a browser is refused instead; add it in the Enoki app if its sign-in server issues client credentials. So is one that answers with an error rather than asking for sign-in, as some servers do without their key: unless the error is a 404 or 405, the refusal suggests calling again with sign_in token or header.

A server that signs in

create_target takes no keys, tokens or passwords, so a server that signs in isn’t saved in the call. Enoki first checks the address without a key, so an address it can’t reach, one that redirects, or one that answers 404 or 405 (often a wrong path or transport) is caught before anyone fetches a key. A server that asks for sign-in before anything else is fully checked only once its key is added on the page. The call then returns status awaiting_user with:
1

Your agent shows you the link

It shows you finish_url and stops there, handing the turn back to you rather than checking in a loop.
2

Open it signed in to Enoki

To an owner or admin, the page shows the server’s name, environment, address and transport, which can’t be changed there, and the key or app that asked for it. A member is asked to send the link to an owner or admin instead. A request made with a workspace key says so: if you didn’t start it, click Cancel this request.
3

Confirm the host, then add the key

Tick I own or am authorized to test the server’s host. The key field stays closed until you do, and Enoki sends the key only to that host. Choose whether the server takes it as a bearer token or in a named header, paste the key, and click Test connection. When the test passes, click Continue, check the server and what it offers, and click Yes, add this server. The key is stored encrypted and never shown to your agent. If the test says Answered, but not as an MCP server, check the address and transport your agent gave, which can’t be changed on the page. If either is wrong, click Cancel this request and ask your agent to register the server again.
4

Tell your agent you're done

Your agent calls get_pending_target once with the pending_target_id. It reads created with the server’s model_id, and the server shows in list_targets.
Keys stay out of the chat. Don’t paste an MCP server’s key into your agent’s chat, and don’t ask your agent to read it from your clipboard: whatever the agent reads lands in the conversation’s transcript and with its model provider. The key goes only into the page finish_url opens. If one did end up in a chat, finish on the page anyway and rotate the key.

Who finishes a pending target

Any owner or admin of the workspace finishes it, signed in to Enoki; the link alone lets nobody finish. A member who isn’t an owner or admin is told it takes one, and can copy the link to send to one. If the key your agent connected with is revoked, or the app is disconnected, it can’t be finished any more: ask your agent to start again, or add the server in the Enoki app.

Checking the outcome

get_pending_target returns one of four statuses: Check once, when you’re done, rather than in a loop. An agent that can wait in the background, such as Claude Code, may instead check every 30 to 60 seconds until expires_at. If nobody comes back to the agent, list_targets shows the server once it’s saved. A day after expires_at, the pending target is deleted, whatever became of it, and checking it returns not-found.

A server behind your identity provider

A server that accepts only tokens from your identity provider, such as Microsoft Entra ID, Okta or Auth0, is added in the Enoki app: Add integration, then MCP server, choosing under Authentication:
  • OAuth 2.0 (client credentials), for any provider that issues tokens to an application: the token endpoint, the client ID, the client secret, and the scope or audience your provider expects.
  • Microsoft Entra ID (OAuth): the directory (tenant) ID, the application (client) ID, the client secret, and the scope, which ends in /.default.
Enoki fetches a token with these for the connection test and for every assessment, and renews it before it expires, so a long run never stops on an expired token. The client secret is stored encrypted, never returned, and sent only to the token endpoint; the server receives the token. Changing the server’s address, the token endpoint, the scope or any other of these settings asks for the client secret again. Sign-in through a browser, where a person approves access, isn’t offered. Neither option can be set from your coding agent or over the REST API.

From CI over the REST API

With nobody to open a link, as in a CI pipeline, register the server over the REST API instead. POST /api/v1/model takes the same address in an mcp object (endpoint_url, transport, and api_key_header for a key in a named header, X-API-Key if left out), how the server signs in as auth_type (none, bearer or api_key), and the server’s key as credential, which is stored encrypted and never returned. The Enoki API key needs the write scope. Both keys come from your CI’s secret store as environment variables, so neither is typed into a chat:
jq reads the server’s key from the environment, so it never appears on a command line or in your shell history. For a server that takes a token as Authorization: Bearer, set auth_type to bearer and leave out api_key_header; for one without sign-in, auth_type is none and there is no credential. The call tests the server and saves it only if the test passes, returning 201 with {"model_id": "…", "connected": true}. An address refused before any test is a 400, and a failed test a 422 whose detail carries the error_category; see Troubleshooting.

Run an assessment of the server

With the server’s model_id, call trigger_assessment. An MCP server’s run always covers all of its categories, so it takes no categories. Poll get_assessment_status until status is no longer running, then read what it found with list_findings (filter by run_id or model_id) and get_finding. Once you’ve fixed a finding, run a new assessment to confirm it: validate_fix doesn’t re-test an MCP server’s findings yet. A trial workspace can register MCP servers, but assessing one isn’t part of the trial: create_target, and get_pending_target once the server is saved, say so in their message, and trigger_assessment refuses the run.