| uid | ai-integration |
|---|---|
| title | AI Assistant Integration |
Integrate PoshMcp with GitHub Copilot and other MCP-compatible AI assistants.
Configure PoshMcp as an MCP server for GitHub Copilot.
dotnet tool install -g poshmcpFor a specific version:
dotnet tool install -g poshmcp --version 0.5.5Edit .vscode/cline_mcp_settings.json:
{
"mcpServers": {
"poshmcp": {
"command": "poshmcp",
"args": ["serve", "--transport", "stdio"]
}
}
}With custom config:
{
"mcpServers": {
"poshmcp": {
"command": "poshmcp",
"args": [
"serve",
"--transport", "stdio",
"--config", "/path/to/appsettings.json"
]
}
}
}- Press
Ctrl+Shift+I(orCmd+Shift+Ion macOS) - Ask a question: "What services are running on this computer?"
- Copilot now has access to PoshMcp tools
If you're working in the poshmcp repository and want to test changes:
{
"mcpServers": {
"poshmcp": {
"command": "dotnet",
"args": [
"run",
"--project",
"C:\\Users\\YourUsername\\source\\poshmcp\\PoshMcp.Server",
"--",
"serve",
"--transport", "stdio"
],
"env": {
"DOTNET_ENVIRONMENT": "Development"
}
}
}
}PoshMcp works with any MCP-compatible client. Configure the client to connect to the stdio server:
{
"mcpServers": {
"poshmcp": {
"command": "poshmcp",
"args": ["serve", "--transport", "stdio"]
}
}
}Or if building from source:
{
"mcpServers": {
"poshmcp": {
"command": "dotnet",
"args": [
"run",
"--project",
"/path/to/poshmcp/PoshMcp.Server",
"--",
"serve",
"--transport", "stdio"
]
}
}
}Integrate PoshMcp's HTTP API into your web application:
// Fetch available tools
const tools = await fetch('http://localhost:8080/tools')
.then(r => r.json());
// Call a tool
const result = await fetch('http://localhost:8080/call', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
tool: 'Get-Process',
arguments: { Name: 'explorer' }
})
}).then(r => r.json());See also: Getting Started | Transport Modes