| name | atmospheric-science-calculations |
| description | Calculate atmospheric parameters including Coriolis parameter, geostrophic wind, heat index, potential temperature, and dewpoint for meteorology and climate science. |
| license | MIT license |
| metadata | {"skill-author":"PJLab"} |
| i18n | {"zh":{"description":"计算大气参数。"}} |
Atmospheric Science Calculations
Usage
1. MCP Server Definition
import asyncio
import json
from mcp.client.streamable_http import streamablehttp_client
from mcp import ClientSession
class AtmSciClient:
"""Atmospheric Science Tools MCP Client"""
def __init__(self, server_url: str, api_key: str):
self.server_url = server_url
.api_key = api_key
.session =
():
()
:
.transport = streamablehttp_client(
url=.server_url,
headers={: .api_key}
)
.read, .write, .get_session_id = .transport.__aenter__()
.session_ctx = ClientSession(.read, .write)
.session = .session_ctx.__aenter__()
.session.initialize()
()
Exception e:
()
():
:
.session:
.session_ctx.__aexit__(, , )
(, ):
.transport.__aexit__(, , )
()
Exception e:
()
():
:
(result, ) result.content:
content = result.content[]
(content, ):
json.loads(content.text)
(result)
Exception e:
{: , : (result)}