mcp-pyright
Exposes Pyright language server functionality to provide Python code analysis tools such as type checking, code completion, hover information, symbol search, and code formatting.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-pyright check this code for type errors"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-pyright
MCP server that exposes Pyright language server functionality
mcp-name: io.github.daedalus/mcp-pyright
Install
pip install mcp-pyrightRelated MCP server: MCP-TY
Usage
The MCP server can be used with any MCP-compatible client. It exposes the following tools:
Type Checking
from mcp_pyright import mcp
# Run type checking
result = check_types(code="x: int = 'hello'")Get Hover Information
# Get type information at position
result = get_hover(code="x: int = 1", position=0)Get Completions
# Get code completions
result = get_completions(code="prin", position=4)Get Definition
# Find definition location
result = get_definition(code="def foo(): pass\nfoo()", position=15)Find References
# Find all references
result = find_references(code="x = 1\nx", position=5)Get Document Symbols
# Get all symbols in document
result = get_document_symbols(code="class Foo: pass\ndef bar(): pass")Format Code
# Format Python code
result = format_code(code="x=1\ny=2")Development
git clone https://github.com/daedalus/mcp-pyright.git
cd mcp-pyright
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mypy src/License
MIT
Available Tools
7 toolscheck_typesC
Check types in a Python file or string of code.
Performs type checking using Pyright and returns diagnostics.
Inputs: code, file_path, python_path, type_checker_mode. Returns: object
find_referencesB
Find all references to a symbol at a specific position.
Returns all reference locations for the symbol at the given position.
Inputs: code (required), position (required), python_path. Returns: object
format_codeB
Format Python code.
Formats the given Python code using pyright's formatter.
Inputs: code (required), python_path. Returns: object
get_completionsC
Get code completions at a specific position.
Returns available completions at the given cursor position.
Inputs: code (required), position (required), python_path. Returns: object
get_definitionB
Get definition location at a specific position.
Returns the location of the definition for the symbol at the given position.
Inputs: code (required), position (required), python_path. Returns: object
get_document_symbolsC
Get all symbols in a Python document.
Returns document symbols including functions, classes, variables, etc.
Inputs: code (required), python_path. Returns: object
get_hoverB
Get hover information at a specific position.
Returns type information and documentation for the symbol at the given position.
Inputs: code (required), position (required), python_path. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose targeting specific language server protocol operations: type checking, reference finding, code formatting, completions, definition lookup, symbol listing, and hover information. There is no overlap or ambiguity between these functions.
All tools follow a consistent verb_noun pattern with clear, descriptive names (check_types, find_references, format_code, get_completions, get_definition, get_document_symbols, get_hover). The naming convention is uniform throughout the set.
With 7 tools, this server provides a well-scoped set covering essential Python language server operations. Each tool earns its place by addressing a distinct aspect of code analysis and editing assistance.
The toolset covers most core language server operations for Python code analysis, including diagnostics, navigation, formatting, and documentation. A minor gap exists in code modification operations like refactoring or rename, but the surface supports typical agent workflows effectively.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
MCP server for building and testing AI agents with multi-model experimentation and insights.
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- FlicenseAqualityDmaintenanceA Model Context Protocol (MCP) server for advanced code analysis and editing with semantic search capabilities, enabling AI assistants to perform complex code operations through a standardized interface.151-
- AlicenseBqualityDmaintenanceAn MCP server leveraging the Rust-based ty type checker to provide AI models with high-performance, semantic Python code analysis and structural navigation. It enables precise symbol searching, cross-file renaming, and diagnostic reporting to improve code understanding and editing accuracy.161MIT
- AlicenseAqualityBmaintenanceAn extensible MCP server that provides intelligent Python code analysis, navigation, and understanding capabilities for AI assistants like Claude.22MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that gives AI coding agents codebase navigation intelligence, enabling symbol lookup, reference finding, type inspection, and diagnostics through tools like locate, refs, hover, diagnostics, status, and rename.548 npmMIT