MCP Server Kalshi
This is an MCP server for the Kalshi REST API
Configuration
Claude Desktop
Setting up with UVX
"mcpServers": {
"kalshi": {
"command": "uvx",
"args": ["mcp-server-kalshi"],
"env": {
"KALSHI_PRIVATE_KEY_PATH": "PATH TO YOUR RSA KEY FILE",
"KALSHI_API_KEY": "<YOUR KALSHI API KEY>",
"BASE_URL": "https://api.elections.kalshi.com"
}
}
}
Setting up with Docker
-
Build the container from root directory
docker build -t mcp-server-kalshi . -
Configure client to run the container (ensure the bind command gives the container access to your rsa key files)
"mcpServers": {
"kalshi": {
"command": "docker",
"args": ["run", "--rm", "-i", "--mount", "type=bind,src=/Users/username,dst=/Users/username", "-e", "KALSHI_PRIVATE_KEY_PATH", "-e", "KALSHI_API_KEY","-e", "BASE_URL", "mcp-server-kalshi"],
"env": {
"KALSHI_PRIVATE_KEY_PATH": "PATH TO YOUR RSA KEY FILE",
"KALSHI_API_KEY": "<YOUR KALSHI API KEY>",
"BASE_URL": "https://api.elections.kalshi.com"
}
}
}
Local Development
-
Create a
.envfile in the root directory with the following variablesBASE_URLThe kalshi API URLKALSHI_API_KEYThe API key for the corresponding environmentKALSHI_PRIVATE_KEY_PATHA filepath to a file containing your Kalshi RSA private key
-
Install deps via
uv pip install -e .Dev deps can be installed withuv pip install -e .[dev] -
Run with
uv run start
Getting Kalshi API Creds
To get Kalshi API creds, follow the instrictions here
Getting a Test Account
You may want to run the server against a kalshi demo account. To get an account, follow the instructions here
Then, set BASE_URL=https://demo-api.kalshi.co for this MCP server and update your KALSHI_API_KEY and KALSHI_PRIVATE_KEY_PATH to point towards credentials generated in the testing environment
UVX
To run in MCP inspector
npx @modelcontextprotocol/inspector uv --directory /path/to/your/mcp-server-kalshi run start
To run in claud desktop, update your MCP config to:
{
"mcpServers": {
"kalshi": {
"command": "uv",
"args": [
"--directory",
"/<path to repo root directory>",
"run",
"start"
],
"env": {
"KALSHI_PRIVATE_KEY_PATH": "PATH TO YOUR RSA KEY FILE",
"KALSHI_API_KEY": "<YOUR KALSHI API KEY>",
"BASE_URL": "https://api.elections.kalshi.com"
}
}
}
}
Metadata
Release files for iflow-mcp_9crusher_mcp-server-kalshi 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| iflow_mcp_9crusher_mcp_server_kalshi-0.1.6.tar.gz | 10.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| iflow_mcp_9crusher_mcp_server_kalshi-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.3 kB
Release files / iflow_mcp_9crusher_mcp_server_kalshi-0.1.6.tar.gz
| Download URL | iflow_mcp_9crusher_mcp_server_kalshi-0.1.6.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ecbd0f053fb532581ff1c6165e44623e84bb21588568fe864de2ec2be56c2113
|
|
BLAKE2b-256 checksum How to use checksums |
1f188810bc38755c6ba4c8f4808f526ff092329a6fa003d989cf8a31b1c5b4f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / iflow_mcp_9crusher_mcp_server_kalshi-0.1.6-py3-none-any.whl
| Download URL | iflow_mcp_9crusher_mcp_server_kalshi-0.1.6-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
759373e2ea2db6cc54faf15e2afaed31de8126af598892748e949ab63040588c
|
|
BLAKE2b-256 checksum How to use checksums |
695e88648ef1e070888fc06a10fe94d323023ed7629f2b0fdadc9fcd1d74f2b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|