Skip to content

Commit dfab523

Browse files
agnostic naming
1 parent a1b469c commit dfab523

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

mp_api/mcp/mp_mcp.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import httpx
77
from fastmcp import FastMCP
88

9-
from mp_api.mcp.tools import MPMcpTools, MPOpenAIMcpTools
9+
from mp_api.mcp.tools import MPCoreMCP, MPMcpTools
1010
from mp_api.mcp.utils import _NeedsMPClient
1111

1212
MCP_SERVER_INSTRUCTIONS = """
@@ -18,15 +18,15 @@
1818
"""
1919

2020

21-
def get_openai_compat_mcp() -> FastMCP:
22-
"""Create MCP for compatibility with OpenAI models."""
21+
def get_core_mcp() -> FastMCP:
22+
"""Create an MCP compatible with OpenAI models."""
2323
mp_mcp = FastMCP(
2424
"Materials_Project_MCP",
2525
instructions=MCP_SERVER_INSTRUCTIONS,
2626
)
27-
openai_compat_tools = MPOpenAIMcpTools()
27+
core_tools = MPCoreMCP()
2828
for k in {"search", "fetch"}:
29-
mp_mcp.tool(getattr(openai_compat_tools, k), name=k)
29+
mp_mcp.tool(getattr(core_tools, k), name=k)
3030
return mp_mcp
3131

3232

mp_api/mcp/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""Run MCP."""
22
from __future__ import annotations
33

4-
from mp_api.mcp.mp_mcp import get_openai_compat_mcp
4+
from mp_api.mcp.mp_mcp import get_core_mcp
55

6-
mcp = get_openai_compat_mcp()
6+
mcp = get_core_mcp()
77

88
if __name__ == "__main__":
99
mcp.run()

mp_api/mcp/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from mp_api.mcp._schemas import SearchOutput, FetchResult, MaterialMetadata
3434

3535

36-
class MaterialsProjectCoreMcp(_NeedsMPClient):
36+
class MPCoreMCP(_NeedsMPClient):
3737
"""Define LLM-agnostic MCP for the Materials Project API.
3838
3939
Because this MCP must support all common LLMs, it defines two methods,

0 commit comments

Comments
 (0)