Task tutorial
Verify a local MCP SMILES tool over stdio
Start the local MCP server, send a legacy JSON-RPC handshake and parse request, and inspect the structured result without a hosted endpoint.
You will make
A proven local stdio response for benzene before registering the command in an MCP client.
Steps
- Clone the source repository and enter its directory.
- Send the three newline-delimited JSON-RPC messages shown to the local stdio server.
- Confirm valid=true, atoms=6, bonds=6, and mol_weight=78.114 in the response.
- Only then register cargo run -p chematic-mcp --release --quiet in your MCP client configuration.
git clone https://github.com/kent-tokyo/chematic.git
cd chematic
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}' \
'{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"parse_smiles","arguments":{"smiles":"c1ccccc1"}}}' \
| cargo run -p chematic-mcp --release --quietExpected result
The final JSON-RPC response contains a text payload with valid=true, atoms=6, bonds=6, mol_weight=78.114, and the canonical input SMILES.
If it does not work
This is a local stdio server, not a remote URL. If no response appears, check the working directory and make sure the client or shell is not adding interactive prompts to the server command.