Is it possible to produce the list all mathoverflow users from a given country?
You have tagged your post both (feature-request) and (support)
The feature-request part can be probably answered mainly by SE staff, which could say whether there are plans to implement something like this. However, there is also a similar feature request on the main meta: Filter users by country. So there you can see how it was received and maybe eventually also some decision whether or not it is going to be implemented will be given there.
Let me try to answer the support part of your question. (Which I understand as: What can be done with the existing tools without implementing new functionality?)
I think that ideal tool for tasks like this is Stack Exchange Data Explorer. (Since becoming part of SE network, MathOverflow is included in the database.) From the information about users available in the database, the Location in the Users table seems like the best choice for finding some information about country. (Of course, we will not find users which for some reason left this field blank or included something else there.)
You can create your own query or use some of already existing ones.
- A rather simple approach is simply to search for country name in this field. Perhaps reasonable addition is adding also country code. (Country codes might lead to some false positives, but you will not miss users who list their location, for example, as "Toronto, CA".) This approach is illustrated in answers to this question: Finding Top Users by country. The query Top users by country is linked in one of the answers there.
- Depending on how much time you are willing to spend on this, you might try to create more sophisticated queries. For example, you can try to find users who included only city in the location, but not the country. (Again, this might lead to some false positivies.) The following query, that somebody created specifically for Ukraine, seems to be quite good example of this: User List: Top N - Ukraine- with false positive exclusions. Similar query for Canada might serve as an example where excluding false positives needed more effort. (Judging by the comments at the end of the query, the creator might still consider this query to be unfinished.) It seems that the same user created similar queries for several other countries. (Since the name of queries this user created seem to be similar, another way to see them is to google for user list with false positive exclusions site:data.stackexchange.com.)
Do not forget to switch sites before running the query, if you are interested in results specifically for MathOverflow.
Below is the result of this SEDE query. It's significantly more complicated than the one martin mentioned in his comment, largely because it was only composed within the last year and Martin's comment was from 2017 (though the link in his comment does have this new SEDE query listed in one of the comments too).
Like all the others have been saying, a SEDE query can only be as good as the information it has available, and in this case, for example, 3 users seem completely missing from the SEDE result:
Those three users do have their locations given in their profile, so it might be possible to scrape this data somehow and further improve the results of the above SEDE query, but we will always be limited by flaws and gaps in the information available.