-
Notifications
You must be signed in to change notification settings - Fork 79
SPADE MCP Interface
This document describes SPADE's MCP capabilities and shows how the MCP server can be used with Claude Code and Claude Desktop. The MCP server exposes SPADE's query and control capabilities as tools that can be used by MCP-compatible clients. Two transports are supported: HTTP, for Claude Code and other remote clients, and stdio, for Claude Desktop and other local process-based clients.
Once connected, a client has access to four tools for SPADE control, query, control documentation, and query documentation.
SPADE must be started before the MCP server can be used, since the MCP tools operate by controlling and querying a running instance.
bin/spade start
See Starting and controlling SPADE for details on how to start and stop SPADE.
Start the SPADE server, as described above.
Start the MCP server in HTTP mode:
bin/spade mcp -- \
mcp.server.mode=http \
mcp.http.host.name=localhost \
mcp.http.host.port=3000 \
mcp.http.host.endpoint=/mcp
The server will listen at http://localhost:3000/mcp. These settings can also be placed in cfg/spade.utility.mcp.server.Main.config instead of being passed on the command line; arguments given on the command line take precedence.
Register the server with Claude Code and start a session:
claude mcp add --transport http spade http://localhost:3000/mcp
claude
The SPADE tools will be available in the session. For example, ask:
What SPADE tools do you have available?
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) and add the spade server under mcpServers, replacing /path/to/spade with the absolute path to the SPADE installation:
{
"mcpServers": {
"spade": {
"command": "/path/to/spade/bin/spade",
"args": [
"mcp",
"mcp.server.mode=stdio"
]
}
}
}
Start the SPADE server, as described above.
Launching the Claude Desktop app will spawn the MCP server process automatically using this configuration, and the SPADE tools will be available in the conversation.
This material is based upon work supported by the National Science Foundation under Grants OCI-0722068, IIS-1116414, and ACI-1547467. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
- Setting up SPADE
- Storing provenance
-
Collecting provenance
- Across the operating system
- Limiting collection to a part of the filesystem
- From an external application
- With compile-time instrumentation
- Using the reporting API
- Of transactions in the Bitcoin blockchain
- Filtering provenance
- Viewing provenance
-
Querying SPADE
- Illustrative example
- Transforming query responses
- Protecting query responses
- Miscellaneous