Conversation
* Add Dockerfile to build Manifold MCP
Docker image
* Update README.md with Docker installation
instructions
Proof of FunctionalityGitHub Container Registry: tiovikram/manifold-mcp-server Pull MCP Server from GitHub Container Registry (ghcr.io): Tag image locally as vsubbiah@Vikrams-MacBook-Pro manifold-mcp-server % docker tag ghcr.io/tiovikram/manifold-mcp-server manifold-mcp-serverRun Docker image locally: vsubbiah@Vikrams-MacBook-Pro manifold-mcp-server % docker run --rm -i -e MANIFOLD_API_KEY="<REDACTED_MANIFOLD_API_KEY>" manifold-mcp-server
Manifold Markets MCP Server running on stdioCall {"jsonrpc":"2.0","method":"tools/list","id":"1"}
{"result":{"tools":[{"name":"create_market","description":"Create a new prediction market","inputSchema":{"type":"object","properties":{"outcomeType":{"type":"string","enum":["BINARY","MULTIPLE_CHOICE","PSEUDO_NUMERIC","POLL","BOUNTIED_QUESTION"],"description":"Type of market to create"},"question":{"type":"string","description":"The headline question for the market"},"description":{"type":"string","description":"Optional description for the market"},"closeTime":{"type":"string","description":"Optional. ISO timestamp when market will close. Defaults to 7 days."},"visibility":{"type":"string","enum":["public","unlisted"],"description":"Optional. Market visibility. Defaults to public."},"initialProb":{"type":"number","description":"Required for BINARY markets. Initial probability (1-99)"},"min":{"type":"number","description":"Required for PSEUDO_NUMERIC markets. Minimum resolvable value"},"max":{"type":"number","description":"Required for PSEUDO_NUMERIC markets. Maximum resolvable value"},"isLogScale":{"type":"boolean","description":"Optional for PSEUDO_NUMERIC markets. If true, increases exponentially"},"initialValue":{"type":"number","description":"Required for PSEUDO_NUMERIC markets. Initial value between min and max"},"answers":{"type":"array","items":{"type":"string"},"description":"Required for MULTIPLE_CHOICE/POLL markets. Array of possible answers"},"addAnswersMode":{"type":"string","enum":["DISABLED","ONLY_CREATOR","ANYONE"],"description":"Optional for MULTIPLE_CHOICE markets. Controls who can add answers"},"shouldAnswersSumToOne":{"type":"boolean","description":"Optional for MULTIPLE_CHOICE markets. Makes probabilities sum to 100%"},"totalBounty":{"type":"number","description":"Required for BOUNTIED_QUESTION markets. Amount of mana for bounty"}},"required":["outcomeType","question"]}},{"name":"search_markets","description":"Search for prediction markets with optional filters","inputSchema":{"type":"object","properties":{"term":{"type":"string","description":"Search query"},"limit":{"type":"number","description":"Max number of results (1-100)"},"filter":{"type":"string","enum":["all","open","closed","resolved"]},"sort":{"type":"string","enum":["newest","score","liquidity"]}}}},{"name":"get_market","description":"Get detailed information about a specific market","inputSchema":{"type":"object","properties":{"marketId":{"type":"string","description":"Market ID"}},"required":["marketId"]}},{"name":"get_user","description":"Get user information by username","inputSchema":{"type":"object","properties":{"username":{"type":"string","description":"Username"}},"required":["username"]}},{"name":"place_bet","description":"Place a bet on a market","inputSchema":{"type":"object","properties":{"marketId":{"type":"string","description":"Market ID"},"amount":{"type":"number","description":"Amount to bet in mana"},"outcome":{"type":"string","enum":["YES","NO"]},"limitProb":{"type":"number","description":"Optional limit order probability (0.01-0.99)"}},"required":["marketId","amount","outcome"]}},{"name":"cancel_bet","description":"Cancel a limit order bet","inputSchema":{"type":"object","properties":{"betId":{"type":"string","description":"Bet ID to cancel"}},"required":["betId"]}},{"name":"sell_shares","description":"Sell shares in a market","inputSchema":{"type":"object","properties":{"marketId":{"type":"string","description":"Market ID"},"outcome":{"type":"string","enum":["YES","NO"],"description":"Which type of shares to sell (defaults to what you have)"},"shares":{"type":"number","description":"How many shares to sell (defaults to all)"}},"required":["marketId"]}},{"name":"add_liquidity","description":"Add mana to market liquidity pool","inputSchema":{"type":"object","properties":{"marketId":{"type":"string","description":"Market ID"},"amount":{"type":"number","description":"Amount of mana to add"}},"required":["marketId","amount"]}},{"name":"get_positions","description":"Get user positions across markets","inputSchema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID"}},"required":["userId"]}},{"name":"unresolve_market","description":"Unresolve a previously resolved market","inputSchema":{"type":"object","properties":{"contractId":{"type":"string","description":"Market ID"},"answerId":{"type":"string","description":"Optional. Answer ID for multiple choice markets"}},"required":["contractId"]}},{"name":"close_market","description":"Close a market for trading","inputSchema":{"type":"object","properties":{"contractId":{"type":"string","description":"Market ID"},"closeTime":{"type":"number","description":"Optional. Unix timestamp in milliseconds when market will close"}},"required":["contractId"]}},{"name":"add_answer","description":"Add a new answer to a multiple choice market","inputSchema":{"type":"object","properties":{"contractId":{"type":"string","description":"Market ID"},"text":{"type":"string","description":"Answer text"}},"required":["contractId","text"]}},{"name":"follow_market","description":"Follow or unfollow a market","inputSchema":{"type":"object","properties":{"contractId":{"type":"string","description":"Market ID"},"follow":{"type":"boolean","description":"True to follow, false to unfollow"}},"required":["contractId","follow"]}},{"name":"add_bounty","description":"Add bounty to a market","inputSchema":{"type":"object","properties":{"contractId":{"type":"string","description":"Market ID"},"amount":{"type":"number","description":"Amount of mana to add as bounty"}},"required":["contractId","amount"]}},{"name":"award_bounty","description":"Award bounty to a comment","inputSchema":{"type":"object","properties":{"contractId":{"type":"string","description":"Market ID"},"commentId":{"type":"string","description":"Comment ID to award bounty to"},"amount":{"type":"number","description":"Amount of bounty to award"}},"required":["contractId","commentId","amount"]}},{"name":"remove_liquidity","description":"Remove liquidity from market pool","inputSchema":{"type":"object","properties":{"contractId":{"type":"string","description":"Market ID"},"amount":{"type":"number","description":"Amount of liquidity to remove"}},"required":["contractId","amount"]}},{"name":"react","description":"React to a market or comment","inputSchema":{"type":"object","properties":{"contentId":{"type":"string","description":"ID of market or comment"},"contentType":{"type":"string","enum":["comment","contract"],"description":"Type of content to react to"},"remove":{"type":"boolean","description":"Optional. True to remove reaction"},"reactionType":{"type":"string","enum":["like","dislike"],"description":"Type of reaction"}},"required":["contentId","contentType"]}},{"name":"send_mana","description":"Send mana to other users","inputSchema":{"type":"object","properties":{"toIds":{"type":"array","items":{"type":"string"},"description":"Array of user IDs to send mana to"},"amount":{"type":"number","description":"Amount of mana to send (min 10)"},"message":{"type":"string","description":"Optional message to include"}},"required":["toIds","amount"]}}]},"jsonrpc":"2.0","id":"1"}Call {"jsonrpc":"2.0","method":"tools/call","params":{"name":"search_markets","arguments":{"term":"Austin Chen Girlfriend"}},"id":"1"}
{"result":{"content":[{"type":"text","text":"[\n {\n \"id\": \"AOEtPSf5StcLYbiVdKYu\",\n \"creatorId\": \"0k1suGSJKVUnHbCPEhHNpgZPkUP2\",\n \"creatorUsername\": \"Sinclair\",\n \"creatorName\": \"SIN\",\n \"createdTime\": 1645150393784,\n \"creatorAvatarUrl\": \"https://firebasestorage.googleapis.com/v0/b/mantic-markets.appspot.com/o/user-images%2FSinclair%2FnqwRUN7PPp.png?alt=media&token=fbac2b1c-8efe-4adc-805f-2c822e6eeb32\",\n \"closeTime\": 1665281737552,\n \"question\": \"Will Austin Chen get a girlfriend at any point in 2022?\",\n \"slug\": \"will-austin-chen-get-a-girlfriend-a\",\n \"url\": \"https://manifold.markets/Sinclair/will-austin-chen-get-a-girlfriend-a\",\n \"pool\": {\n \"NO\": 1302.843097346256,\n \"YES\": 27.27537566587273\n },\n \"probability\": 0.9848997791483151,\n \"p\": 0.5772539558368134,\n \"totalLiquidity\": 135.98687478108732,\n \"outcomeType\": \"BINARY\",\n \"mechanism\": \"cpmm-1\",\n \"volume\": 13220.129746529843,\n \"volume24Hours\": 0,\n \"isResolved\": true,\n \"resolution\": \"YES\",\n \"resolutionTime\": 1665281737552,\n \"resolutionProbability\": 0.984899779148315,\n \"uniqueBettorCount\": 77,\n \"lastUpdatedTime\": 1665318900940,\n \"lastBetTime\": 1665234754560,\n \"lastCommentTime\": 1665318895971,\n \"token\": \"MANA\"\n },\n {\n \"id\": \"0x5d9eglo7\",\n \"creatorId\": \"Anv2e4vbILRln5Mz86gaUqts7tg2\",\n \"creatorUsername\": \"AustinChen\",\n \"creatorName\": \"Austin Chen\",\n \"createdTime\": 1723286655320,\n \"creatorAvatarUrl\": \"https://lh3.googleusercontent.com/a/AAcHTtcOUXoXz0J7yxvFkmtV1kDqJzUw3GSD7_tDefL5Bg=s96-c\",\n \"closeTime\": 1729570954113,\n \"question\": \"Will I have a girlfriend before I turn the age of 20?\",\n \"slug\": \"will-i-have-a-girlfriend-before-i-t-d8164cm26j\",\n \"url\": \"https://manifold.markets/AustinChen/will-i-have-a-girlfriend-before-i-t-d8164cm26j\",\n \"pool\": {\n \"NO\": 2849.6546891430908,\n \"YES\": 1377.2358130174393\n },\n \"probability\": 0.6657773269060374,\n \"p\": 0.49050825169502466,\n \"totalLiquidity\": 2000,\n \"outcomeType\": \"BINARY\",\n \"mechanism\": \"cpmm-1\",\n \"volume\": 15760.766719308793,\n \"volume24Hours\": 0,\n \"isResolved\": true,\n \"resolution\": \"YES\",\n \"resolutionTime\": 1729570954113,\n \"resolutionProbability\": 0.67,\n \"resolverId\": \"Anv2e4vbILRln5Mz86gaUqts7tg2\",\n \"uniqueBettorCount\": 86,\n \"lastUpdatedTime\": 1729644613892,\n \"lastBetTime\": 1729570592446,\n \"lastCommentTime\": 1729644612030,\n \"token\": \"MANA\"\n }\n]"}]},"jsonrpc":"2.0","id":"1"}
vsubbiah@Vikrams-MacBook-Pro manifold-mcp-server % |
|
Notes: Please also close #5 upon successful merge of this PR |
There was a problem hiding this comment.
Task Item 1: Add Dockerfile that permits building the Manifold Markets MCP as a Docker image to the repository
There was a problem hiding this comment.
Task Item 3: Update section 3. Configure MCP Settings in repository README.md with the following instructions to run the MCP via Docker
Configuration from Issue #5 for reference:
docker pull <DOCKER_REGISTRY_NAME>/<MANIFOLD_MCP_DOCKER_IMAGE_NAME>:latest{
"mcpServers": {
"manifold": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"MANIFOLD_API_KEY",
"<MANIFOLD_MCP_LOCAL_DOCKER_IMAGE_NAME>"
],
"env": {
"MANIFOLD_API_KEY": "your_api_key_here"
}
}
}
}
What
Manifold Markets MCP requires the installation of Node JS
Why
Users that may not have node installed or want to wrangle node installation paths to run the MCP may want to use the Manifold Markets MCP. Running the MCP locally through Node has also been finicky for MCP users using other MCPs.
How
Create a docker image of the MCP that users can run the Manifold Markets MCP through
Task Items
{ "mcpServers": { "manifold": { "command": "docker", "args": [ "run", "--rm", "-i", "-e", "MANIFOLD_API_KEY", "<MANIFOLD_MCP_LOCAL_DOCKER_IMAGE_NAME>" ], "env": { "MANIFOLD_API_KEY": "your_api_key_here" } } } }