Model Context Protocol Server¶
The Model Context Protocol (MCP)1 is an open standard that lets Artificial Intelligence (AI) assistants call external tools. The Mat3ra MCP server exposes the platform through this standard, so that an assistant such as Claude Code, Cursor or Visual Studio Code can find a material, set up a simulation job, submit it and read its results on behalf of the user.
The server is hosted by Mat3ra at the address below. No installation is required: an MCP client and a Mat3ra account are sufficient.
1 | |
1. Capabilities¶
The tools below are available at the time of writing. The server itself is the authority on the current list, which every MCP client retrieves when it connects.
| Tool | Description | Sign-in |
|---|---|---|
get_material |
Returns a material from Standata2 by name, formula or identifier, for example nickel or GaAs. |
Not required |
get_workflows |
Lists the Standata workflows that match a query, for example total_energy for the espresso application. |
Not required |
save_material |
Saves a Standata material to the account, or reuses an identical one that is already there. | Required |
create_job |
Creates a job from saved materials and a workflow, with the cluster, queue and number of processors. | Required |
submit_job |
Submits a job to its cluster queue. | Required |
job_status |
Returns the status of a job and its compute errors, if any. | Required |
get_property |
Returns a stored property of a finished job, for example total_energy. |
Required |
Jobs created through the server are regular jobs of the account: they appear in the web interface, and they are charged in the same way as jobs created there.
2. Authentication¶
The server holds no login of its own. Each request carries the credentials of its caller, the server passes them to the platform for the duration of that request, and stores nothing. Two forms of credentials are accepted.
2.1. API token¶
An API token is generated under Account Preferences. It consists of an account identifier and a token, the same pair that the REST API uses, sent as two request headers:
1 2 | |
This form is recommended for an MCP client that is configured once and used over time, because an API token stays valid until it is deleted.
2.2. Access token¶
The access token of a browser sign-in, as used by the API client and the API examples, is accepted in the Authorization header:
1 | |
An access token expires, and the server does not renew it. When both forms are present in a request, the access token is used.
Clients without custom headers
A client that cannot send custom request headers cannot sign in. This currently applies to connectors added in the Claude web application. Such a client can still call the tools that require no sign-in.
3. Connect a client¶
Any MCP client that supports the HTTP transport and custom request headers can connect. In the examples below, ACCOUNT_ID and AUTH_TOKEN stand for the two values of an API token.
3.1. Claude Code¶
The server is added with one command:
1 2 3 | |
Alternatively, the server is declared in the .mcp.json file of a project. The values are read from environment variables, so that the file can be shared without the token:
1 2 3 4 5 6 7 8 9 10 11 12 | |
3.2. Cursor¶
The server is declared in ~/.cursor/mcp.json, or in .cursor/mcp.json inside a project:
1 2 3 4 5 6 7 8 9 10 11 | |
3.3. Visual Studio Code¶
The server is declared in .vscode/mcp.json inside a workspace:
1 2 3 4 5 6 7 8 9 10 11 12 | |
3.4. Without a client¶
Each tool call is one HTTP request, so the server can be called from a command line terminal. The first command lists the tools, and the second one calls job_status for a job:
1 2 3 4 | |
1 2 3 4 5 6 | |
The same lines, with the order in which the tools are called, are available as plain text at https://mcp.mat3ra.com/llms.txt.
4. Example¶
With the server connected, a calculation is requested in plain language, for example:
1 | |
The assistant then calls the tools in the following order.
save_materialwith the querysiliconsaves the Standata silicon structure to the account and returns its identifier.get_workflowswith the querytotal_energyand the applicationespressoreturns the workflow name,Total Energy.create_jobcreates the job from the material and the workflow, and returns the job identifier and the address of its page in the web interface.submit_jobsubmits the job to the queue.job_statusreports the status until it isfinished.get_propertywith the propertytotal_energyreturns the value and its units.
The assistant is instructed to show the job settings and the page address before it submits the job, so that the user can review them first.
5. Troubleshooting¶
The messages below are returned by a tool call when the credentials are missing or not accepted.
| Message | Cause |
|---|---|
| "Set the X-Account-Id and X-Auth-Token headers, or an Authorization: Bearer header" | The request carries no credentials, or only one of the two API token headers. |
| "Error 401: You must be logged in to do this." | The API token was deleted, the account identifier does not belong to the token, or the access token expired. |
The first call after a period without requests can take several seconds, because the server is started on demand.