Skip to content

Commit 7730660

Browse files
committed
chore: update MCP package to v1.12.2 and fix merge conflicts
1 parent ae7b464 commit 7730660

File tree

6 files changed

+1890
-1616
lines changed

6 files changed

+1890
-1616
lines changed

mcp-run-python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dev = [
1010
"dirty-equals>=0.9.0",
1111
"httpx>=0.28.1",
1212
"inline-snapshot>=0.19.3",
13-
"mcp>=1.4.1; python_version >= '3.10'",
13+
"mcp>=1.12.2; python_version >= '3.10'",
1414
"micropip>=0.9.0; python_version >= '3.12'",
1515
"pytest>=8.3.3",
1616
"pytest-pretty>=1.2.0",

mcp-run-python/src/main.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,13 @@ The tools are injected into the global namespace automatically - no discovery fu
106106
.array(z.string())
107107
.optional()
108108
.describe('List of available tools for injection (enables tool injection when provided)'),
109-
tool_name_mapping: z
110-
.record(z.string())
111-
.optional()
112-
.describe('Mapping of python_name -> original_mcp_name for tool name conversion'),
113109
},
114110
async ({
115111
python_code,
116112
tools = [],
117-
tool_name_mapping = {},
118113
}: {
119114
python_code: string
120115
tools?: string[]
121-
tool_name_mapping?: Record<string, string>
122116
}) => {
123117
const logPromises: Promise<void>[] = []
124118

@@ -185,7 +179,6 @@ The tools are injected into the global namespace automatically - no discovery fu
185179
{
186180
enableToolInjection: true,
187181
availableTools: tools,
188-
toolNameMapping: tool_name_mapping,
189182
timeoutSeconds: 30,
190183
elicitationCallback,
191184
} as ToolInjectionConfig,

mcp-run-python/src/runCode.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export interface CodeFile {
1313
export interface ToolInjectionConfig {
1414
enableToolInjection: boolean
1515
availableTools: string[]
16-
toolNameMapping?: Record<string, string> // python_name -> original_mcp_name
1716
timeoutSeconds: number
1817
// deno-lint-ignore no-explicit-any
1918
elicitationCallback?: (request: any) => Promise<any>
@@ -158,7 +157,6 @@ function injectToolFunctions(
158157
globals,
159158
config.availableTools,
160159
tool_callback,
161-
config.toolNameMapping,
162160
)
163161

164162
log('info', `Tool injection complete. Available tools: ${config.availableTools.join(', ')}`)

pydantic_ai_slim/pydantic_ai/mcp.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,8 @@ def __init__(
699699
allow_sampling: bool = True,
700700
max_retries: int = 1,
701701
sampling_model: models.Model | None = None,
702+
allow_elicitation: bool = True,
703+
elicitation_callback: ElicitationFnT | None = None,
702704
**kwargs: Any,
703705
):
704706
# Handle deprecated sse_read_timeout parameter
@@ -727,6 +729,8 @@ def __init__(
727729
self.allow_sampling = allow_sampling
728730
self.max_retries = max_retries
729731
self.sampling_model = sampling_model
732+
self.allow_elicitation = allow_elicitation
733+
self.elicitation_callback = elicitation_callback
730734
self.read_timeout = read_timeout
731735

732736
@property

pydantic_ai_slim/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ tavily = ["tavily-python>=0.5.0"]
7777
# CLI
7878
cli = ["rich>=13", "prompt-toolkit>=3", "argcomplete>=3.5.0"]
7979
# MCP
80-
mcp = ["mcp>=1.11.0; python_version >= '3.10'"]
80+
mcp = ["mcp>=1.12.2; python_version >= '3.10'"]
8181
# Evals
8282
evals = ["pydantic-evals=={{ version }}"]
8383
# A2A

0 commit comments

Comments
 (0)