pipenv install -r requirements.txtpipenv run fastmcp run charity_server.pypipenv run python3 charity_server.pycurl --request POST \
--url http://localhost:8000/mcp \
--header 'accept: application/json, text/event-stream' \
--header 'content-type: application/json' \
--header 'mcp-session-id: my-test-session-124' \
--data '{ "method": "tools/call",
"params": {
"name": "query_charities",
"arguments": {
"charity_name": "",
"location": "Gal",
"cause": ""
}
},
"jsonrpc": "2.0",
"id": 9}'event: message
data: {
"jsonrpc": "2.0",
"id": 9,
"result": {
"content": [
{
"type": "text",
"text": "[{\"name\":\"Irish Cancer Society\",\"location\":\"Galway\",\"cause\":\"Health\"}]"
}
],
"isError": false
}
}curl --request POST \
--url http://localhost:8000/mcp \
--header 'accept: application/json, text/event-stream' \
--header 'content-type: application/json' \
--header 'mcp-session-id: my-test-session-124' \
--data '{ "method": "tools/call",
"params": {
"name": "query_charities",
"arguments": {
"charity_name": "",
"location": "",
"cause": "Animals" }
},
"jsonrpc": "2.0",
"id": 9 }'event: message
data: {
"jsonrpc": "2.0",
"id": 9,
"result": {
"content": [
{
"type": "text",
"text": "[{\"name\":\"Dogs Trust\",\"location\":\"Dublin\",\"cause\":\"Animals\"}]"
}
],
"isError": false
}
}curl --request POST --url http://localhost:8000/mcp --header 'accept: application/json, text/event-stream' --header 'content-type: application/json' --header 'mcp-session-id: my-test-session-124' --data '{ "method": "tools/call",
"params": { "name": "query_charities",
"arguments": {
"causes": "9"
}
},
"jsonrpc": "2.0",
"id": 9}'event: message
data: {
"jsonrpc": "2.0",
"id": 9,
"result": {
"content": [
{
"type": "text",
"text": "1 validation error for call[query_charities]\ncauses\n Unexpected keyword argument [type=unexpected_keyword_argument, input_value='9', input_type=str]\n For further information visit https://errors.pydantic.dev/2.12/v/unexpected_keyword_argument"
}
],
"isError": true
}
}
